Open Thecoder1012 opened 1 year ago
Without any code, it's difficult to provide a solution to the error you're facing. Could you provide some code or more information?
I was just running your code that you have uploaded and facing this error.
Are you running the code on Colab or locally?
I have checked it locally
Try running it on Colab as there might be an issue with the requirements.txt file. Just to mention, I too developed the project using Colab.
Checked the code in colab but still the issue is there
WARNING ⚠️ Environment does not support cv2.imshow() or PIL Image.show()
ValueError Traceback (most recent call last)
1 frames
ValueError: too many values to unpack (expected 4)
I have problems in this part. Can you help me?
vehicle_count(source_path = "Data/Example Videos/test1.mp4", destination_path = "Data/Example Results", line_start = (337, 391), line_end = (917, 387))
error: requirements: YOLOv8 requirement "lap>=0.4" not found, attempting AutoUpdate... requirements: Command 'pip install --no-cache "lap>=0.4" ' returned non-zero exit status 1. ModuleNotFoundError: No module named 'lap'
can't install lap
Hi Umar, I was trying to run your code but getting the error Traceback (most recent call last): File "/home/thecoder/Sample/yolov8_bytetracker.py", line 108, in
vehicle_count(source_path = "data/src/test1.mp4",
File "/home/thecoder/Sample/yolov8_bytetracker.py", line 68, in vehicle_count
for result in model.track(source = source_path, tracker = 'bytetrack.yaml', show=True, stream=True, agnostic_nms=True):
File "/home/thecoder/.local/lib/python3.10/site-packages/torch/autograd/grad_mode.py", line 43, in generator_context
response = gen.send(None)
File "/home/thecoder/.local/lib/python3.10/site-packages/ultralytics/yolo/engine/predictor.py", line 217, in stream_inference
self.run_callbacks('on_predict_postprocess_end')
File "/home/thecoder/.local/lib/python3.10/site-packages/ultralytics/yolo/engine/predictor.py", line 308, in run_callbacks
callback(self)
File "/home/thecoder/.local/lib/python3.10/site-packages/ultralytics/tracker/track.py", line 51, in on_predict_postprocess_end
predictor.results[i] = predictor.results[i][idx]
File "/home/thecoder/.local/lib/python3.10/site-packages/ultralytics/yolo/engine/results.py", line 114, in getitem
setattr(r, k, getattr(self, k)[idx])
File "/home/thecoder/.local/lib/python3.10/site-packages/ultralytics/yolo/engine/results.py", line 64, in getitem
return self.class(self.data[idx], self.orig_shape)
TypeError: 'float' object cannot be interpreted as an integer
Can you solve it?