GithubHelp home page GithubHelp logo

yu-wu / one-example-person-reid Goto Github PK

View Code? Open in Web Editor NEW
128.0 128.0 29.0 3.99 MB

Code for TIP2019 Progressive Learning for Person Re-Identification with One Example

License: MIT License

Python 99.52% Shell 0.48%

one-example-person-reid's People

Contributors

yu-wu avatar

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

one-example-person-reid's Issues

file examples

Hello author, how do you get 'market1501_init_-1.0.pickle','duke_init_-1.0.pickle' in file examples? Plase help me! Please! Thank you very much!

ValueError:num_samples should be a positive integeral value,but got num_samples =0

Hello,When i train the model ,i will always get this problem?Is anyone have solved it?

Traceback (most recent call last):
File "run.py", line 123, in
main(parser.parse_args())
File "run.py", line 87, in main
eug.train(new_train_data, unselected_data, step, loss=args.loss, epochs=args.epochs, step_size=args.step_size, init_lr=0.1) if step != resume_step else eug.resume(ckpt_file, step)
File "/home/xutian/One-Example-Person-ReID-master/reid/eug.py", line 92, in train
return self.softmax_train(train_data, unselected_data, step, epochs, step_size, init_lr, dropout, loss)
File "/home/xutian/One-Example-Person-ReID-master/reid/eug.py", line 135, in softmax_train
u_dataloader = self.get_dataloader(unselected_data, training=True, is_ulabeled=True)
File "/home/xutian/One-Example-Person-ReID-master/reid/eug.py", line 82, in get_dataloader
shuffle=training, pin_memory=True, drop_last=training)
File "/home/xutian/tools/anaconda3/envs/freedom/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 802, in init
sampler = RandomSampler(dataset)
File "/home/xutian/tools/anaconda3/envs/freedom/lib/python3.6/site-packages/torch/utils/data/sampler.py", line 64, in init
"value, but got num_samples={}".format(self.num_samples))
ValueError: num_samples should be a positive integeral value, but got num_samples=0

How to reproduce?

Hello, thank you for sharing, but I run the error after following the readme file.
NotADirectoryError: [Errno 20] Not a directory: '/home/Ensoleille/One-Example-Person-ReID-master/data/market1501/train/0002_c1s1_000451_03.jpg'.I hope you can tell me how to reproduce smoothly.

How to get baseline result

Hi, Thanks for your awesome work. I read the paper and found baseline in market1501 is rank1=26.0, mAP=9.0. In my opinion, this is trained using 751 images with 751 ids. But I just try, and I cannot get the baseline result. My rank1=8.6, mAP=3.0. I want to know how to reproduce the baseline result using this code.

How to replace the resnet50 with other networks?

Hi,I want to replace the resnet50 with other networks,but every time I switch to the source code for another network, the program runs up a lot of memory after it shows" create dataloader for Training with batch_size 16", and then the code stops running with showing nothing.I don't know why and what should I do if I want to change the network?

A question about Exclusive Loss

Sorry for disturbing you. When I read the code about the Exclusive Loss, I found that Exclusive Loss in the “forward“ function uses targets labels. However, in the paper, the Exclusive Loss doesn't need labels to training.

image

image

How to get the static strategy work?

Thanks for your many great works!
I have a question about how to get the static strategy work,such as the DGM+IDE ,which rank-1=36.8 and map=16.9 ?
Many thanks for you !

ExLoss cannot converge

Thank you for your great work!But i found the exloss cannot converge when training, the optimizer is adam, lr=3e-4

size mismatch, m1: [16 x 2048], m2: [1024 x 15820]

Hi, I am trying your code on the duke dataset but I am getting the following error.

/usr/local/lib/python3.6/dist-packages/sklearn/externals/joblib/externals/cloudpickle/cloudpickle.py:47: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp
Files already downloaded and verified
Duke dataset loaded
  subset   | # ids | # tracklets
  ---------------------------
  train    |   702 |    16522
  query    |   702 |     2228
  gallery  |  1110 |    17661
  labeled    | N/A |      702
  unlabeled  | N/A |    15820

Create new one-shot split and save it to ./examples/duke_init_-1.pickle
Runing: EF=10%, step 0:	 Nums_to_be_select 1582 	 Ritio 	 Logs-dir 0.1
create dataloader for Training with batch_size 16
create dataloader for Training with batch_size 16
Traceback (most recent call last):
  File "run.py", line 124, in <module>
    main(parser.parse_args())
  File "run.py", line 88, in main
    eug.train(new_train_data, unselected_data, step, loss=args.loss, epochs=args.epochs, step_size=args.step_size, init_lr=0.1) if step != resume_step else eug.resume(ckpt_file, step)
  File "/home/zamra/PYreps/Person_ReId/One-Example-Person-ReID/my_reid/eug.py", line 92, in train
    return self.softmax_train(train_data, unselected_data, step, epochs, step_size, init_lr, dropout, loss)
  File "/home/zamra/PYreps/Person_ReId/One-Example-Person-ReID/my_reid/eug.py", line 142, in softmax_train
    trainer.train(epoch, s_dataloader, u_dataloader, optimizer, use_unselcted_data, print_freq=len(s_dataloader)//2)
  File "/home/zamra/PYreps/Person_ReId/One-Example-Person-ReID/my_reid/trainers.py", line 67, in train
    u_loss, u_prec1 = self._forward(u_inputs, u_targets, 'u')
  File "/home/zamra/PYreps/Person_ReId/One-Example-Person-ReID/my_reid/trainers.py", line 114, in _forward
    u_loss, outputs = self.u_criterion(u_feats, targets)
  File "/home/zamra/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in __call__
    result = self.forward(*input, **kwargs)
  File "/home/zamra/PYreps/Person_ReId/One-Example-Person-ReID/my_reid/exclusive_loss.py", line 36, in forward
    outputs = Exclusive(self.V)(inputs, targets) * self.t
  File "/home/zamra/PYreps/Person_ReId/One-Example-Person-ReID/my_reid/exclusive_loss.py", line 15, in forward
    outputs = inputs.mm(self.V.t())
RuntimeError: size mismatch, m1: [16 x 2048], m2: [1024 x 15820] at /pytorch/aten/src/THC/generic/THCTensorMathBlas.cu:266

A question about the processing of video datasets

Hellow!For video datasets, such as Mars, I would like to ask whether a tracklet is similar to a single frame image,? And whether all the frames in a tracklet are input into the network at the same time?

How to use run.sh with Pycharm editor?

Hello author, I am recreating your paper. I want to ask how to use the Pycharm editor to run the run.sh file. I am a beginner. I want to adjust the parameters in the code because my GPU memory is not enough. What can I do? Thank you very much.

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.