paul-pias / Object-Detection-and-Distance-Measurement

Using yolov3 & yolov4 weights objects are being detected from live video frame along with the measurement of the object from the camera without the support of any extra hardware device.
348 stars 118 forks source link

I take [Errno 2] No such file or directory: 'yolov4.weights' #33

Closed Muhammed1244 closed 3 years ago

Muhammed1244 commented 3 years ago

In order to solve this error, I downloaded yolov4.weights and put under "YOLOv4" file but I get different error (error: (-215:Assertion failed) !ssize.empty() in function 'cv::resize'). How can I solve this error?

I downloaded YOLOv3 and YOLOv4 weights from links you shared (YOLOv3 YOLOv4 ) and I put them under "YOLOv4" file both. 5 file had same name. I changed them with original files. Entire error:

Traceback (most recent call last):
  File "C:\Users\Ahmet\anaconda3\envs\yolou4\lib\threading.py", line 926, in _bootstrap_inner
    self.run()
  File "C:\Users\Ahmet\anaconda3\envs\yolou4\lib\threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\Ahmet\Desktop\Object Detection Projeler\Object-Detection-and-Distance-Measurement\YOLOv4\object_detection.py", line 84, in frame_render
    frame = cv2.resize(frame,(self.width, self.height))
cv2.error: OpenCV(4.5.2) C:\Users\runneradmin\AppData\Local\Temp\pip-req-build-dn5w5exm\opencv\modules\imgproc\src\resize.cpp:4051: error: (-215:Assertion failed) !ssize.empty() in function 'cv::resize'
HassanBinHaroon commented 2 years ago

Check out the following relevant and easiest implementation.

https://github.com/HassanBinHaroon/object_detection-PLUS-distance_estimation-v1

aidansmyth95ifx commented 3 weeks ago

These weights links are dead for YoloV4