Closed fesimsekasel closed 1 year ago
Hi @fesimsekasel, the issue appears to be in the LoadImages class, I believe the for loop is calling __getitem__ when it was intended to call __next__. If you include (dw, dh) to be returned in __getitem__, the problem should be solved. Or, you can simply remove (dw, dh) in the eval_seq() function.
Btw, this (dw, dh) is the padding that has been done on the input image (since the model takes a fixed resolution / aspect ratio). It is used to transform the bounding box coordinates so that they can be visualised nicely on the original image.
Hello @supperted825 , I fed .jpg images instead of.mp4 video and it just worked! I got the point and will change the variables as you described. Thank you for your support!
Sincerely
@fesimsekasel I see, if you feed a .mp4 video, it may be more appropriate to use the LoadVideo class that is located in the same file. However, I did not use it since all the BDD sequences are in image format, so you may need some adjustments to get it working.
Hello,
I have been trying to do inference on any video by using .zip and .pth files in the tag of the repo. I generated appropriate paths for the bdd100k dataset images and annotations and created results folder to save results. I cannot understand why I need informations about bdd100k dataset while trying to do inference on any video. I have got the followign error message: Could you please help me resolve this issue?
`Heads are Predefined in YOLOX! Length of the video: 1800 frames Using GPU: 0 Using CUDA device0 _CudaDeviceProperties(name='NVIDIA GeForce RTX 3090', total_memory=24265MB)
Creating model... Loading Model from /home/fatih/phd/fairmot-x-model/FairMOT-X-M.pth loaded /home/fatih/phd/fairmot-x-model/FairMOT-X-M.pth, epoch 20 No param head.id_classifiers.8.weight. No param head.id_classifiers.8.bias. No param head.id_classifiers.9.weight. No param head.id_classifiers.9.bias. Detection Loss Weight: Parameter containing: tensor([0.95408], requires_grad=True) ID Loss Weight: Parameter containing: tensor([-3.06940], requires_grad=True) Traceback (most recent call last): File "/home/fatih/phd/fairmot-x-model/FairMOT-X-Weights/./src/demo.py", line 123, in
run_demo(opt)
File "/home/fatih/phd/fairmot-x-model/FairMOT-X-Weights/./src/demo.py", line 89, in run_demo
eval_seq(opt=opt,
File "/home/fatih/phd/fairmot-x-model/FairMOT-X-Weights/src/track.py", line 171, in eval_seq
for path, img, img0, (dw, dh) in data_loader:
ValueError: not enough values to unpack (expected 4, got 3)`