Open J-WBaek opened 8 months ago
PRO TIP 💡 Replace 'model=yolov5s.pt' with new 'model=yolov5su.pt'. YOLOv5 'u' models are trained with https://github.com/ultralytics/ultralytics and feature improved performance vs standard YOLOv5 models trained with https://github.com/ultralytics/yolov5.
0: 384x640 3 persons, 1 cat, 43.0ms
Speed: 2.0ms preprocess, 43.0ms inference, 301.1ms postprocess per image at shape (1, 3, 384, 640)
Results saved to /home/busan/intel01-ssh/runs/detect/predict3
Traceback (most recent call last):
File "/home/busan/yolov5/project.py", line 11, in
코드 실행 시 if results[0].boxes.conf > 0.5: 에서
Exception has occurred: RuntimeError
Boolean value of Tensor with more than one value is ambiguous
File "/home/kyj/yolov5/dataTest.py", line 9, in
해당 런타임 에러는 tensor와 value를 비교해서 생긴 오류입니다. 아래와 같이 results[0].boxes.conf 를 results[0].boxes.conf.item() 로 변경하고 실행해보세요.