xingyizhou/CenterTrack

import error in test.py (docker environment)

yktangac opened this issue · 3 comments

Hi, I met some issue with the test.py.
I used docker to create this CenterTrack environment.
I am sure that I did install this package but it can't be reached for some reason.
I run pip3 show package_name to check whether it exits or not:

pip3 show motmetrics
Name: motmetrics
Version: 1.2.0
Summary: Metrics for multiple object tracker benchmarking.
Home-page: https://github.com/cheind/py-motmetrics
Author: Christoph Heindl, Jack Valmadre
Author-email: UNKNOWN
License: MIT
Location: /usr/local/lib/python3.6/dist-packages
Requires: xmltodict, flake8-import-order, pytest, scipy, pandas, numpy, flake8, pytest-benchmark

when I run python3 test.py:

Traceback (most recent call last):
 File "tools/eval_motchallenge.py", line 11, in <module>
 import motmetrics as mm
ImportError: No module named motmetrics

I created one way to do that:
https://github.com/bryanbocao/CenterTrack/blob/master/readme/Docker.md
#290

Run CenterTrack using Docker

DCNv2 Compilation Issue Fixed

docker pull bryanbocao/centertrack
docker run -d --ipc=host --shm-size=16384m -it -v /:/share --gpus all --network=bridge bryanbocao/centertrack /bin/bash
docker ps -a

Check <CONTAINER_ID>:

CONTAINER ID   IMAGE                    COMMAND                  CREATED          STATUS                       PORTS                NAMES
89bb79551ccb   bryanbocao/centertrack   "/usr/local/bin/nvid…"   49 seconds ago   Up 38 seconds                6006/tcp, 8888/tcp   competent_northcutt
docker exec -it <CONTAINE_ID> /bin/bash
docker exec -it 89bb79551ccb /bin/bash

Inside the container:

cd /root/CenterTrack/src/lib/model/networks/DCNv2
python3 setup.py build develop
cd /root/CenterTrack/src/
python3 demo.py tracking,ddd --load_model ../models/nuScenes_3Dtracking.pth --dataset nuscenes --pre_hm --track_thresh 0.1 --demo ../videos/nuscenes_mini.mp4 --test_focal_length 633

The DCNv2 is built from MatthewHowe_DCNv2. Thanks MatthewHowe for the contribution.
Then you should be able to see the results.

Go to /share to transfer data between the container and your root system.

I created one way to do that: https://github.com/bryanbocao/CenterTrack/blob/master/readme/Docker.md #290

Run CenterTrack using Docker

DCNv2 Compilation Issue Fixed

docker pull bryanbocao/centertrack
docker run -d --ipc=host --shm-size=16384m -it -v /:/share --gpus all --network=bridge bryanbocao/centertrack /bin/bash
docker ps -a

Check <CONTAINER_ID>:

CONTAINER ID   IMAGE                    COMMAND                  CREATED          STATUS                       PORTS                NAMES
89bb79551ccb   bryanbocao/centertrack   "/usr/local/bin/nvid…"   49 seconds ago   Up 38 seconds                6006/tcp, 8888/tcp   competent_northcutt
docker exec -it <CONTAINE_ID> /bin/bash
docker exec -it 89bb79551ccb /bin/bash

Inside the container:

cd /root/CenterTrack/src/lib/model/networks/DCNv2
python3 setup.py build develop
cd /root/CenterTrack/src/
python3 demo.py tracking,ddd --load_model ../models/nuScenes_3Dtracking.pth --dataset nuscenes --pre_hm --track_thresh 0.1 --demo ../videos/nuscenes_mini.mp4 --test_focal_length 633

The DCNv2 is built from MatthewHowe_DCNv2. Thanks MatthewHowe for the contribution. Then you should be able to see the results.

Go to /share to transfer data between the container and your root system.

Thanks I am able to run it but get the following error with the --save_video flag
OpenCV: FFMPEG: tag 0x34363248/'H264' is not supported with codec id 27 and format 'mp4 / MP4 (MPEG-4 Part 14)'
OpenCV: FFMPEG: fallback to use tag 0x31637661/'avc1'

I never tried using the --save_video flag.

May try to follow

voObj = cv2.VideoWriter('output.mp4', 0x00000021, 15.0, (1280,360))

with

0x31637661

posted in
https://forums.developer.nvidia.com/t/python-what-is-the-four-characters-fourcc-code-for-mp4-encoding-on-tx2/57701/3 ?