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

-215:Assertion failed) count > 0 in function 'fitLine2D_wods' #7

Closed
SaiThejeshwar opened this issue Sep 24, 2021 · 5 comments
Closed
Assignees
Labels
bug Something isn't working documentation Improvements or additions to documentation question Further information is requested

Comments

@SaiThejeshwar
Copy link

Hi,

First of all, this is great work!

This is the error I get when I am trying to run on a tennis video. After printing model summary, this follows.

BOXES []
BOXES []
BOXES [array([166.0948 , 679.272 , 195.11845, 705.8905 ], dtype=float32)]
BIGGEST [166. 679. 195. 706.]
CAMERA ... Court tracking failed, adding 5 pixels to dist
CAMERA ... Court tracking failed, adding 5 pixels to dist
CAMERA ... Court tracking failed, adding 5 pixels to dist
Traceback (most recent call last):
File "predict_video.py", line 113, in
lines = court_detector.track_court(frame)
File "/content/drive/My Drive/TennisTracking/NewTracking/tennis-tracking/court_detector.py", line 445, in track_court
return self.track_court(frame)
File "/content/drive/My Drive/TennisTracking/NewTracking/tennis-tracking/court_detector.py", line 445, in track_court
return self.track_court(frame)
File "/content/drive/My Drive/TennisTracking/NewTracking/tennis-tracking/court_detector.py", line 445, in track_court
return self.track_court(frame)
File "/content/drive/My Drive/TennisTracking/NewTracking/tennis-tracking/court_detector.py", line 421, in track_court
[vx, vy, x, y] = cv2.fitLine(new_points, cv2.DIST_L2, 0, 0.01, 0.01)
cv2.error: OpenCV(4.1.2) /io/opencv/modules/imgproc/src/linefit.cpp:50: error: (-215:Assertion failed) count > 0 in function 'fitLine2D_wods'

@shukkkur
Copy link
Collaborator

shukkkur commented Sep 25, 2021

@SaiThejeshwar Thanks for opening the issue! Can I see what video you are trying to run the project on?

@SaiThejeshwar
Copy link
Author

This is the video I am trying to run on https://www.youtube.com/watch?v=CGRzfUccmNE&ab_channel=Wimbledon

@shukkkur
Copy link
Collaborator

shukkkur commented Sep 25, 2021

This project expects a video (preferably not so long) of the game itself (no commercials, spectators, breaks). Just like the sample video inputs are. Try trimming that video and passing a single rally to the algorithm.
image
Have to work. Anyway, try video with other court colors as well.

@shukkkur
Copy link
Collaborator

shukkkur commented Sep 27, 2021

Hi @SaiThejeshwar . Were you able to successfully run the code or still facing any errors?

@SaiThejeshwar
Copy link
Author

Hi @shukkkur . I have trimmed the video to just 2 mins, but looks like there is one logo in between the video. So same error. Will try to trim it and update the results.

@shukkkur shukkkur self-assigned this Nov 9, 2021
@shukkkur shukkkur added bug Something isn't working documentation Improvements or additions to documentation question Further information is requested labels Nov 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants