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

unable to run example-object-tracker on new device #6

Open
joshfox10 opened this issue Mar 19, 2021 · 9 comments
Open

unable to run example-object-tracker on new device #6

joshfox10 opened this issue Mar 19, 2021 · 9 comments
Assignees
Labels
Hardware:Dev Board Mini Coral Dev Board Mini Issues subtype:Mendel Linux Mendel Linux Build/installation issues type:support Support question or issue

Comments

@joshfox10
Copy link

Hello,
Noob here. I've been trying to get the coral mini dev board to run the example-object-tracker. I've followed all instructions from set up of the device to loading the instructions. Other examples for the dev board work fine. Here's the error I'm getting

mendel@green-orange:~/google-coral/example-object-tracker/gstreamer$ python3 detect.py

(detect.py:1322): dconf-WARNING **: 13:21:55.165: Unable to open /usr/local/share/dconf/profile/user: Not a directory
Loading ../models/mobilenet_ssd_v2_coco_quant_postprocess_edgetpu.tflite with ../models/coco_labels.txt labels.
Gstreamer pipeline:
v4l2src device=/dev/video0 ! video/x-raw,width=640,height=480,framerate=30/1 ! tee name=t
t. ! queue max-size-buffers=1 leaky=downstream ! videoconvert ! videoscale ! video/x-raw,width=300,height=225 ! videobox name=box autocrop=true
! video/x-raw,format=RGB,width=300,height=300 ! appsink name=appsink emit-signals=true max-buffers=1 drop=true
t. ! queue max-size-buffers=1 leaky=downstream ! videoconvert
! rsvgoverlay name=overlay ! videoconvert ! ximagesink sync=false

Traceback (most recent call last):
File "detect.py", line 218, in
main()
File "detect.py", line 214, in main
videofmt=args.videofmt)
File "/home/mendel/google-coral/example-object-tracker/gstreamer/gstreamer.py", line 275, in run_pipeline
pipeline = GstPipeline(pipeline, user_function, src_size, mot_tracker)
File "/home/mendel/google-coral/example-object-tracker/gstreamer/gstreamer.py", line 39, in init
self.pipeline = Gst.parse_launch(pipeline)
gi.repository.GLib.Error: gst_parse_error: no element "ximagesink" (1)

@manoj7410
Copy link

@joshfox10 Please run:

sudo apt-get install -y gstreamer1.0-plugins-bad gstreamer1.0-plugins-good python3-gst-1.0 python3-gi gir1.2-gtk-3.0
python3 -m pip install svgwrite

@joshfox10
Copy link
Author

Hello Manoj, thanks for your continued support on this. I tried running your suggestions to no avail. Any other thoughts?

pi@raspberrypi:~ $ mdt shell

Waiting for a device...

Connecting to green-orange at 192.168.100.2

Linux green-orange 4.19.125-mtk #1 SMP PREEMPT Thu Dec 10 02:36:13 UTC 2020 aarch64

The programs included with the Mendel GNU/Linux system are free software;

the exact distribution terms for each program are described in the

individual files in /usr/share/doc/*/copyright.

Mendel GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent

permitted by applicable law.

Last login: Mon Mar 22 19:13:28 2021

mendel@green-orange:~$ cd google-coral

mendel@green-orange:~/google-coral$ cd example-object-tracker

mendel@green-orange:~/google-coral/example-object-tracker$ cd gstreamer

mendel@green-orange:~/google-coral/example-object-tracker/gstreamer$ sudo apt-get install -y gstreamer1.0-plugins-bad gstreamer1.0-plugins-good python3-gst-1.0 python3-gi gir1.2-gtk-3.0

Reading package lists... Donete

Building dependency tree

Reading state information... Done

gstreamer1.0-plugins-bad is already the newest version (1.14.4+mtk-1).

gstreamer1.0-plugins-good is already the newest version (1.14.4+mtk-1).

gir1.2-gtk-3.0 is already the newest version (3.24.5-1).

python3-gi is already the newest version (3.30.4-1).

python3-gst-1.0 is already the newest version (1.14.4-1+b1).

0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

mendel@green-orange:~/google-coral/example-object-tracker/gstreamer$ python3 -m pip install svgwrite

Requirement already satisfied: svgwrite in /home/mendel/.local/lib/python3.7/site-packages (1.4.1)

mendel@green-orange:~/google-coral/example-object-tracker/gstreamer$ python3 detect.py

(detect.py:1319): dconf-WARNING **: 12:50:40.995: Unable to open /usr/local/share/dconf/profile/user: Not a directory

Loading ../models/mobilenet_ssd_v2_coco_quant_postprocess_edgetpu.tflite with ../models/coco_labels.txt labels.

Gstreamer pipeline:

v4l2src device=/dev/video0 ! video/x-raw,width=640,height=480,framerate=30/1 ! tee name=t

        t. ! queue max-size-buffers=1 leaky=downstream ! videoconvert ! videoscale ! video/x-raw,width=300,height=225 ! videobox name=box autocrop=true 

           ! video/x-raw,format=RGB,width=300,height=300 ! appsink name=appsink emit-signals=true max-buffers=1 drop=true 

        t. ! queue max-size-buffers=1 leaky=downstream ! videoconvert 

           ! rsvgoverlay name=overlay ! videoconvert ! ximagesink sync=false 

Traceback (most recent call last):

File "detect.py", line 218, in

main() 

File "detect.py", line 214, in main

videofmt=args.videofmt) 

File "/home/mendel/google-coral/example-object-tracker/gstreamer/gstreamer.py", line 275, in run_pipeline

pipeline = GstPipeline(pipeline, user_function, src_size, mot_tracker) 

File "/home/mendel/google-coral/example-object-tracker/gstreamer/gstreamer.py", line 39, in init

self.pipeline = Gst.parse_launch(pipeline) 

gi.repository.GLib.Error: gst_parse_error: no element "ximagesink" (1)

mendel@green-orange:~/google-coral/example-object-tracker/gstreamer$

@rrace001
Copy link

@joshfox10 ,
I am new to this also and I am having the exact same issue on my Coral Dev Board Mini. The other camera demos work but just not this one. I did notice in your output that v4l2src device=/dev/video0. should this be dev/video1 ? The connect a camera tutorial states that the Coral camera will show up as dev/video1. I am assuming you are using the Coral Camera. This did not fix it for me but I thought I should mention it just in case.

@joshfox10
Copy link
Author

Has there been any traction on this? Would it be difficult to replace Gstreamer with OpenCV since it appears to be the issue?

@manoj7410
Copy link

manoj7410 commented Mar 30, 2021

@joshfox10 Did you try to run:

python3 detect.py --tracker sort ?

And please share the output of : bash install_requirements.sh

@androbi-com
Copy link

androbi-com commented Apr 11, 2021

I think the reason for this problem is that the mini dev board is not checked for in gstreamer/gstreamer.py (function detectCoralDevBoard). The same problem was present in the repository "examples-cameras" but there it has been fixed (see patch of 21st of january). Both repositories rely on practically the same gstreamer.py, so I guess the fix from "examples-camera" should work here too. The pipelines have been updated for the mini dev too, I fixed it locally by updating the pipelines.

@manoj7410
Copy link

@androbi-com Thank you for pointing that out. Will try to get this fixed soon.

@rrace001
Copy link

I used the gstreamer/gstreamer.py from the "examples-cameras" and inserted the tracker option. I got a couple errors that I do not understand but the tracker is working on my dev board mini. I do not have much experience with this but If I can get the errors to go away then I will make my first pull request. Thanks @androbi-com !

Deep Sort Next?

@hjonnala hjonnala added Hardware:Dev Board Mini Coral Dev Board Mini Issues stat:awaiting Coral team Status - Awaiting response from Coral team subtype:Mendel Linux Mendel Linux Build/installation issues type:support Support question or issue labels Aug 6, 2021
@emingenc
Copy link

emingenc commented Sep 23, 2021

I solved with these installs

sudo apt-get install libgstreamer1.0-0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad gstreamer1.0-tools gstreamer1.0-x

@hjonnala hjonnala assigned hjonnala and unassigned manoj7410 May 3, 2022
@hjonnala hjonnala removed the stat:awaiting Coral team Status - Awaiting response from Coral team label May 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hardware:Dev Board Mini Coral Dev Board Mini Issues subtype:Mendel Linux Mendel Linux Build/installation issues type:support Support question or issue
Projects
None yet
Development

No branches or pull requests

6 participants