KevinQian97/ELECTRICITY-MTMC

Reid result is empty

Closed this issue · 6 comments

Thank you for your sharing. When I try to reproduce your result, I find two problems .

1 .the reid_dict in https://github.com/KevinQian97/ELECTRICITY-MTMC/blob/master/identifier/test.py#L66 is a empty dict. That is the final result is just the single camera tracking result without vehicle_id in rm_dict.

$python ./identifier/test.py --test-batch-size 256 --test_set aic_test --use-avai-gpus --load-weights ./models/resnet101-Aic/model.pth.tar-9
Currently using GPU 0
Initializing image data manager
=> Initializing TEST datasets
Initializing model: resnet101
Model size: 42.500 M
Successfully loaded pretrained weights from "./models/resnet101-Aic/model.pth.tar-9"
** The following layers are discarded due to unmatched keys or layer size: ['classifier.weight', 'classifier.bias']
Matching aic_test ...
Extracted features for query set, obtained 963-by-2048 matrix
Extracted features for gallery set, obtained 123698-by-2048 matrix
=> BatchTime(s)/BatchSize(img): 0.399/256
/opt/conda/conda-bld/pytorch_1587428266983/work/torch/csrc/utils/python_arg_parser.cpp:756: UserWarning: This overload of addmm_ is deprecated:
        addmm_(Number beta, Number alpha, Tensor mat1, Tensor mat2)
Consider using one of the following signatures instead:
        addmm_(Tensor mat1, Tensor mat2, *, Number beta, Number alpha)
{45: {145: True, 162: True, 154: True, 150: True, 230: True, 350: True, 10: True, 64: True, 237: True, 414: True, 81: True, 33: True, 97: True, 23: True, 9: True, 309: True, 259: True}, 46: {42: True, 133: True, 468: True, 68: True, 66: True, 106: True, 9: True, 54: True, 141: True}, 42: {34: True, 646: True, 144: True, 1247: True, 550: True, 1033: True, 1291: True, 286: True, 322: True, 538: True, 1294: True, 541: True, 537: True, 2: True, 589: True, 587: True, 508: True, 542: True, 395: True, 1227: True}, 44: {20: True, 353: True, 14: True, 39: True, 499: True, 232: True, 123: True, 489: True}, 41: {155: True, 1240: True, 949: True, 278: True, 11: True, 1021: True, 1054: True, 372: True, 271: True, 921: True, 1183: True, 257: True}, 43: {494: True, 108: True, 53: True, 464: True, 129: True}} {}
  1. as the issue #5 posted, is such many duplicated vehicles in a same frame of a same video a normal case? tracklets.txt has 424146 lines. But after execute python ./identifier/preprocess/extract_img.py there are only 124661 images left in exp/imgs/aic_test. Other vehicles images are not considered at all because of overwritting .

Hi chenjx,

Thanks for your interest!
For question one, according to our implementation and experiments of others, the Reid result is not empty. Would u mind providing more information about your results? i.e. you directly run the test bash with our provided model or use the model trained by yourself. Also, would u mind providing the track3.txt generated here?
For question two, there are some redundant vehicle ids, but I didn't remember that number is so large. Anyway, for the official metric, redundant id won't affect the final performance.

Sry, just notice your printed results.
The first dict of the output is the re-id dict and the second one is the filtering dict.


reid_dict,rm_dict = calc_reid(result)
print(rm_dict,reid_dict)


rm_dict is the output is the re-id dict and reid_dict is the filtering dict?

Sry, just notice your printed results.
The first dict of the output is the re-id dict and the second one is the filtering dict.

No. The first dict of the output is the remove dict and the second one is the re-id dict.
the reid dict should look like 770: {'dis': 11.902046, 'id': 2638}, 365: {'dis': 11.598312, 'id': 2639}, 437: {'dis': 10.53886, 'id': 2640}, 164: {'dis': 9.796799, 'id': 2642}

@chenjx1005 I meet the same problem. Have you solved this? Thanks.

@Hlings No. I give up using this project. The result of this solution has many repeated lines, which causes the evaluation code gives a much higher score than it should have. This is a bug of the AIC20 and has been fixed in AIC21.