Open MaggieeeChen opened 5 years ago
Hi, I would like to reproduce the results in this repository. But, when I try to train the model on VeRi dataset, the acc reaches 100%, which is really surprising. May you help me figure out what's wrong, if you had time? Thanks.
My log_train.txt is as follow:
**** Summary **** train names : ['veri']
test names : ['veri']
Initializing model: resnet50 Initialized model with pretrained weights from https://download.pytorch.org/models/resnet50-19c8e357.pth Model size: 23.508 M => Start training
Epoch: [21][430/590] Time 0.339 (0.354) Data 0.1288 (0.1432) Xent 0.1333 (0.0832) Htri 0.0000 (0.0026) Acc 96.88 (98.67) Epoch: [21][440/590] Time 0.341 (0.354) Data 0.1383 (0.1430) Xent 0.0618 (0.0833) Htri 0.0000 (0.0028) Acc 100.00 (98.68) Epoch: [21][450/590] Time 0.407 (0.354) Data 0.1694 (0.1430) Xent 0.0463 (0.0835) Htri 0.0000 (0.0028) Acc 100.00 (98.67) Epoch: [21][460/590] Time 0.379 (0.354) Data 0.1594 (0.1431) Xent 0.0698 (0.0835) Htri 0.0000 (0.0028) Acc 100.00 (98.67) Epoch: [21][470/590] Time 0.364 (0.354) Data 0.1490 (0.1428) Xent 0.0423 (0.0835) Htri 0.0000 (0.0027) Acc 100.00 (98.67) Epoch: [21][480/590] Time 0.388 (0.354) Data 0.1769 (0.1429) Xent 0.0764 (0.0835) Htri 0.0000 (0.0027) Acc 98.44 (98.66) Epoch: [21][490/590] Time 0.348 (0.354) Data 0.1455 (0.1430) Xent 0.0498 (0.0837) Htri 0.0000 (0.0026) Acc 100.00 (98.65) Epoch: [21][500/590] Time 0.351 (0.354) Data 0.1435 (0.1431) Xent 0.0381 (0.0835) Htri 0.0000 (0.0026) Acc 100.00 (98.65) Epoch: [21][510/590] Time 0.337 (0.354) Data 0.1292 (0.1429) Xent 0.1196 (0.0837) Htri 0.0000 (0.0028) Acc 96.88 (98.64) Epoch: [21][520/590] Time 0.326 (0.354) Data 0.1218 (0.1428) Xent 0.2127 (0.0841) Htri 0.0000 (0.0028) Acc 93.75 (98.63) Epoch: [21][530/590] Time 0.327 (0.354) Data 0.1211 (0.1428) Xent 0.0778 (0.0841) Htri 0.0000 (0.0028) Acc 98.44 (98.64) Epoch: [21][540/590] Time 0.319 (0.354) Data 0.1130 (0.1428) Xent 0.0669 (0.0842) Htri 0.0000 (0.0030) Acc 98.44 (98.63) Epoch: [21][550/590] Time 0.334 (0.354) Data 0.1275 (0.1427) Xent 0.0948 (0.0849) Htri 0.0000 (0.0029) Acc 98.44 (98.61) Epoch: [21][560/590] Time 0.355 (0.354) Data 0.1449 (0.1426) Xent 0.0964 (0.0851) Htri 0.0000 (0.0031) Acc 98.44 (98.61) Epoch: [21][570/590] Time 0.354 (0.354) Data 0.1488 (0.1426) Xent 0.1672 (0.0860) Htri 0.0000 (0.0031) Acc 96.88 (98.59) Epoch: [21][580/590] Time 0.389 (0.354) Data 0.1392 (0.1425) Xent 0.1112 (0.0864) Htri 0.0000 (0.0031) Acc 98.44 (98.59) Epoch: [21][590/590] Time 0.390 (0.354) Data 0.1683 (0.1425) Xent 0.1350 (0.0869) Htri 0.0000 (0.0032) Acc 98.44 (98.58) Epoch: [22][10/590] Time 0.331 (0.353) Data 0.1234 (0.1414) Xent 0.0928 (0.1049) Htri 0.0000 (0.0000) Acc 98.44 (97.81) Epoch: [22][20/590] Time 0.357 (0.354) Data 0.1520 (0.1429) Xent 0.1362 (0.0996) Htri 0.0000 (0.0003) Acc 98.44 (98.12) Epoch: [22][30/590] Time 0.359 (0.357) Data 0.1526 (0.1448) Xent 0.0787 (0.0937) Htri 0.0466 (0.0042) Acc 98.44 (98.28) Epoch: [22][40/590] Time 0.380 (0.356) Data 0.1755 (0.1444) Xent 0.1180 (0.0908) Htri 0.0000 (0.0031) Acc 98.44 (98.40) Epoch: [22][50/590] Time 0.369 (0.357) Data 0.1658 (0.1454) Xent 0.0419 (0.0861) Htri 0.0000 (0.0033) Acc 100.00 (98.59) Epoch: [22][60/590] Time 0.341 (0.357) Data 0.1380 (0.1452) Xent 0.1054 (0.0830) Htri 0.0059 (0.0032) Acc 98.44 (98.67) Epoch: [22][70/590] Time 0.359 (0.356) Data 0.1531 (0.1444) Xent 0.0415 (0.0781) Htri 0.0000 (0.0039) Acc 100.00 (98.84) Epoch: [22][80/590] Time 0.346 (0.356) Data 0.1387 (0.1438) Xent 0.0452 (0.0756) Htri 0.0000 (0.0034) Acc 100.00 (98.96) Epoch: [22][90/590] Time 0.341 (0.356) Data 0.1385 (0.1440) Xent 0.0238 (0.0720) Htri 0.0000 (0.0030) Acc 100.00 (99.03) Epoch: [22][100/590] Time 0.343 (0.355) Data 0.1222 (0.1438) Xent 0.0389 (0.0697) Htri 0.0000 (0.0027) Acc 100.00 (99.08) Epoch: [22][110/590] Time 0.382 (0.356) Data 0.1423 (0.1442) Xent 0.0473 (0.0674) Htri 0.0000 (0.0025) Acc 98.44 (99.13) Epoch: [22][120/590] Time 0.379 (0.356) Data 0.1574 (0.1445) Xent 0.0330 (0.0649) Htri 0.0000 (0.0023) Acc 100.00 (99.19) Epoch: [22][130/590] Time 0.337 (0.355) Data 0.1246 (0.1435) Xent 0.0708 (0.0635) Htri 0.0000 (0.0025) Acc 100.00 (99.23)
Checkpoint saved to "log/resnet50-veri/model.pth.tar-60" Elapsed 3:43:43 => Show performance summary veri (source)
me too, did you solve it
there may be some problems in your dataset
Hi, I would like to reproduce the results in this repository. But, when I try to train the model on VeRi dataset, the acc reaches 100%, which is really surprising. May you help me figure out what's wrong, if you had time? Thanks.
My log_train.txt is as follow:
**========== Args:Namespace(adam_beta1=0.9, adam_beta2=0.999, arch='resnet50', color_aug=False, color_jitter=False, eval_freq=-1, evaluate=False, gamma=0.1, gpu_devices='0', height=128, label_smooth=False, lambda_htri=1, lambda_xent=1, load_weights='', lr=0.0003, lr_scheduler='multi_step', margin=0.3, max_epoch=60, momentum=0.9, no_pretrained=False, num_instances=4, optim='amsgrad', print_freq=10, query_remove=True, random_erase=False, resume='', rmsprop_alpha=0.99, root='./datasets', save_dir='log/resnet50-veri', seed=1, sgd_dampening=0, sgd_nesterov=False, source_names=['veri'], split_id=0, start_epoch=0, start_eval=0, stepsize=[20, 40], target_names=['veri'], test_batch_size=100, test_size=800, train_batch_size=64, train_sampler='RandomSampler', use_avai_gpus=False, use_cpu=False, visualize_ranks=False, weight_decay=0.0005, width=256, workers=0)
Currently using GPU 0 Initializing image data manager => Initializing TRAIN (source) datasets => VeRi loaded Image Dataset statistics:
subset | # ids | # images | # cameras
train | 576 | 37778 | 20 query | 200 | 1678 | 19 gallery | 200 | 11579 | 19 ----------------------------------------** mean and std: tensor([-0.2806, -0.1601, 0.0939]) tensor([ 0.8216, 0.8342, 0.8285]) => Initializing TEST (target) datasets => VeRi loaded Image Dataset statistics:
subset | # ids | # images | # cameras
train | 576 | 37778 | 20 query | 200 | 1678 | 19 gallery | 200 | 11579 | 19
**** Summary **** train names : ['veri']
train datasets : 1
train ids : 576
train images : 37778
train cameras : 20
test names : ['veri']
Initializing model: resnet50 Initialized model with pretrained weights from https://download.pytorch.org/models/resnet50-19c8e357.pth Model size: 23.508 M => Start training
Epoch: [21][430/590] Time 0.339 (0.354) Data 0.1288 (0.1432) Xent 0.1333 (0.0832) Htri 0.0000 (0.0026) Acc 96.88 (98.67)
Epoch: [21][440/590] Time 0.341 (0.354) Data 0.1383 (0.1430) Xent 0.0618 (0.0833) Htri 0.0000 (0.0028) Acc 100.00 (98.68)
Epoch: [21][450/590] Time 0.407 (0.354) Data 0.1694 (0.1430) Xent 0.0463 (0.0835) Htri 0.0000 (0.0028) Acc 100.00 (98.67)
Epoch: [21][460/590] Time 0.379 (0.354) Data 0.1594 (0.1431) Xent 0.0698 (0.0835) Htri 0.0000 (0.0028) Acc 100.00 (98.67)
Epoch: [21][470/590] Time 0.364 (0.354) Data 0.1490 (0.1428) Xent 0.0423 (0.0835) Htri 0.0000 (0.0027) Acc 100.00 (98.67)
Epoch: [21][480/590] Time 0.388 (0.354) Data 0.1769 (0.1429) Xent 0.0764 (0.0835) Htri 0.0000 (0.0027) Acc 98.44 (98.66)
Epoch: [21][490/590] Time 0.348 (0.354) Data 0.1455 (0.1430) Xent 0.0498 (0.0837) Htri 0.0000 (0.0026) Acc 100.00 (98.65)
Epoch: [21][500/590] Time 0.351 (0.354) Data 0.1435 (0.1431) Xent 0.0381 (0.0835) Htri 0.0000 (0.0026) Acc 100.00 (98.65)
Epoch: [21][510/590] Time 0.337 (0.354) Data 0.1292 (0.1429) Xent 0.1196 (0.0837) Htri 0.0000 (0.0028) Acc 96.88 (98.64)
Epoch: [21][520/590] Time 0.326 (0.354) Data 0.1218 (0.1428) Xent 0.2127 (0.0841) Htri 0.0000 (0.0028) Acc 93.75 (98.63)
Epoch: [21][530/590] Time 0.327 (0.354) Data 0.1211 (0.1428) Xent 0.0778 (0.0841) Htri 0.0000 (0.0028) Acc 98.44 (98.64)
Epoch: [21][540/590] Time 0.319 (0.354) Data 0.1130 (0.1428) Xent 0.0669 (0.0842) Htri 0.0000 (0.0030) Acc 98.44 (98.63)
Epoch: [21][550/590] Time 0.334 (0.354) Data 0.1275 (0.1427) Xent 0.0948 (0.0849) Htri 0.0000 (0.0029) Acc 98.44 (98.61)
Epoch: [21][560/590] Time 0.355 (0.354) Data 0.1449 (0.1426) Xent 0.0964 (0.0851) Htri 0.0000 (0.0031) Acc 98.44 (98.61)
Epoch: [21][570/590] Time 0.354 (0.354) Data 0.1488 (0.1426) Xent 0.1672 (0.0860) Htri 0.0000 (0.0031) Acc 96.88 (98.59)
Epoch: [21][580/590] Time 0.389 (0.354) Data 0.1392 (0.1425) Xent 0.1112 (0.0864) Htri 0.0000 (0.0031) Acc 98.44 (98.59)
Epoch: [21][590/590] Time 0.390 (0.354) Data 0.1683 (0.1425) Xent 0.1350 (0.0869) Htri 0.0000 (0.0032) Acc 98.44 (98.58)
Epoch: [22][10/590] Time 0.331 (0.353) Data 0.1234 (0.1414) Xent 0.0928 (0.1049) Htri 0.0000 (0.0000) Acc 98.44 (97.81)
Epoch: [22][20/590] Time 0.357 (0.354) Data 0.1520 (0.1429) Xent 0.1362 (0.0996) Htri 0.0000 (0.0003) Acc 98.44 (98.12)
Epoch: [22][30/590] Time 0.359 (0.357) Data 0.1526 (0.1448) Xent 0.0787 (0.0937) Htri 0.0466 (0.0042) Acc 98.44 (98.28)
Epoch: [22][40/590] Time 0.380 (0.356) Data 0.1755 (0.1444) Xent 0.1180 (0.0908) Htri 0.0000 (0.0031) Acc 98.44 (98.40)
Epoch: [22][50/590] Time 0.369 (0.357) Data 0.1658 (0.1454) Xent 0.0419 (0.0861) Htri 0.0000 (0.0033) Acc 100.00 (98.59)
Epoch: [22][60/590] Time 0.341 (0.357) Data 0.1380 (0.1452) Xent 0.1054 (0.0830) Htri 0.0059 (0.0032) Acc 98.44 (98.67)
Epoch: [22][70/590] Time 0.359 (0.356) Data 0.1531 (0.1444) Xent 0.0415 (0.0781) Htri 0.0000 (0.0039) Acc 100.00 (98.84)
Epoch: [22][80/590] Time 0.346 (0.356) Data 0.1387 (0.1438) Xent 0.0452 (0.0756) Htri 0.0000 (0.0034) Acc 100.00 (98.96)
Epoch: [22][90/590] Time 0.341 (0.356) Data 0.1385 (0.1440) Xent 0.0238 (0.0720) Htri 0.0000 (0.0030) Acc 100.00 (99.03)
Epoch: [22][100/590] Time 0.343 (0.355) Data 0.1222 (0.1438) Xent 0.0389 (0.0697) Htri 0.0000 (0.0027) Acc 100.00 (99.08)
Epoch: [22][110/590] Time 0.382 (0.356) Data 0.1423 (0.1442) Xent 0.0473 (0.0674) Htri 0.0000 (0.0025) Acc 98.44 (99.13)
Epoch: [22][120/590] Time 0.379 (0.356) Data 0.1574 (0.1445) Xent 0.0330 (0.0649) Htri 0.0000 (0.0023) Acc 100.00 (99.19)
Epoch: [22][130/590] Time 0.337 (0.355) Data 0.1246 (0.1435) Xent 0.0708 (0.0635) Htri 0.0000 (0.0025) Acc 100.00 (99.23)
=> Test Evaluating veri ... Extracted features for query set, obtained 1678-by-2048 matrix Extracted features for gallery set, obtained 11579-by-2048 matrix => BatchTime(s)/BatchSize(img): 0.019/100 Computing CMC and mAP Results ---------- mAP: 66.7% CMC curve Rank-1 : 100.0% Rank-5 : 100.0% Rank-10 : 100.0% Rank-20 : 100.0%
Checkpoint saved to "log/resnet50-veri/model.pth.tar-60" Elapsed 3:43:43 => Show performance summary veri (source)