Counting parts and checking orientation on conveyor belt

Hi there,

I’m trying to count usb sticks on a conveyor belt and try to check how they are oriented (left /right) in real time.
And there is the problem, the belt moves quite quickly, so I think I need 20+ FPS.

I had two approaches:

  1. Since I know where the sticks come on the belt, I had a fixed window, which i forwarded to an image classifier (Mobilnet V2 96x96). This gave me the orientation with accuracy and then I used optical flow to track them and count them. Output due to slow optical flow around 17 fps.
  2. I trained a SSD Mobilnet v2 and gave it a bigger picture of the belt which gave me orientation and when bboxes crossed a line i counted one up. gave me ±15 FPS depending on how many parts were in the picture.

both worked really well with video, but I would love to have it in real time :)
So I though maybe some of you had similar projects and can give me a little hint ;)

Anything appreciated!
Thanks a lot

P.S. I am using tensorflow and tried to optimize my models with TensorRT, but didn’t see any improvement…

Hi,

Some suggestions here:

1. Please maximize the device performance first.

sudo nvpmodel -m 0
sudo jetson_clocks

2. Use pure TensorRT rather than TF-TRT.
Here is an sample for your reference: https://github.com/AastaNV/TRT_object_detection
We can get ~22fps with 300x300 image + mobilenet v2.

Thanks.

Hi AstaLLL,

does this also work with custom trained datasets?
Say I train a SSD Mobilenet v1 with two new classes, can I then just change the path in the main.py file to my model or is there anything else, I need to take care of?

would this also work with a jetson tx2?

Thanks