LCFractal / AIC21-MTMC

🏆The 1st place solution of track3 (City-Scale Multi-Camera Vehicle Tracking) in the NVIDIA AI City Challenge at CVPR 2021 Workshop.
MIT License
126 stars 36 forks source link

No such file or directory: 'test_cluster.pkl' #16

Open cmtsai opened 2 years ago

cmtsai commented 2 years ago

Thanks for your great project, and I was trying to reproduce the results. When I run bash run_mcmt.sh, it produce as follows:

gen_det.sh: 1: gen_det.sh: Syntax error: "(" unexpected run_aic.sh: 3: run_aic.sh: Syntax error: "(" unexpected processing c041... /data/aicity2021/AIC21_Track3/AIC21-MTMC/datasets/detect_provided/c041/c041_mot_feat_break.pkl Traceback (most recent call last): File "trajectory_fusion.py", line 71, in mot_list = zones.break_mot(mot_list, cid) File "/data/aicity2021/AIC21_Track3/AIC21-MTMC/reid/reid-matching/tools/utils/zone_intra.py", line 178, in break_mot new_num_tracklets = max(mot_list)+1 ValueError: max() arg is an empty sequence Traceback (most recent call last): File "sub_cluster.py", line 146, in lines = pickle.load(f) EOFError: Ran out of input Traceback (most recent call last): File "gen_res.py", line 40, in map_tid = pickle.load(open('test_cluster.pkl', 'rb'))['cluster'] FileNotFoundError: [Errno 2] No such file or directory: 'test_cluster.pkl'

Where to obtain or produce 'test_cluster.pkl'?

LCFractal commented 2 years ago

test_cluster.pkl is an intermediate file generated when the program is running. Please make sure that the previous code runs successfully. The program can run in my environment, maybe you need to debug accordingly according to your environment.

cmtsai commented 2 years ago

Please share your environment. What are your running steps?

fubel commented 2 years ago

Seems like this can be fixed by changing

mot_path = opj(data_dir, cam_path, "{}_mot_feat.pkl".format(cam_path))

to

mot_path = opj(data_dir, cam_path, "{}_dets_feat.pkl".format(cam_path))

in trajectory_fusion.py:66

Then the script runs fine, however, IDF1 is very low when uploading the results (<1%), so it seems like there is some issue with the provided pickles.

kanonjz commented 2 years ago

Seems like this can be fixed by changing

mot_path = opj(data_dir, cam_path, "{}_mot_feat.pkl".format(cam_path))

to

mot_path = opj(data_dir, cam_path, "{}_dets_feat.pkl".format(cam_path))

in trajectory_fusion.py:66

Then the script runs fine, however, IDF1 is very low when uploading the results (<1%), so it seems like there is some issue with the provided pickles.

Hi fubel, I did as you said and it does work.

But it still encounters an error when I run bash run_mcmt.sh:

[[nan nan nan ... nan nan nan]
 [nan nan nan ... nan nan nan]
 [nan nan nan ... nan nan nan]
 ...
 [nan nan nan ... nan nan nan]
 [nan nan nan ... nan nan nan]
 [nan nan nan ... nan nan nan]]
Traceback (most recent call last):
  File "sub_cluster.py", line 154, in <module>
    clu = get_labels(cfg,cid_tid_dict,cid_tids,score_thr=cfg.SCORE_THR)
  File "sub_cluster.py", line 106, in get_labels
    linkage='complete').fit_predict(1 - sim_matrix)
  File "/home/ubuntu/anaconda3/envs/torch/lib/python3.7/site-packages/sklearn/cluster/_agglomerative.py", line 1054, in fit_predict
    return super().fit_predict(X, y)
  File "/home/ubuntu/anaconda3/envs/torch/lib/python3.7/site-packages/sklearn/base.py", line 736, in fit_predict
    self.fit(X)
  File "/home/ubuntu/anaconda3/envs/torch/lib/python3.7/site-packages/sklearn/cluster/_agglomerative.py", line 917, in fit
    X = self._validate_data(X, ensure_min_samples=2, estimator=self)
  File "/home/ubuntu/anaconda3/envs/torch/lib/python3.7/site-packages/sklearn/base.py", line 566, in _validate_data
    X = check_array(X, **check_params)
  File "/home/ubuntu/anaconda3/envs/torch/lib/python3.7/site-packages/sklearn/utils/validation.py", line 800, in check_array
    _assert_all_finite(array, allow_nan=force_all_finite == "allow-nan")
  File "/home/ubuntu/anaconda3/envs/torch/lib/python3.7/site-packages/sklearn/utils/validation.py", line 116, in _assert_all_finite
    type_err, msg_dtype if msg_dtype is not None else X.dtype
ValueError: Input contains NaN, infinity or a value too large for dtype('float32').
Traceback (most recent call last):
  File "gen_res.py", line 40, in <module>
    map_tid = pickle.load(open('test_cluster.pkl', 'rb'))['cluster']
FileNotFoundError: [Errno 2] No such file or directory: 'test_cluster.pkl'

How did you solve it? Thanks.

LCFractal commented 2 years ago

Seems like this can be fixed by changing

mot_path = opj(data_dir, cam_path, "{}_mot_feat.pkl".format(cam_path))

to

mot_path = opj(data_dir, cam_path, "{}_dets_feat.pkl".format(cam_path))

in trajectory_fusion.py:66

Then the script runs fine, however, IDF1 is very low when uploading the results (<1%), so it seems like there is some issue with the provided pickles.

@fubel @kanonjz "{}_mot_feat.pkl" cannot be replaced by "{}_dets_feat.pkl" "{}_mot_feat.pkl" is the single-camera tracking trajectory generated by "run_aic.sh" Please confirm that "run_aic.sh" generates the correct pkl file in the correct path

Our code runs on centos, if you use ubuntu maybe try this: https://github.com/LCFractal/AIC21-MTMC/issues/14#issuecomment-1044210105

zhen256 commented 2 years ago

似乎可以通过更改来修复此问题

mot_path = opj(data_dir, cam_path, "{}_mot_feat.pkl".format(cam_path))

mot_path = opj(data_dir, cam_path, "{}_dets_feat.pkl".format(cam_path))

trajectory_fusion.py:66 然后脚本运行良好,但是,上传结果时IDF1非常低(<1%),因此提供的泡菜似乎存在一些问题。

嗨,fubel,我按照你说的做了,它确实有效。

但是当我运行bash run_mcmt.sh时,它仍然遇到错误:

[[nan nan nan ... nan nan nan]
 [nan nan nan ... nan nan nan]
 [nan nan nan ... nan nan nan]
 ...
 [nan nan nan ... nan nan nan]
 [nan nan nan ... nan nan nan]
 [nan nan nan ... nan nan nan]]
Traceback (most recent call last):
  File "sub_cluster.py", line 154, in <module>
    clu = get_labels(cfg,cid_tid_dict,cid_tids,score_thr=cfg.SCORE_THR)
  File "sub_cluster.py", line 106, in get_labels
    linkage='complete').fit_predict(1 - sim_matrix)
  File "/home/ubuntu/anaconda3/envs/torch/lib/python3.7/site-packages/sklearn/cluster/_agglomerative.py", line 1054, in fit_predict
    return super().fit_predict(X, y)
  File "/home/ubuntu/anaconda3/envs/torch/lib/python3.7/site-packages/sklearn/base.py", line 736, in fit_predict
    self.fit(X)
  File "/home/ubuntu/anaconda3/envs/torch/lib/python3.7/site-packages/sklearn/cluster/_agglomerative.py", line 917, in fit
    X = self._validate_data(X, ensure_min_samples=2, estimator=self)
  File "/home/ubuntu/anaconda3/envs/torch/lib/python3.7/site-packages/sklearn/base.py", line 566, in _validate_data
    X = check_array(X, **check_params)
  File "/home/ubuntu/anaconda3/envs/torch/lib/python3.7/site-packages/sklearn/utils/validation.py", line 800, in check_array
    _assert_all_finite(array, allow_nan=force_all_finite == "allow-nan")
  File "/home/ubuntu/anaconda3/envs/torch/lib/python3.7/site-packages/sklearn/utils/validation.py", line 116, in _assert_all_finite
    type_err, msg_dtype if msg_dtype is not None else X.dtype
ValueError: Input contains NaN, infinity or a value too large for dtype('float32').
Traceback (most recent call last):
  File "gen_res.py", line 40, in <module>
    map_tid = pickle.load(open('test_cluster.pkl', 'rb'))['cluster']
FileNotFoundError: [Errno 2] No such file or directory: 'test_cluster.pkl'

你是怎么解决的?谢谢。 我也遇到了相同的问题,请问你解决了吗

zhen256 commented 2 years ago

我也遇到了相同的问题,请问你解决了吗

WanqingZhang commented 1 year ago

I have the same problem, have you solved it?

Hyperjunct commented 1 year ago

Thanks for your great project, and I was trying to reproduce the results. When I run bash run_mcmt.sh, it produce as follows:

gen_det.sh: 1: gen_det.sh: Syntax error: "(" unexpected run_aic.sh: 3: run_aic.sh: Syntax error: "(" unexpected processing c041... /data/aicity2021/AIC21_Track3/AIC21-MTMC/datasets/detect_provided/c041/c041_mot_feat_break.pkl Traceback (most recent call last): File "trajectory_fusion.py", line 71, in mot_list = zones.break_mot(mot_list, cid) File "/data/aicity2021/AIC21_Track3/AIC21-MTMC/reid/reid-matching/tools/utils/zone_intra.py", line 178, in break_mot new_num_tracklets = max(mot_list)+1 ValueError: max() arg is an empty sequence Traceback (most recent call last): File "sub_cluster.py", line 146, in lines = pickle.load(f) EOFError: Ran out of input Traceback (most recent call last): File "gen_res.py", line 40, in map_tid = pickle.load(open('test_cluster.pkl', 'rb'))['cluster'] FileNotFoundError: [Errno 2] No such file or directory: 'test_cluster.pkl'

Where to obtain or produce 'test_cluster.pkl'?

I just met the same problem, did you find the way to solve it? Thanks.

sxy233666 commented 1 year ago

Thanks for your great project, and I was trying to reproduce the results. When I run bash run_mcmt.sh, it produce as follows: gen_det.sh: 1: gen_det.sh: Syntax error: "(" unexpected run_aic.sh: 3: run_aic.sh: Syntax error: "(" unexpected processing c041... /data/aicity2021/AIC21_Track3/AIC21-MTMC/datasets/detect_provided/c041/c041_mot_feat_break.pkl Traceback (most recent call last): File "trajectory_fusion.py", line 71, in mot_list = zones.break_mot(mot_list, cid) File "/data/aicity2021/AIC21_Track3/AIC21-MTMC/reid/reid-matching/tools/utils/zone_intra.py", line 178, in break_mot new_num_tracklets = max(mot_list)+1 ValueError: max() arg is an empty sequence Traceback (most recent call last): File "sub_cluster.py", line 146, in lines = pickle.load(f) EOFError: Ran out of input Traceback (most recent call last): File "gen_res.py", line 40, in map_tid = pickle.load(open('test_cluster.pkl', 'rb'))['cluster'] FileNotFoundError: [Errno 2] No such file or directory: 'test_cluster.pkl' Where to obtain or produce 'test_cluster.pkl'?

I just met the same problem, did you find the way to solve it? Thanks.

I've met the same problem, did you solve it?

LCFractal commented 1 year ago

Maybe you can try this solution: https://github.com/LCFractal/AIC21-MTMC/issues/14#issuecomment-1044210105

sxy233666 commented 1 year ago

Maybe you can try this solution: #14 (comment)

我试过了,但是这个错误还是存在,在这个错误之前有这两种类型的报错: No such file or directory: '/home/sxy233666/Downloads/AIC21-MTMC/datasets/detection/images/test/S06/c042/img1' 和 No such file or directory: '/home/sxy233666/Downloads/AIC21-MTMC/datasets/detect_provided/c046/c046_mot_feat_raw.pkl' 这个两个报错是不是因为中间文件没产生呢

LCFractal commented 1 year ago

test_cluster.pkl也是前面命令执行产生的中间文件,因为批处理即使前面执行错误也会执行后面的命令,所以要先确保前面所有的命令都有正确输出结果。我无法给出具体的建议,前面的报错看起来是detection之类的执行有误。

LPfly0822 commented 3 months ago

test_cluster.pkl是程序运行时生成的中间文件。请确保前面的代码能够成功运行。程序可以在我的环境中运行,也许你需要根据你的环境进行相应的调试。

Hello, there is no timestamp file in the data set I downloaded. Can you provide one? If so, thank you very much.