Closed XuTZ0912 closed 3 years ago
@XuTZ0912 jpeg is true or false flag. when included it in the argument it would be True otherwise it is False.
The way to use is python3 pose_camera.py --jpeg
Which camera are you using? If USB camera can you share the output of v4l2-ctl --list-formats-ext --device /dev/video1
Feel free to reopen if they are any questions on this issue.
@hjonnala The help says
--jpeg Use image/jpeg input
but how do you pass the image, if it is a boolean flag? If I use --videosrc
I get a similar issue as #85
$ python3 pose_camera.py --jpeg --videosrc image.jpg
/path/to/project-posenet/gstreamer.py:15: PyGIWarning: Gst was imported without specifying a version first. Use gi.require_version('Gst', '1.0') before import to ensure that the right version gets loaded.
from gi.repository import GLib, GObject, Gst, GstBase, GstVideo, Gtk
/path/to/project-posenet/gstreamer.py:15: PyGIWarning: GstBase was imported without specifying a version first. Use gi.require_version('GstBase', '1.0') before import to ensure that the right version gets loaded.
from gi.repository import GLib, GObject, Gst, GstBase, GstVideo, Gtk
/path/to/project-posenet/gstreamer.py:15: PyGIWarning: GstVideo was imported without specifying a version first. Use gi.require_version('GstVideo', '1.0') before import to ensure that the right version gets loaded.
from gi.repository import GLib, GObject, Gst, GstBase, GstVideo, Gtk
/path/to/project-posenet/gstreamer.py:15: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
from gi.repository import GLib, GObject, Gst, GstBase, GstVideo, Gtk
Loading model: models/mobilenet/posenet_mobilenet_v1_075_481_641_quant_decoder_edgetpu.tflite
Gstreamer pipeline: v4l2src device=/home/maiermic/Pictures/vlcsnap-2022-11-14-23h23m58s950.jpg ! image/jpeg,width=640,height=480,framerate=30/1 ! decodebin ! videoflip video-direction=identity ! tee name=t
t. ! queue max-size-buffers=1 leaky=downstream ! videoconvert ! freezer name=freezer ! rsvgoverlay name=overlay
! videoconvert ! autovideosink
t. ! queue max-size-buffers=1 leaky=downstream ! videoconvert ! videoscale ! video/x-raw,width=641,height=480 ! videobox name=box autocrop=true
! video/x-raw,format=RGB,width=641,height=481 ! appsink name=appsink emit-signals=true max-buffers=1 drop=true
Traceback (most recent call last):
File "pose_camera.py", line 166, in <module>
main()
File "pose_camera.py", line 162, in main
run(run_inference, render_overlay)
File "pose_camera.py", line 122, in run
gstreamer.run_pipeline(partial(inf_callback, engine), partial(render_callback, engine),
File "/path/to/project-posenet/gstreamer.py", line 366, in run_pipeline
pipeline.run()
File "/path/to/project-posenet/gstreamer.py", line 74, in run
sinkelement.set_property('sync', False)
AttributeError: 'NoneType' object has no attribute 'set_property'
Hi @maiermic for single image please try simple_pose.py. jpeg flag is used to modify the gstreamer pipeline. It still required camera input as video source.
@hjonnala I'd like to get a drawing of the pose (e.g. like pose_camera.py
). simple_pose.py only prints the coordinates.
@hjonnala I'd like to get a drawing of the pose (e.g. like
pose_camera.py
). simple_pose.py only prints the coordinates.
please try replacing the sinple_pose.py with the script at: https://github.com/hjonnala/snippets/blob/main/posenet/simple_pose.py
@hjonnala Thank you :+1:
if enter the directory
So, I want to ask the basic problem for this...Thank you!