Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use yolo_prune to run video error #16

Closed
107060009 opened this issue Oct 29, 2021 · 5 comments
Closed

use yolo_prune to run video error #16

107060009 opened this issue Oct 29, 2021 · 5 comments

Comments

@107060009
Copy link

107060009 commented Oct 29, 2021

I ran the work in yolo_prune folder, and I got the result by ./yolo ./image/ i. But I ran into an error when I inference the model by the following command :
./yolo {VideoFileName.avi} v

The error message is :

Failed to query video capabilities: Inappropriate ioctl for device
libv4l2: error getting capabilities: Inappropriate ioctl for device
VIDEOIO ERROR: V4L: device ./video/road_trafifc.mp4: Unable to query number of channels
OpenCV Error: Unspecified error (GStreamer: your gstreamer installation is missing a required plugin
) in handlemessage, file /usr/src/debug/opencv/3.3+gitAUTOINC+87c27a074d_2a9d1b22ed_a62e20676a_34e4206aef_fccf7cd6a4-r0/git/modules/videoio/src/cap_gstreamer.cpp, line 1860
VIDEOIO(cvCreateCapture_GStreamer (CV_CAP_GSTREAMER_FILE, filename)): raised OpenCV exception:

/usr/src/debug/opencv/3.3+gitAUTOINC+87c27a074d_2a9d1b22ed_a62e20676a_34e4206aef_fccf7cd6a4-r0/git/modules/videoio/src/cap_gstreamer.cpp:1860: error: (-2) GStreamer: your gstreamer installation is missing a required plugin
 in function handlemessage

open video error!

It seems like missing some Gstreamer plugins, and I wonder how to solve it or tell me another way to run the video input successfully.
Thank you!

@wutianze
Copy link
Owner

I ran the work in yolo_prune folder, and I got the result by ./yolo ./image/ i. But I ran into an error when I inference the model by the following command : ./yolo {VideoFileName.avi} v

The error message is :

Failed to query video capabilities: Inappropriate ioctl for device
libv4l2: error getting capabilities: Inappropriate ioctl for device
VIDEOIO ERROR: V4L: device ./video/road_trafifc.mp4: Unable to query number of channels
OpenCV Error: Unspecified error (GStreamer: your gstreamer installation is missing a required plugin
) in handlemessage, file /usr/src/debug/opencv/3.3+gitAUTOINC+87c27a074d_2a9d1b22ed_a62e20676a_34e4206aef_fccf7cd6a4-r0/git/modules/videoio/src/cap_gstreamer.cpp, line 1860
VIDEOIO(cvCreateCapture_GStreamer (CV_CAP_GSTREAMER_FILE, filename)): raised OpenCV exception:

/usr/src/debug/opencv/3.3+gitAUTOINC+87c27a074d_2a9d1b22ed_a62e20676a_34e4206aef_fccf7cd6a4-r0/git/modules/videoio/src/cap_gstreamer.cpp:1860: error: (-2) GStreamer: your gstreamer installation is missing a required plugin
 in function handlemessage

open video error!

It seems like missing some Gstreamer plugins, and I wonder how to solve it or tell me another way to run the video input successfully. Thank you!

It seems like your video file or camera has some problem. Try another video or device first

@107060009
Copy link
Author

107060009 commented Oct 30, 2021

Is the video supposed to be .avi or .mp4 file?
Or there are some restrictions for the input video?

@wutianze
Copy link
Owner

wutianze commented Oct 30, 2021

Is the video supposed to be .avi or .mp4 file? Or there are some restrictions for the input video?

Sorry, I don't remember the content in yolo_prune. I recommend you turn into the yolo_keras in this project.

And for your problem, try another video or just one image to see if the code works well.

@107060009
Copy link
Author

I tried one image as input, and yolo_prune works well.

I also tried the work in yolo_keras.
I ran the Makefile in yolo_keras/yolo_pynq2 and generated the yolo executable file.
However, when I ran the command:
./yolo dog.jpg
the pynqz2 unexpectedly disconnected the network and then shut down.
Is there any problem in my steps?

@wutianze
Copy link
Owner

wutianze commented Nov 1, 2021

I tried one image as input, and yolo_prune works well.

I also tried the work in yolo_keras. I ran the Makefile in yolo_keras/yolo_pynq2 and generated the yolo executable file. However, when I ran the command: ./yolo dog.jpg the pynqz2 unexpectedly disconnected the network and then shut down. Is there any problem in my steps?

Unexpectedly shutting down usually means the power input is not enough. If you follow the steps in the guideline, it should work. It is hard for me to reproduce your problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants