Skip to content
This repository has been archived by the owner on Nov 9, 2023. It is now read-only.

Not able to run pose_camera.py on a video #85

Open
pakcodee opened this issue Apr 23, 2022 · 3 comments
Open

Not able to run pose_camera.py on a video #85

pakcodee opened this issue Apr 23, 2022 · 3 comments
Assignees
Labels
Hardware:Dev Board Coral Dev Board issues subtype:macOS macOS Build/installation issues type:bug Bug type:build/install Build and install issues type:support Support question or issue

Comments

@pakcodee
Copy link

pakcodee commented Apr 23, 2022

Description

l am trying to run this following command on the dev board

mendel@silly-llama:~/project-posenet$ python3 pose_camera.py --videosrc BenVid.MOV

The goal is to map out the poses of the people in the video but l am getting this error, does anyone have an idea of what could be missing? l am running headless connecting via mdt shell and downloaded fresh project repo without any changes.

Traceback (most recent call last):
File "pose_camera.py", line 166, in
main()
File "pose_camera.py", line 162, in main
run(run_inference, render_overlay)
File "pose_camera.py", line 127, in run
jpeg=args.jpeg
File "/home/mendel/project-posenet/gstreamer.py", line 366, in run_pipeline
pipeline.run()
File "/home/mendel/project-posenet/gstreamer.py", line 74, in run
sinkelement.set_property('sync', False)
AttributeError: 'NoneType' object has no attribute 'set_property'

Click to expand!

Issue Type

Bug, Build/Install, Support

Operating System

Mac OS

Coral Device

Dev Board

Other Devices

No response

Programming Language

No response

Relevant Log Output

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 127, in run
    jpeg=args.jpeg
  File "/home/mendel/project-posenet/gstreamer.py", line 366, in run_pipeline
    pipeline.run()
  File "/home/mendel/project-posenet/gstreamer.py", line 74, in run
    sinkelement.set_property('sync', False)
AttributeError: 'NoneType' object has no attribute 'set_property'
@google-coral-bot google-coral-bot bot added Hardware:Dev Board Coral Dev Board issues subtype:macOS macOS Build/installation issues type:bug Bug type:build/install Build and install issues type:support Support question or issue labels Apr 23, 2022
@aiwhoo
Copy link

aiwhoo commented Apr 23, 2022

I'm having the same issue too. I'm trying to just process a video on the devboard, but there are no examples of processing videos in the repo---just processing via cameras.

@hjonnala
Copy link

hjonnala commented Apr 25, 2022

Hello @pakcodee project-posenet repo has not been implemented to accept .mov files. Please try changing this line as below to accept .mov files. Thanks!

    if '.MOV' in videosrc.upper():
        PIPELINE = f'filesrc location={videosrc} ! qtdemux name=demux  demux.audio_0 ! queue ! decodebin ! audioconvert ! audioresample ! autoaudiosink   demux.video_0 ! queue '
    else:
        PIPELINE = 'v4l2src device=%s ! {src_caps}' % videosrc

Reference: https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-good/html/gst-plugins-good-plugins-qtdemux.html

sample files: https://filesamples.com/formats/mov

@pakcodee
Copy link
Author

After adding that line of code and running this is what the output is, the same as before but without the errors
Gstreamer pipeline: filesrc location=BenVid.MOV ! qtdemux name=demux demux.audio_0 ! queue ! decodebin ! audioconvert ! audioresample ! autoaudiosink demux.video_0 ! queue ! 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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Hardware:Dev Board Coral Dev Board issues subtype:macOS macOS Build/installation issues type:bug Bug type:build/install Build and install issues type:support Support question or issue
Projects
None yet
Development

No branches or pull requests

3 participants