michuanhaohao/AlignedReID

error: unrecognized arguments: (--labelsmooth)

2110317008 opened this issue · 5 comments

root@6e5c9e14f90a:/home/AlignedReID-master# CUDA_VISIBLE_DEVICES=1 python train_alignedreid.py -d dukemtmcreid -a resnet50 --test_distance global_local --reranking (--labelsmooth)

usage: train_alignedreid.py [-h] [--root ROOT]
[-d {market1501,market1501_partial,cuhk03,dukemtmcreid,msmt17,mars,ilidsvid,prid,dukemtmcvidreid}]
[-j WORKERS] [--height HEIGHT] [--width WIDTH]
[--split-id SPLIT_ID] [--cuhk03-labeled]
[--cuhk03-classic-split] [--use-metric-cuhk03]
[--labelsmooth] [--optim OPTIM]
[--max-epoch MAX_EPOCH]
[--start-epoch START_EPOCH]
[--train-batch TRAIN_BATCH]
[--test-batch TEST_BATCH] [--lr LR]
[--stepsize STEPSIZE] [--gamma GAMMA]
[--weight-decay WEIGHT_DECAY] [--margin MARGIN]
[--num-instances NUM_INSTANCES] [--htri-only]
[-a {resnet50,resnet101,densenet121,shufflenet,inceptionv4}]
[--print-freq PRINT_FREQ] [--seed SEED]
[--resume PATH] [--evaluate]
[--eval-step EVAL_STEP] [--start-eval START_EVAL]
[--save-dir SAVE_DIR] [--use_cpu]
[--gpu-devices GPU_DEVICES] [--reranking]
[--test_distance TEST_DISTANCE] [--unaligned]
train_alignedreid.py: error: unrecognized arguments: (--labelsmooth)
root@6e5c9e14f90a:/home/AlignedReID-master#
root@6e5c9e14f90a:/home/AlignedReID-master#
root@6e5c9e14f90a:/home/AlignedReID-master#
root@6e5c9e14f90a:/home/AlignedReID-master#
root@6e5c9e14f90a:/home/AlignedReID-master#
root@6e5c9e14f90a:/home/AlignedReID-master# CUDA_VISIBLE_DEVICES=1 python train_alignedreid.py -d dukemtmcreid -a resnet50 --test_distance global_local --reranking (--labelsmooth)

usage: train_alignedreid.py [-h] [--root ROOT]
[-d {market1501,market1501_partial,cuhk03,dukemtmcreid,msmt17,mars,ilidsvid,prid,dukemtmcvidreid}]
[-j WORKERS] [--height HEIGHT] [--width WIDTH]
[--split-id SPLIT_ID] [--cuhk03-labeled]
[--cuhk03-classic-split] [--use-metric-cuhk03]
[--labelsmooth] [--optim OPTIM]
[--max-epoch MAX_EPOCH]
[--start-epoch START_EPOCH]
[--train-batch TRAIN_BATCH]
[--test-batch TEST_BATCH] [--lr LR]
[--stepsize STEPSIZE] [--gamma GAMMA]
[--weight-decay WEIGHT_DECAY] [--margin MARGIN]
[--num-instances NUM_INSTANCES] [--htri-only]
[-a {resnet50,resnet101,densenet121,shufflenet,inceptionv4}]
[--print-freq PRINT_FREQ] [--seed SEED]
[--resume PATH] [--evaluate]
[--eval-step EVAL_STEP] [--start-eval START_EVAL]
[--save-dir SAVE_DIR] [--use_cpu]
[--gpu-devices GPU_DEVICES] [--reranking]
[--test_distance TEST_DISTANCE] [--unaligned]
train_alignedreid.py: error: unrecognized arguments: (--labelsmooth)

Hi, use '--reranking --labelsmooth'

Hi, use '--reranking --labelsmooth'

OK!Thank you! But the link to the dataset CUHK03 [13] and MSMT17 [22] you provided cannot be opened!

@2110317008 There are some problems of these datasets. You can consult the authors.

@2110317008 There are some problems of these datasets. You can consult the authors.

root@6e5c9e14f90a:/home/AlignedReID-master# CUDA_VISIBLE_DEVICES=1 python train_alignedreid.py -d dukemtmcreid -a resnet50 --evaluate --resume YOUR_MODEL_PATH --save-dir log/resnet50-cuhk03-alignedreid --test_distance global

Args:Namespace(arch='resnet50', cuhk03_classic_split=False, cuhk03_labeled=False, dataset='dukemtmcreid', eval_step=-1, evaluate=True, gamma=0.1, gpu_devices='1', height=256, htri_only=False, labelsmooth=False, lr=0.0002, margin=0.3, max_epoch=300, num_instances=4, optim='adam', print_freq=10, reranking=False, resume='YOUR_MODEL_PATH', root='data', save_dir='log/resnet50-cuhk03-alignedreid', seed=1, split_id=0, start_epoch=0, start_eval=0, stepsize=150, test_batch=32, test_distance='global', train_batch=32, unaligned=False, use_cpu=False, use_metric_cuhk03=False, weight_decay=0.0005, width=128, workers=4)

Currently using GPU 1
Initializing dataset dukemtmcreid
=> DukeMTMC-reID loaded
Dataset statistics:

subset | # ids | # images

train | 702 | 16522
query | 702 | 2228
gallery | 1110 | 17661

total | 1404 | 36411

Initializing model: resnet50
Model size: 25.21280M
Loading checkpoint from 'YOUR_MODEL_PATH'
Traceback (most recent call last):
File "train_alignedreid.py", line 384, in
main()
File "train_alignedreid.py", line 166, in main
checkpoint = torch.load(args.resume)
File "/usr/local/lib/python3.6/dist-packages/torch/serialization.py", line 382, in load
f = open(f, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: 'YOUR_MODEL_PATH'
This error occurred when I tested on the -d dukemtmcreid dataset. Please help me solve this problem. Thank you!

Replace 'YOUR_MODEL_PATH' with your real model path '/home/xxx/xxxx/xxx.xxx'