Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Couldn't run test_tracktor.py #133

Open
ma7dev opened this issue Apr 5, 2021 · 13 comments
Open

Couldn't run test_tracktor.py #133

ma7dev opened this issue Apr 5, 2021 · 13 comments

Comments

@ma7dev
Copy link

ma7dev commented Apr 5, 2021

I have installed the packages per README and I downloaded MOT dataset. I couldn't run test_tracktor.py. Here is the error that I got:

INFO - main - Initializing object detector(s).
INFO - main - Initializing reID network(s).
ERROR - test_tracktor - Failed after 0:00:11!
Traceback (most recent calls WITHOUT Sacred internals):
  File "experiments/scripts/test_tracktor.py", line 120, in main
    reid_network = ReIDNetwork_resnet50(pretrained=False, **reid_cfg["model_args"])
KeyError: 'model_args'

Thanks!

@timmeinhardt
Copy link
Collaborator

timmeinhardt commented Apr 6, 2021

Did you download the pre-trained model files? Including the Faster R-CNN and reID model files?

@ma7dev
Copy link
Author

ma7dev commented Apr 7, 2021

Yes, I did. I have downloaded the pre-trained model files and moved them to the output folder:

├── faster_rcnn_fpn
│   ├── faster_rcnn_fpn_training_mot_17
│   │   ├── model_epoch_27.model
│   │   ├── MOT17-01.txt
│   │   ├── MOT17-02.txt
│   │   ├── ...
│   │   └── MOT17-14.txt
│   ├── faster_rcnn_fpn_training_mot_17_split_09
│   ├── faster_rcnn_fpn_training_mot_20
│   │   ├── model_epoch_27.model
│   │   ├── MOT20-01.txt
│   │   ├── MOT20-02.txt
│   │   ├── ...
│   │   └── MOT20-08.txt
│   └── faster_rcnn_fpn_training_mot_20_split_05
│       └── MOT20-05.txt
├── faster_rcnn_fpn_training_mot_17
│   ├── model_epoch_27.model
│   ├── MOT17-01.txt
│   ├── MOT17-02.txt
│   ├── ...
│   └── MOT17-14.txt
├── faster_rcnn_fpn_training_mot_20
│   ├── model_epoch_27.model
│   ├── MOT20-01.txt
│   ├── MOT20-02.txt
│   ├── ...
│   └── MOT20-08.txt
└── tracktor
    ├── MOT17
    │   └── Tracktor++
    │       ├── MOT17-01-DPM.txt
    │       ├── MOT17-01-FRCNN.txt
    │       ├── MOT17-01-SDP.txt
    │       ├── MOT17-02-DPM.txt
    │       ├── MOT17-02-FRCNN.txt
    │       ├── MOT17-02-SDP.txt
    │       ├── ...
    │       ├── MOT17-14-DPM.txt
    │       ├── MOT17-14-FRCNN.txt
    │       ├── MOT17-14-SDP.txt
    │       └── sacred_config.yaml
    ├── MOT20
    │   └── Tracktor++
    │       ├── MOT20-01.txt
    │       ├── MOT20-02.txt
    │       ├── ...
    │       └── MOT20-08.txt
    └── reid
        └── res50-mot17-batch_hard
            ├── ResNet_iter_25245.pth
            └── sacred_config.yaml

@timmeinhardt
Copy link
Collaborator

Does the tracktor/reid/res50-mot17-batch_hard/sacred_config.yaml include the model_args field? And did you pull the latest version of the code and download the most recent models files (tracking_wo_bnw-output_v4.zip).

@ma7dev
Copy link
Author

ma7dev commented Apr 10, 2021

Yes. I did and I think I have pulled the latest version with tracking_wo_bnw-output_v4.zip.

reid:
  cnn:
    output_dim: 128
  dataloader:
    K: 4
    P: 18
    crop_H: 256
    crop_W: 128
    max_per_person: 1000
    normalize_mean:
    - 0.485
    - 0.456
    - 0.406
    normalize_std:
    - 0.229
    - 0.224
    - 0.225
    transform: random
    vis_threshold: 0.3
  db_train: train
  db_val: false
  desription: all
  lr_scheduler: true
  max_epochs: 69
  model_args:
    loss: batch_hard
    margin: 0.2
    prec_at_k: 3
  module_name: reid
  name: res50-mot17-batch_hard
  seed: 12345
  solver:
    optim: Adam
    optim_args:
      lr: 0.0003
      weight_decay: 0.0
seed: 453695

I will nuke the folder and do it again to ensure that my setup is right, then I will update you.

@timmeinhardt
Copy link
Collaborator

This reid config file is not the latest version. I still includes all config params under a reid top entry. Please try do download tracking_wo_bnw-output_v4.zip again.

@ma7dev
Copy link
Author

ma7dev commented Apr 21, 2021

I have recloned the repo, installed the packages, and downloaded the .zip file. I got this error after loading the data:

INFO - main - Tracks found: 71
INFO - main - Runtime for MOT17-02-FRCNN: 270.50 s.
INFO - main - Writing predictions to: /home/USER/Projects/tmp/tracking_wo_bnw/output/tracktor/MOT17/Tracktor++
ERROR - test_tracktor - Failed after 0:04:53!
Traceback (most recent calls WITHOUT Sacred internals):
  File "experiments/scripts/test_tracktor.py", line 150, in main
    mot_accums.append(get_mot_accum(results, seq))
  File "/home/USER/Projects/tmp/tracking_wo_bnw/src/tracktor/utils.py", line 449, in get_mot_accum
    distance)
  File "/home/USER/miniconda3/envs/two/lib/python3.7/site-packages/motmetrics/mot.py", line 194, in update
    rids, cids = linear_sum_assignment(dists)
  File "/home/USER/miniconda3/envs/two/lib/python3.7/site-packages/motmetrics/lap.py", line 31, in linear_sum_assignment
    return solver(costs)
  File "/home/USER/miniconda3/envs/two/lib/python3.7/site-packages/motmetrics/lap.py", line 133, in lsa_solve_lapjv
    from lap import lapjv
  File "/home/USER/miniconda3/envs/two/lib/python3.7/site-packages/lap/__init__.py", line 25, in <module>
    from ._lapjv import (
  File "__init__.pxd", line 199, in init lap._lapjv
ValueError: numpy.ndarray has the wrong size, try recompiling. Expected 80, got 88

@timmeinhardt
Copy link
Collaborator

I just tested the code and it is working for me. Did you install the proper versions of all packages?

@ma7dev
Copy link
Author

ma7dev commented Apr 22, 2021

I have followed the same instructions.

Here are my packages for the conda env.
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                        main  
absl-py                   0.11.0                   pypi_0    pypi
astroid                   2.4.2                    pypi_0    pypi
attrs                     19.3.0                   pypi_0    pypi
backcall                  0.1.0                    pypi_0    pypi
beautifulsoup4            4.8.1                    pypi_0    pypi
blas                      1.0                         mkl  
bleach                    3.1.0                    pypi_0    pypi
ca-certificates           2021.4.13            h06a4308_1  
cachetools                3.1.1                    pypi_0    pypi
certifi                   2020.12.5        py37h06a4308_0  
chardet                   4.0.0                    pypi_0    pypi
colorama                  0.4.1                    pypi_0    pypi
cudatoolkit               10.1.243             h6bb024c_0  
cycler                    0.10.0                   pypi_0    pypi
cython                    0.29.16                  pypi_0    pypi
decorator                 4.4.1                    pypi_0    pypi
defusedxml                0.6.0                    pypi_0    pypi
docopt                    0.6.2                    pypi_0    pypi
easydict                  1.9                      pypi_0    pypi
entrypoints               0.3                      pypi_0    pypi
enum34                    1.1.6                    pypi_0    pypi
freetype                  2.10.4               h5ab3b9f_0  
future                    0.18.2                   pypi_0    pypi
gitdb2                    2.0.6                    pypi_0    pypi
gitpython                 3.0.5                    pypi_0    pypi
google                    2.0.2                    pypi_0    pypi
google-auth               1.26.1                   pypi_0    pypi
google-auth-oauthlib      0.4.2                    pypi_0    pypi
grpcio                    1.35.0                   pypi_0    pypi
h5py                      2.10.0                   pypi_0    pypi
idna                      2.10                     pypi_0    pypi
importlib-metadata        0.23                     pypi_0    pypi
intel-openmp              2020.2                      254  
ipykernel                 5.1.3                    pypi_0    pypi
ipython                   7.13.0                   pypi_0    pypi
ipython-genutils          0.2.0                    pypi_0    pypi
ipywidgets                7.5.1                    pypi_0    pypi
isort                     5.6.4                    pypi_0    pypi
jedi                      0.15.1                   pypi_0    pypi
jinja2                    2.10.3                   pypi_0    pypi
jpeg                      9b                   h024ee3a_2  
jsonpickle                0.9.6                    pypi_0    pypi
jsonschema                3.1.1                    pypi_0    pypi
jupyter                   1.0.0                    pypi_0    pypi
jupyter-client            5.3.4                    pypi_0    pypi
jupyter-console           6.0.0                    pypi_0    pypi
jupyter-core              4.6.1                    pypi_0    pypi
jupyter-http-over-ws      0.0.6                    pypi_0    pypi
kiwisolver                1.1.0                    pypi_0    pypi
lap                       0.4.0                    pypi_0    pypi
lapsolver                 1.0.2                    pypi_0    pypi
lazy-object-proxy         1.4.3                    pypi_0    pypi
lcms2                     2.12                 h3be6417_0  
ld_impl_linux-64          2.33.1               h53a641e_7  
libffi                    3.3                  he6710b0_2  
libgcc-ng                 9.1.0                hdf63c60_0  
libpng                    1.6.37               hbc83047_0  
libstdcxx-ng              9.1.0                hdf63c60_0  
libtiff                   4.1.0                h2733197_1  
lz4-c                     1.9.3                h2531618_0  
markdown                  3.3.3                    pypi_0    pypi
markupsafe                1.1.1                    pypi_0    pypi
matplotlib                3.1.1                    pypi_0    pypi
mccabe                    0.6.1                    pypi_0    pypi
mistune                   0.8.4                    pypi_0    pypi
mkl                       2020.2                      256  
mkl-service               2.3.0            py37he8ac12f_0  
mkl_fft                   1.3.0            py37h54f3939_0  
mkl_random                1.1.1            py37h0573a6f_0  
more-itertools            7.2.0                    pypi_0    pypi
motmetrics                1.1.3                    pypi_0    pypi
munch                     2.5.0                    pypi_0    pypi
munkres                   1.1.2                    pypi_0    pypi
nbconvert                 5.6.1                    pypi_0    pypi
nbformat                  4.4.0                    pypi_0    pypi
ncurses                   6.2                  he6710b0_1  
ninja                     1.10.2               hff7bd54_1  
notebook                  6.0.2                    pypi_0    pypi
numpy                     1.17.4                   pypi_0    pypi
numpy-base                1.19.2           py37hfa32c7d_0  
oauthlib                  3.1.0                    pypi_0    pypi
olefile                   0.46                     py37_0  
opencv-python             4.0.1.24                 pypi_0    pypi
openssl                   1.1.1k               h27cfd23_0  
packaging                 19.2                     pypi_0    pypi
pandas                    0.25.3                   pypi_0    pypi
pandocfilters             1.4.2                    pypi_0    pypi
parso                     0.5.1                    pypi_0    pypi
pexpect                   4.7.0                    pypi_0    pypi
pickleshare               0.7.5                    pypi_0    pypi
pillow                    6.2.1                    pypi_0    pypi
pip                       21.0.1           py37h06a4308_0  
prometheus-client         0.7.1                    pypi_0    pypi
prompt-toolkit            2.0.10                   pypi_0    pypi
protobuf                  3.11.2                   pypi_0    pypi
ptyprocess                0.6.0                    pypi_0    pypi
py-cpuinfo                5.0.0                    pypi_0    pypi
pyasn1                    0.4.8                    pypi_0    pypi
pyasn1-modules            0.2.7                    pypi_0    pypi
pycocotools               2.0.2                    pypi_0    pypi
pygments                  2.4.2                    pypi_0    pypi
pylint                    2.6.0                    pypi_0    pypi
pyparsing                 2.4.5                    pypi_0    pypi
pyrsistent                0.15.5                   pypi_0    pypi
python                    3.7.10               hdb3f193_0  
python-dateutil           2.8.1                    pypi_0    pypi
pytorch                   1.6.0           py3.7_cuda10.1.243_cudnn7.6.3_0    pytorch
pytz                      2019.3                   pypi_0    pypi
pyyaml                    5.1.2                    pypi_0    pypi
pyzmq                     18.1.1                   pypi_0    pypi
qtconsole                 4.5.5                    pypi_0    pypi
readline                  8.1                  h27cfd23_0  
requests                  2.25.1                   pypi_0    pypi
requests-oauthlib         1.3.0                    pypi_0    pypi
rsa                       4.0                      pypi_0    pypi
sacred                    0.8.0                    pypi_0    pypi
scipy                     1.3.2                    pypi_0    pypi
send2trash                1.5.0                    pypi_0    pypi
setuptools                52.0.0           py37h06a4308_0  
simplegeneric             0.8.1                    pypi_0    pypi
six                       1.14.0                   pypi_0    pypi
smmap2                    2.0.5                    pypi_0    pypi
soupsieve                 1.9.5                    pypi_0    pypi
sqlite                    3.35.4               hdfb4753_0  
tensorboard               2.4.1                    pypi_0    pypi
tensorboard-plugin-wit    1.8.0                    pypi_0    pypi
tensorboardx              2.0                      pypi_0    pypi
terminado                 0.8.3                    pypi_0    pypi
testpath                  0.4.4                    pypi_0    pypi
tk                        8.6.10               hbc83047_0  
toml                      0.10.2                   pypi_0    pypi
torchvision               0.7.0                py37_cu101    pytorch
tornado                   6.0.4                    pypi_0    pypi
tqdm                      4.38.0                   pypi_0    pypi
tracktor                  0.0.1                     dev_0    <develop>
traitlets                 4.3.3                    pypi_0    pypi
typed-ast                 1.4.1                    pypi_0    pypi
urllib3                   1.26.3                   pypi_0    pypi
wcwidth                   0.1.9                    pypi_0    pypi
webencodings              0.5.1                    pypi_0    pypi
werkzeug                  1.0.1                    pypi_0    pypi
wheel                     0.36.2             pyhd3eb1b0_0  
widgetsnbextension        3.5.1                    pypi_0    pypi
wrapt                     1.11.2                   pypi_0    pypi
xz                        5.2.5                h7b6447c_0  
zipp                      0.6.0                    pypi_0    pypi
zlib                      1.2.11               h7b6447c_3  
zstd                      1.4.9                haebb681_0  
CUDA version when running `nvcc --version`:
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Sun_Jul_28_19:07:16_PDT_2019
Cuda compilation tools, release 10.1, V10.1.243

@timmeinhardt
Copy link
Collaborator

The tracking seems to be working fine. You are supposed to track 71 objects on MOT17-02 with default configurations. But something is off with the evaluation.

@kytimmylai
Copy link

kytimmylai commented Jun 1, 2021

Update your numpy to 1.20.3 can solve the problem.

@utkarsh-mishra9
Copy link

I am facing the same issue and updated my numpy to 1.20.3 but it still is not working. Any solution?

@timmeinhardt
Copy link
Collaborator

Please double check all your package versions and see if they are the same the ones used in the requirements.txt. If you are using anaconda try setting up a virtualenv instead and follow the installation steps exactly.

@LiXinrong1012
Copy link

same problem with mine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants