Code Monkey home page Code Monkey logo

domainadaptivereid's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

domainadaptivereid's Issues

i train the model on dataset dukemtmc, how can i evaluate the model on dataset market1501 before Adaptation

i cna't load the model trained on duckmtmc, dukemtmc, num_classes=632 , market1501 ,num_classes=676,when i load the model ,
RuntimeError: Error(s) in loading state_dict for ResNet:
size mismatch for classifier_x2.weight: copying a param with shape torch.Size([632, 2048]) from checkpoint, the shape in current model is torch.Size([676, 2048]).
size mismatch for classifier_x2.bias: copying a param with shape torch.Size([632]) from checkpoint, the shape in current model is torch.Size([676]).

Where is this paper published?

Hi, I would like to know have your paper been published in conference or journal? I would like to cite the conference/journal name in my paper. Thanks.

Direct Transfer results

Did you combine the softmax loss and triplet loss to train the model on source data? It seems that the results are higher than using the model only trained with softmax loss. Additionally, what about the testing scores of the model on source data?

source_train.py

--resume <dir_of_source_trained_model>
--logs_dir <dir_to_save_source_trained_model>
Are they are different? How does the dir_of_source_trained_model get there?

features about rerank

Usually rerank is used in one dataset,but in your rerank.py you rerank source feature with target feature? Why? Or my understanding is fault?

Training without d_w

Hi, author. Thanks for this shared code.
I have a question on how to implement training without the d_w.

  • Just comment out the source distance calculation in rerank.py?

Any suggestion is welcome and thanks for your kindly reply.

Duke2Market results

I have run the code both ways, duke2market and market2duke, with the pre-trained model provided in Drive to find out that the market2duke is a match to the reported numbers while duke2market has a large drop of around 4% in performance (See the results comparison below)

Rank-1 Rank-5 Rank-10 mAP
Reported 75.8 89.5 93.2 53.7
Observed 71.5 85.0 88.9 48.6
No change has been made to the training code, can you please throw some light on what the reasons probably are?

Question about Dataloader

in your selftrain.py, the len(dataloader) is about 20 (each iteration len(dataloader) and len(images)is a little different)and the training is very fast. It seems that you choose a part of image to train. But according to len(dataloader) = len(images)/batchsize.
For example, in duke2maket,in selftrain.py
iteration 2 have 10105 training images, but the len(dataloader) is 18128(batch is 128)
iteration 28 have 12285 images, but the len(dataloader) is 14
128
it seems like len(dataloader) and len(images) are not strictly linearly, I suspect len(dataloader) is relation to both len(images) and num_ids. But I don't know why?

one question on paper: the calculation of distance matrix using by DBSCAN

Dear author,
Thanks for your excellent work and code release!
when reading your paper, I got confused with the calculation of the distance matrix using by DBSCAN. We aim to generate self generate label by DBSCAN algorithm and I look through the DBSCAN algorithm and sklearn API. We input the distance metric or feature of unlabeled sample to the DBSCAN algorithm. In your paper, both the source feature and target feature (unlabel) are considered. Here is my question.

  • the M in Algorithm1 in your paper is the inter dataset pair distance or the intra dataset pair distance?
  • if the M is the inter dataset pair distance, is that we need to relabel the source data?
  • if the M is the intra dataset pair distance, why we need the source data feature to calculate the target feature distance. And in Equation11 of your paper, where the paired sample from is not clear.

Thanks for your kindly reply.

About the results

hi, author. I'm confused with the results shown by Table 2, Table 4 and Table 5. I conclude the following sentenses from them, do they right?
(1) For clustering method, both DBSCAN and Affinity Propagation perform higher when uses Euclidean distance, rather than ours (Jaccard distance and dW).
(2) Because of the difference of the results, I think 'Ours w/o dW' in Table 2 is not same as 'Jaccard distance (with dW)' in Table 4, and 'Jaccard distance (with dW)' should be compared with self-training baseline. But I don't know what 'Ours w/o dW' means?
Thank you for your reply!

How to solve the model saturation?

Here is my training log.

image

This parameter rho=1.6e-3, and lambda_value = 0.1 that seems to depend on the training dataset and needs no modify. The left parameters need to be tuning is the learning rate and training epoch.
I try both of lr and training epoch, and it doesn't help significantly. Any suggestion on parameter tuning to ease the model saturation?
Thanks for your kindly reply.

Errors in run

1.Does it have to run in the cuda 9?
2. pre-trained models on Market1501 from GoogleDrive,and i run selftraining.py got this UnicodeDecodeError: 'utf-8' codec can't decode bytes in position 0-1: invalid continuation byte,but it works with python2.7,is it necessary running in python2.7 ?
3.When i run selftraining.py and i got this RuntimeError: zero-dimensional tensor (at position 0) cannot be concatenated,it happened on loss/triplet.py:45,it doesn't work although I have torchversion=0.3.
Wish u can give some suggestion,thanks

when I train the model from duke to market, it takes too much time and not finish yet after two days.

My execute command is :

CUDA_VISIBLE_DEVICES=0,1 python2 selftraining.py  --src_dataset dukemtmc\
	        --tgt_dataset market1501\
		--resume dukemtmc_trained.pth.tar\
		--data_dir data  \
		--logs_dir log

PS: my gpu situation:

 Sat Oct 27 13:02:49 2018       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 396.24                 Driver Version: 396.24                    |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 1080    Off  | 00000000:02:00.0  On |                  N/A |
| 56%   68C    P2    59W / 200W |   5510MiB /  8119MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+
|   1  GeForce GTX 108...  Off  | 00000000:81:00.0 Off |                  N/A |
| 61%   85C    P2    85W / 250W |   5435MiB / 11178MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0       905      C   python2                                     5003MiB |
|    0      1774      G   /usr/lib/xorg/Xorg                           310MiB |
|    0      4274      G   compiz                                       172MiB |
|    0      4427      G   ...webkit2gtk-3.0/libexec/WebKitWebProcess    13MiB |
|    1       905      C   python2                                     5423MiB |

duke2market results

Thanks for the inspiring implementation. :)

Have some trouble to reproduce the duke2market results using 2 GPUs, as I've achieved blew results using default parameters and pre-trained model:
1 GPU 47.8 / 71.4 (mAP/Rank-1)
2 GPUs 49.6 / 72.1
I've noticed a similar issue in closed ones but seems that 2 GPUs should be able to achieve the reported performances. My env is PyTorch 1.0, python 3.6 (made little changes to adjust to the Env, such as load pre-trained model, however, this should not affect the performances, as the pre-trained model is tested with reported performances).

Can you shed some insights on what could cause this problem? Thanks!

ConnectionResetError: [Errno 104] Connection reset by peer

Hi, author. Thank you for your excellent work! I have met some problems when I run selftraining.py. I chooce DukeMTMC-reID as the source dataset and Market-1501 as the target dataset. Following is the error after epoch 38 of iteration 6:
Exception in thread Thread-403:
...
ConnectionResetError: [Errno 104] Connection reset by peer
I execute this on Ubuntu 14.04.5 LTS. It seems that SSL reset the connection. So how to solve the problem and what process can I follow to recurrent the result?

Data selection of PKU-VehicleID

Hi,

Thanks for your work!
I wonder how do you sample images for PKU-VehicleID (24,157 images of 2,290 IDs) in your experiments? Could you please share the image list?
Plus, do you have the results for Veri->PKU experiments?

Thanks!

Hello,i find you use "tri_mat = np.triu(rerank_dist, 1)" in selftraining.py

        # DBSCAN cluster
        tri_mat = np.triu(rerank_dist, 1) # tri_mat.dim=2
        tri_mat = tri_mat[np.nonzero(tri_mat)] # tri_mat.dim=1
        tri_mat = np.sort(tri_mat,axis=None)
        top_num = np.round(args.rho*tri_mat.size).astype(int)
        eps = tri_mat[:top_num].mean()
        print('eps in cluster: {:.3f}'.format(eps))
        cluster = DBSCAN(eps=eps,min_samples=4,metric='precomputed', n_jobs=8)

about re_rank code

If your re_rank does not add the source domain, it is different from the re_rank version of CVPR2017 paper: Zhong Z. What you have achieved is a search in a distance matrix k-reciprocal nearest neighbors and then re_rank?

TypeError: Can't instantiate abstract class Euclidean with abstract methods get_metric, score_pairs

Hi, thank you for nice work. I am getting the following error when I run source_train.py.

Files already downloaded and verified
Market1501 dataset loaded
subset | # ids | # images

train | 676 | 11744
val | 75 | 1192
trainval | 751 | 12936
query | 750 | 3368
gallery | 751 | 15913
Traceback (most recent call last):
File "source_train.py", line 311, in
main(parser.parse_args())
File "source_train.py", line 196, in main
metric = DistanceMetric(algorithm=args.dist_metric)
File "/home/DomainAdaptiveReID-master/reid/dist_metric.py", line 13, in init
self.metric = get_metric(algorithm, *args, **kwargs)
File "/home/DomainAdaptiveReID-master/reid/metric_learning/init.py", line 25, in get_metric
return __factory[algorithm](*args, **kwargs)
TypeError: Can't instantiate abstract class Euclidean with abstract methods get_metric, score_pairs

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.