ifzhang / FairMOT

[IJCV-2021] FairMOT: On the Fairness of Detection and Re-Identification in Multi-Object Tracking
MIT License
3.96k stars 930 forks source link

AttributeError: 'LoadImages' object has no attribute 'files' #405

Open devdut1999 opened 3 years ago

devdut1999 commented 3 years ago

want to try the default settings to run track.py. python track.py mot --test_mot17 True --load_model ../models/fairmot_dla34.pth --conf_thres 0.4 (I have executed the “python gen_labels_16.py” command on MOT17 data as the code for generating labels is the same) Then I got such an error : Fix size testing. training chunk_sizes: [6, 6] The output will be saved to /content/drive/My Drive/FAIRMOT_ROOT/src/lib/../../exp/mot/default heads {'hm': 1, 'wh': 4, 'id': 128, 'reg': 2} 2021-06-24 17:21:55 [INFO]: start seq: MOT17-02-SDP Traceback (most recent call last): File "track.py", line 271, in save_videos=True) File "track.py", line 134, in main dataloader = datasets.LoadImages(osp.join(data_root, seq, 'img1'), opt.img_size) File "/content/drive/My Drive/FAIRMOT_ROOT/src/lib/datasets/dataset/jde.py", line 32, in init self.nF = len(self.files) # number of image files AttributeError: 'LoadImages' object has no attribute 'files'

I changed the "data_dir" in opts.py. It still doesn't work. On line 127. self.parser.add_argument('--data_dir', type=str, default='../src/data') Please help.

zengjie617789 commented 3 years ago

you should check wether the file exist is under certain dir

utkarsh-mishra9 commented 2 years ago

@devdut1999 were you able to solve this issue? Do let me know how? I'll be grateful

lilingdu commented 2 years ago

Hi, I have the same issue and don't know how to solve it,please help here.

lilingdu commented 2 years ago

@devdut1999 ,solved it or not?

xlabd commented 1 year ago

You'll have to set --val_mot17 as false in opts.py.

Hardcode the value in the script, as passing anything via command line takes it as string, and not boolean.

Hemilibeatriz commented 4 weeks ago

Você terá que definir --val_mot17como falseem opts.py .

Codifique o valor no script, pois passe qualquer coisa via linha de comando o considere uma string, e não um booleano.

This doesn't seem to work to correct this issue. Do I have to change anything else? image