Open wuyuwangqingtian opened 2 years ago
i meet the same questions, and how to solve this ?
me too, i also meet the same question and can not solve this problem so far
I think this issue is due to differences in the code of different versions of yolov5. You can solve this problem by adding a little code in yolov5.utils.general.
def yolov5_in_syspath():
yolov5_folder_dir = str(Path(__file__).parents[1].absolute())
try:
sys.path.insert(0, yolov5_folder_dir)
yield
finally:
sys.path.remove(yolov5_folder_dir)
imshow_ = cv2.imshow # copy to avoid recursion errors
Hello, I made an error while running your code。 ImportError: cannot import name 'yolov5_in_syspath'