lsongx / domainadaptivereid Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
I am not able to open the downloaded tar files. Anyone else faced similar issue?
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.
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]).
--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?
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 14128
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?
can you provide the dataset creating code of MSMT17 ?
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!
When I use your code to run in larger dataset, it consumed lots of time to caculate the re_ranking. I wonder how much time you consume in it when training
# 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)
Here is my training log.
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.
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? |
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?
Why the last parameter is not saved on selftraining.py @LcDog
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.
Thanks for your kindly reply.
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?
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 you take Msmt as target dataset, what's your result at 1 GPU. Compared to 4 GPU, is it very bad?
Hi, thank you for nice work. I am getting the following error when I run source_train.py.
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
Can you provide the source domain training model of vehicleID dataset?
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 |
when I load your pre-trained weight,get this problem. Some solutions that provided online didn't work for it, can you provide some suggestions? My setting: Python3.6+PyTorch0.4.1
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?
Can you provide the setting for Duke-MSMT17?
Can you provide requirements?
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!
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!
Hi, author. Thanks for this shared code.
I have a question on how to implement training without the d_w.
Any suggestion is welcome and thanks for your kindly reply.
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.