TIDL Classification example not properly identify objects

222 views
Skip to first unread message

Jon Morss

unread,
Oct 20, 2019, 2:11:54 AM10/20/19
to BeagleBoard
I am attempting to run the TIDL example with a Beaglebone AI and the only thing it seems to report identifying is a ping-pong, although I am not presenting a ping pong to the camera.  I am using a Logitech C920 camera and have performed all of the updates to the system, so am not sure what I am missing.

This is what I see when running the classification.tidl.cpp example:

sudo mjpg_streamer -i "input_opencv.so -r 640x480 --filter ./classification.tidl.so" -o "output_http.so -p 8080 -w /usr/share/mjpg-streamer/www"
[sudo] password for debian:
MJPG
Streamer Version.: 2.0
 i
: device........... : default
 i
: Desired Resolution: 640 x 480
 i
: filter........... : ./classification.tidl.so
 i
: filter args ..... :
Initializing filter
loading configuration
allocating execution
object pipelines (EOP)
allocating executors
allocating individual
EOPs
allocating I
/O memory for each EOP
Allocating input and output buffers
Allocating input and output buffers
Allocating input and output buffers
Allocating input and output buffers
num_eops
=4
About to start ProcessFrame loop!!
http
://localhost:8080/?action=stream
 o
: www-folder-path......: /usr/share/mjpg-streamer/www/
 o
: HTTP TCP port........: 8080
 o
: HTTP Listen Address..: (null)
 o
: username:password....: disabled
 o
: commands.............: enabled
(722)=ping-pong_ball
(722)=ping-pong_ball
(722)=ping-pong_ball
(722)=ping-pong_ball
(722)=ping-pong_ball
(722)=ping-pong_ball


This is what I see from dmesg:

[20753.769040] usb 1-1: New USB device found, idVendor=046d, idProduct=082d
[20753.769075] usb 1-1: New USB device strings: Mfr=0, Product=2, SerialNumber=1
[20753.769097] usb 1-1: Product: HD Pro Webcam C920
[20753.769118] usb 1-1: SerialNumber: C0DB0F6F
[20754.099831] uvcvideo: Found UVC 1.00 device HD Pro Webcam C920 (046d:082d)
[20754.120146] uvcvideo 1-1:1.0: Entity type for entity Processing 3 was not initialized!
[20754.120179] uvcvideo 1-1:1.0: Entity type for entity Extension 6 was not initialized!

[20754.120323] uvcvideo 1-1:1.0: Entity type for entity Extension 11 was not initialized!
[20754.125089] input: HD Pro Webcam C920 as /devices/platform/44000000.ocp/488c0000.omap_dwc3_2/488d0000.usb/xhci-hcd.1.auto/usb1/1-1/1-1:1.0/input/input3
[20754.135851] usbcore: registered new interface driver uvcvideo
[20754.135871] USB Video Class driver (1.1.1)
[20754.437849] usbcore: registered new interface driver snd-usb-audio
[20867.134498] usb 1-1: reset high-speed USB device number 3 using xhci-hcd
[20867.558788] omap-iommu 58882000.mmu: 58882000.mmu: version 2.1
[20867.605127] omap_hwmod: mmu0_dsp2: _wait_target_disable failed
[20867.605206] omap-iommu 41501000.mmu: 41501000.mmu: version 3.0
[20867.605483] omap-iommu 41502000.mmu: 41502000.mmu: version 3.0
[20867.619103] omap_hwmod: mmu0_dsp1: _wait_target_disable failed


Am I missing a step?

Cheers,

Jon

Dobrin Alexiev

unread,
Oct 22, 2019, 7:03:38 PM10/22/19
to BeagleBoard
In my case I also see often ping-pong_ball, or more often "segmentation fault". 
I wonder how can I debug this?

Jon Morss

unread,
Oct 23, 2019, 12:46:26 AM10/23/19
to BeagleBoard

Yeah, I always find it suspect when am example is posted and demo'd but does not seem to work for others.

Headbanging continues.

Jon

Jason Kridner

unread,
Oct 23, 2019, 11:20:21 AM10/23/19
to BeagleBoard
Sorry about that. I broke the example. I've updated it and it should work now.


I was visiting the TI office and talking to the developers about the performance of this example. According to profiles,
it should run up to 60fps. I attempted to make some changes to speed it up, but I did it wrong.

You can group different layers in the network to run on different processors. For this classifier network, it is said to
be fastest to run the first 11 stages on EVEs as fixed-point processes and then run the last 3 layers as floating-point
processes on the C66 DSPs. And, because we'd only be running 3 layers on the DSPs, we only need a single DSP.

Anyway, I didn't assign the layers properly and I still need to look at the code a bit more to set them properly.

For now, I've just switched back to running on all 14 layers on 4 EVEs. The 30fps data from the camera seems to 
be reasonably processed with this configuration.

I picked up a Logitech C922 that is capable of doing 60fps and I'll be looking to update the demo to run that way soon
and finishing up the segmentation demo.

Checking the commit-log is a nice way to check-up on me, even if my comments aren't the best.

The errors are mostly due to the fact that I'm learning as well. I'm trying to get the TI developers to use my methodology
of single-file mjpg-streamer filters rather then OpenCV desktop apps as I feel those the desktop apps are overly complex
and don't represent an embedded developer's use-case. They are pretty reasonably documented,
but, as you can see, it is taking me some time to understand them. Some additional debug visibility needs to be added
to my approach and I'll be chatting to the TI developers about that some in my call later today about this stuff.

Development work is on-going for Tensorflow Lite support. All should be much easier once that lands.

And, yes, I keep talking about TI as if I don't work there, and I do work there, but my working with open source
developers all day keeps me from adopting certain development processes other TI developers take as granted.
I don't install Code Composer Studio. I don't setup an Open Embedded build environment. I don't cross-compile.
I don't setup JTAG. I hope you get the idea.

jonnymo

unread,
Oct 23, 2019, 12:32:48 PM10/23/19
to Beagle Board
Jason,

I appreciate the update.  I'll update the code on me BB AI and run the exercise again.

Now to get the blinkLED.py and JavaScript examples working. 
  
I'm looking forward for the Tensorflow Lite support, so I'll keep and eye on that.

Thanks for the work you do on this.

Cheers,

Jon

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/94498dec-c8ec-4798-ae93-2b843980fb08%40googlegroups.com.

jonnymo

unread,
Oct 24, 2019, 12:37:39 AM10/24/19
to Beagle Board
I've pulled in the changes but now I get the following error when attempting to run the TIDL example from the Cloud9 IDE.
NOTE: I've updated to the 4.19 kernel, so I am not sure if that is causing the issue:

Command: BeagleBone/AI/tidl/classification.tidl.cpp
Python: python3
Python path: /usr/lib/python3.7/dist-packages:/usr/local/lib/python3.7/dist-packages
/var/lib/cloud9/common/Makefile:27: MODEL=BeagleBoard.org_BeagleBone_AI,TARGET=classification.tidl,COMMON=/var/lib/cloud9/common
/var/lib/cloud9/common/Makefile:145: GEN_DIR=/tmp/cloud9-examples,CHIP=am57xx,PROC=tidl,PRUN=,PRU_DIR=,EXE=.so
ti-mct-heap-check -c
sudo mjpg_streamer -i "input_opencv.so -r 640x480 --filter ./classification.tidl.so" -o "output_http.so -p 8080 -w /usr/share/mjpg-streamer/www"
[sudo] password for debian:
MJPG Streamer Version.: 2.0
 i: device........... : default
 i: Desired Resolution: 640 x 480
 i: filter........... : ./classification.tidl.so
 i: filter args ..... :
Initializing filter
loading configuration
allocating execution object pipelines (EOP)
CMEM Error: init: major version mismatch between interface and driver.
CMEM Error:     needs driver version 0x4150002, got 0x4160000
TIOCL FATAL: The cmemk kernel module is not installed. Consult the OpenCL UserGuide at http://software-dl.ti.com/mctools/esd/docs/opencl/index.html
/var/lib/cloud9/common/Makefile:167: recipe for target 'start' failed
make: *** [start] Error 1


Cheers,

Jon

Dobrin Alexiev

unread,
Oct 24, 2019, 7:54:50 PM10/24/19
to BeagleBoard

Thank you, Jason.

Applying the changes  made the classification demo reliably working. 

No crashes.

Dobrin

jonnymo

unread,
Oct 24, 2019, 8:51:51 PM10/24/19
to beagl...@googlegroups.com
Dobrin,

Are you running the 4.14 or 4.19 kernel?


Cheers,

Jon
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/3e959a98-3efd-4970-b2ec-e147bf3f4ef9%40googlegroups.com.

Dobrin Alexiev

unread,
Oct 25, 2019, 12:16:40 PM10/25/19
to BeagleBoard
debian@beaglebone:/var/lib/cloud9$ uname -r
4.14.108-ti-r119
To unsubscribe from this group and stop receiving emails from it, send an email to beagl...@googlegroups.com.

sjmi...@gmail.com

unread,
Oct 28, 2019, 5:19:39 AM10/28/19
to BeagleBoard
I get the same error as well.  Updated everything and rebooted a couple of times.
To unsubscribe from this group and stop receiving emails from it, send an email to beagl...@googlegroups.com.

Jason Kridner

unread,
Oct 29, 2019, 12:58:09 PM10/29/19
to Beagle Board
Stick to 4.14.

Provide me the output of:
cd /var/lib/cloud9;git status;git show | head -1

To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/49bba76b-0525-47ed-ae2a-5c9396ca4f2a%40googlegroups.com.

Sean Miller

unread,
Oct 29, 2019, 7:41:40 PM10/29/19
to BeagleBoard
Thanks.  Reverted back to 4.14 and the classification.cpp example is working.  Still fighting to get PWM and a GPIO input to work, though, with bonescript.

Jon Morss

unread,
Oct 30, 2019, 12:15:57 AM10/30/19
to BeagleBoard
This is the output of the commands you requested.  Note, i did make some changes to workaround some of the issues.
debian@beaglebone:/var/lib/cloud9$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
 
(use "git add <file>..." to update what will be committed)
 
(use "git checkout -- <file>..." to discard changes in working directory)


 modified
:   BeagleBone/AI/analogInOut.js
 modified
:   BeagleBone/AI/blinkLED.js
 modified
:   BeagleBone/AI/blinkLED.py


Untracked files:
 
(use "git add <file>..." to include in what will be committed)


 
BeagleBone/AI/blinkLED


no changes added to commit (use "git add" and/or "git commit -a")
debian@beaglebone
:/var/lib/cloud9$ git show | head -1
commit
40f82013c3a27e4fc7e3604da3cd53b3ce05706d


Cheers,

Jon

Robert Cachro

unread,
Apr 3, 2020, 9:24:36 AM4/3/20
to BeagleBoard
Any luck finishing up the segmentation demo?? This completed example would be perfect for converting SSD_multibox. Thank you.
Reply all
Reply to author
Forward
0 new messages