Closed QuanLI-21 closed 4 years ago
Thank you for reaching out. My python version is 3.6.8 and opencv-python version is 4.2.0.32. There is no such error on my side. Kindly let me know if changing the version resolves your error or not.
I am having exactly the same issue as @LiQuan19 . It seems like it doesnt recognize the input video?
@nikoststs Can you kindly mention your opencv and python version?
Hi, I have solved this problem, it should not be a version problem, I changed the "frame = self.cap.read()" to "ret, frame = self.cap.read()" in the section of "def main(self)". "self.cap.read()"can return two parameters. @nikoststs .Thanks @paul-pias
I followed LiQuan19 solution and it did work for me as well. @paul-pias , i do have another question though. Is there an output video file that shows the distances being measured and the bboxes? ( if it is better to move it to a new question, please do tell me )
@nikoststs @LiQuan19 Thank you for your cooperation. I will add this in the code segment for future reference.
Hi, When I tried to run the code "object_detection.py" for a video. I am able to read the video, resize it. There was a error: TypeError: Expected cv::UMat for argument 'src', line:"frame = cv2.resize(frame,(self.width, self.height))"
I am using opencv 4.2.0 on python 3.7. I guess it may be because of version. Which Pytorch Version you are using? Thanks!