Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning with gmc.py, line 273, not enough matching point. #90

Open
setarekhosravi opened this issue Oct 19, 2023 · 1 comment
Open

Warning with gmc.py, line 273, not enough matching point. #90

setarekhosravi opened this issue Oct 19, 2023 · 1 comment

Comments

@setarekhosravi
Copy link

I'm using the BoT-SORT tracking model using the YOLOv8 detection model. For some videos, I see this warning: "WARNING: not enough matching points"
and after that, I see this:

Traceback (most recent call last):
  File "/media/strh/MyDrive/Track/vision-YOLOv8_Evolve/vision/yolov8_track_third_cell.py", line 44, in <module>
    results = model.track(frame, persist=True, show=False, tracker="botsort.yaml", conf= 0, iou = 0.5)  # predict on an image
  File "/media/strh/MyDrive/Track/vision-YOLOv8_Evolve/vision/ultralytics/ultralytics/engine/model.py", line 262, in track
    return self.predict(source=source, stream=stream, **kwargs)
  File "/media/strh/MyDrive/Track/vision-YOLOv8_Evolve/vision/ultralytics/ultralytics/engine/model.py", line 242, in predict
    return self.predictor.predict_cli(source=source) if is_cli else self.predictor(source=source, stream=stream)
  File "/media/strh/MyDrive/Track/vision-YOLOv8_Evolve/vision/ultralytics/ultralytics/engine/predictor.py", line 196, in __call__
    return list(self.stream_inference(source, model, *args, **kwargs))  # merge list of Result into one
  File "/home/strh/anaconda3/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 35, in generator_context
    response = gen.send(None)
  File "/media/strh/MyDrive/Track/vision-YOLOv8_Evolve/vision/ultralytics/ultralytics/engine/predictor.py", line 264, in stream_inference
    self.run_callbacks('on_predict_postprocess_end')
  File "/media/strh/MyDrive/Track/vision-YOLOv8_Evolve/vision/ultralytics/ultralytics/engine/predictor.py", line 358, in run_callbacks
    callback(self)
  File "/media/strh/MyDrive/Track/vision-YOLOv8_Evolve/vision/ultralytics/ultralytics/trackers/track.py", line 48, in on_predict_postprocess_end
    tracks = predictor.trackers[i].update(det, im0s[i])
  File "/media/strh/MyDrive/Track/vision-YOLOv8_Evolve/vision/ultralytics/ultralytics/trackers/byte_tracker.py", line 278, in update
    warp = self.gmc.apply(img, dets)
  File "/media/strh/MyDrive/Track/vision-YOLOv8_Evolve/vision/ultralytics/ultralytics/trackers/utils/gmc.py", line 85, in apply
    return self.applySparseOptFlow(raw_frame, detections)
  File "/media/strh/MyDrive/Track/vision-YOLOv8_Evolve/vision/ultralytics/ultralytics/trackers/utils/gmc.py", line 273, in applySparseOptFlow
    matchedKeypoints, status, err = cv2.calcOpticalFlowPyrLK(self.prevFrame, frame, self.prevKeyPoints, None)
cv2.error: OpenCV(4.6.0) /croot/opencv-suite_1676452025216/work/modules/video/src/lkpyramid.cpp:1260: error: (-215:Assertion failed) (npoints = prevPtsMat.checkVector(2, CV_32F, true)) >= 0 in function 'calc'

Please help me to solve the problem.

@setarekhosravi
Copy link
Author

Please help to solve this problem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant