Oleffa / LeagueAI

LeagueAI software framework for League of Legends that provides information about the state of the game based on Image Recognition using OpenCV and Pytorch.
GNU General Public License v3.0
222 stars 65 forks source link

2022 error - unable to draw #11

Open nubonics opened 2 years ago

nubonics commented 2 years ago

This happens when installing a fresh clone of this repo and entering a practice game as vayne I am using one of the yolo default weights as the LeagueAI weights

Traceback (most recent call last):
  File "C:\Users\Sylar6\PycharmProjects\LeagueAI\LeagueAI_minimal_example.py", line 28, in <module>
    objects = LeagueAI.get_objects(frame)
  File "C:\Users\Sylar6\PycharmProjects\LeagueAI\LeagueAI_helper.py", line 136, in get_objects
    list(map(lambda x: self.draw_results(x, input_frame, colors), output))
  File "C:\Users\Sylar6\PycharmProjects\LeagueAI\LeagueAI_helper.py", line 136, in <lambda>
    list(map(lambda x: self.draw_results(x, input_frame, colors), output))
  File "C:\Users\Sylar6\PycharmProjects\LeagueAI\LeagueAI_helper.py", line 154, in draw_results
    cv2.rectangle(img, c1, c2,color, 2)
cv2.error: OpenCV(4.5.5) :-1: error: (-5:Bad argument) in function 'rectangle'
> Overload resolution failed:
>  - Can't parse 'pt1'. Sequence item with index 0 has a wrong type
>  - Can't parse 'pt1'. Sequence item with index 0 has a wrong type
>  - Can't parse 'rec'. Expected sequence length 4, got 2
>  - Can't parse 'rec'. Expected sequence length 4, got 2

Process finished with exit code 1