KevinQian97 / ELECTRICITY-MTMC

ELECTRICITY: An Efficient Multi-camera Vehicle Tracking System for Intelligent City(CVPR 2020 AI City Challenge Track 3)
Other
113 stars 18 forks source link

model_final_a3ec72.pkl #3

Closed HanwenCao closed 4 years ago

HanwenCao commented 4 years ago

Hi! I tried to run "test.bash" and it used too much time to download "model_final_a3ec72.pkl". Although it did not succeeded because of the timeout error (Wait time out after 600 seconds). I was wondering what is this pkl file for? Could I bypass the slow downloading? Thank you!

2020-07-25 14:22:52,011 __main__ INFO Testing with args: ['/data/caohw9/track3_dataset/test/S06', '/code/ELECTRICITY-MTMC/exp/file-list.txt', '/code/ELECTRICITY-MTMC/exp/tracklets.txt'] 2020-07-25 14:22:52,013 ELECTRICITY-MTMC.utils.run INFO Running with args: Namespace(cache_dir=None, dataset_dir='/data/caohw9/track3_dataset/test/S06', expand=0, frame_timeout=100, init_timeout=600, min_track_length=20, silent=False, stride=1, system_output='/code/ELECTRICITY-MTMC/exp/tracklets.txt', video_list_file='/code/ELECTRICITY-MTMC/exp/file-list.txt') 2020-07-25 14:22:55,239 VideoSystem WARNING 4 gpus requested, but only 1 gpus (gpu id: [0]) available 2020-07-25 14:22:55,239 ELECTRICITY-MTMC.utils.run INFO Running 6 jobs 2020-07-25 14:22:55,241 VideoSystem INFO System initializing ... model_final_a3ec72.pkl: 13%|#6 | 33.1M/254M [09:47<1:45:34, 34.9kB/s]

Lijun-Yu commented 4 years ago

Hi Hanwen, the pickle file is the weights of the Mask R-CNN detector from detectron2. The slow downloading is probably caused by the GFW, so using some proxy may improve it. You may also find another way to manually download the pkl file, put it in some directory, and set environment variable FVCORE_CACHE to that directory.

HanwenCao commented 4 years ago

Hi Hanwen, the pickle file is the weights of the Mask R-CNN detector from detectron2. The slow downloading is probably caused by the GFW, so using some proxy may improve it. You may also find another way to manually download the pkl file, put it in some directory, and set environment variable FVCORE_CACHE to that directory.

Hi Lijun, Thanks for your very quick reply. The second solution seems good. I found the download link : https://dl.fbaipublicfiles.com/detectron2/COCO-InstanceSegmentation/mask_rcnn_R_101_FPN_3x/138205316/model_final_a3ec72.pkl which seems to match the one in your implementation. However, I am SUPER new to detectron2. Could you please explain how I should set environment variable FVCORE_CACHE?

Lijun-Yu commented 4 years ago

Yep, that should be the correct file. Say you put that file at /data/model_final_a3ec72.pkl, then you should set FVCORE_CACHE to /data. Run by FVCORE_CACHE=/data ./test.bash should be enough. You can also try setting it in python via os.environ['FVCORE_CACHE'] = '/data' at the top line.

HanwenCao commented 4 years ago

Yep, that should be the correct file. Say you put that file at /data/model_final_a3ec72.pkl, then you should set FVCORE_CACHE to /data. Run by FVCORE_CACHE=/data ./test.bash should be enough. You can also try setting it in python via os.environ['FVCORE_CACHE'] = '/data' at the top line.

Thank you so much. But it did not work. I am not sure if I am doing right. Here is what I did.

  1. I put the file at /data/caohw9/track3_torch/model_final_a3ec72.pkl
  2. I added a line at the top of test.sh. FVCORE_CACHE=/data/caohw9/track3_torch
  3. I ran bash test.sh. It did not work so I added os.environ['FVCORE_CACHE'] = '/data/caohw9/track3_torch' to the top of utils/test.py But it still did not work (still tried to download model_final_a3ec72.pkl).

I was wondering if I made some mistakes?

Lijun-Yu commented 4 years ago

I added a line at the top of test.sh. FVCORE_CACHE=/data/caohw9/track3_torch

You should use export FVCORE_CACHE=/data/caohw9/track3_torch, or the variable won't be passed into subprocesses.

HanwenCao commented 4 years ago

I added a line at the top of test.sh. FVCORE_CACHE=/data/caohw9/track3_torch

You should use export FVCORE_CACHE=/data/caohw9/track3_torch, or the variable won't be passed into subprocesses.

Hi Lijun, Thank you for your explanation. I just found that os.environ['FVCORE_CACHE'] = 'SOMEPATH' is helpful. However, the pkl file should under a specific structure: SOMEPATH/detectron2/COCO-InstanceSegmentation/mask_rcnn_R_101_FPN_3x/138205316/FILE.pkl Thanks!