Firstly, let me start by saying that I'm not educated in this field at all. I have tried learning a lot, mostly for fun, but considering I have difficulties with reading, it's quite hard to find resources on how this kind of things works, I've found. I am a software developer, full time, so figured a bit of python or whatever would serve me well and away we would go. How wrong I was.
A couple of weeks ago I gave up on trying to use my custom trained model (UK registration plate detection). It worked really quite well on PC using a python script by following this tutorial (Faster-RCNN-Inception-V2-COCO). I have also followed this tutorial (ssd_mobilenet_v1_coco), which is aimed at training in the cloud. Using both tutorials, I was able to successfully use about 600 images to create my model. I've tried registering to the Intel seminar things, but I never get a response to those, so I am unable to get any value from those.
The last time I looked at it (about the beginning of this month) I had hit a brick wall (after spending many hours every day for about 10 days) and ended up spitting my dummy out. Along with that, I decided the best thing for it was to get some fresh eyes on it and give it about a week as it actually started to consume me a little bit…
Anyway, my question is, if it is possible at all, how would I go about taking my retrained models and using them on the Movidius?
My 'requirements'/details are as follows:
1) My use case does not have to use Tensorflow – it would be a bonus if it did as I already have 2x working models, but if another format such as Tiny Yolo needs to be trained, I'm quite happy to do that again.
2) Ideally, I will be able to just send it an image of some kind, rather than a camera feed
3) To have a response time that is pretty reasonable – I'm wanting to make myself a small API that uses this, so a decent response time would be amazing.
Whether it be a link to a valuable literature (aforementioned poor reading skills make long articles a real chore to filter through to makes sure they're of value) or a good video, or better yet - the answer, that would be fantastic and massively appreciated as it's actually getting me really down that I've not been able to crack this.
Many many thanks,
Have you gone through the basic examples in the NCAppZoo first?
As far as using your own graph, you let me know when you figure that out.
I used retrain.py to reuse the inception v3 graph, created a pb file and could not compile it.
Trying again to figure this out. I had to go back to using OpenCV for a quick fall back.
The NCAppZoo shows how to load a Tensorflow graph that has been COMPILED.
Once you have working compiled graph the rest is pretty straight forward.
You load the graph send it images and get the inference back. I suggest you look at the Security Cam example.
It breaks it down the into the basic steps.
Check for the Movidius device,
Open the device,
Load the graph,
Init your camera or get a still image to compare etc..
Get an image,
do an inference
and decide what to do with the results.
There is code to all of that but its actually pretty simple and easy to do.
m having issues running the already existing graph generated in ncappzoo/caffe/SSD_MobileNet Im using the live-object-detector.py py which is part of the NCAPPZOO without changes.
Error message is:
pi@raspberrypi:~/ncsdk/ncappzoo/apps/live-object-detector $ make run
python3 live-object-detector.py --video 0
Traceback (most recent call last):
File "live-object-detector.py", line 211, in
open( ARGS.labels ) if line != 'classes\n']
FileNotFoundError: [Errno 2] No such file or directory: '../../caffe/SSD_MobileNet/labels.txt'
Makefile:16: recipe for target 'run' failed
make: *** [run] Error 1
This labels file was not generated when I compiled the graph, I`ve checked the github documentation for SSD_mobilenet but there is nothing about this file there,, so does anybody have any idea where to get this file?
Thanks in advance!
Did you do a makeall when you installed AppZoo? it typically fixes those issues.
As far as whats in the labels.txt file just some labels.
do a makeall here. I think that should generate what you need.
Thanks for the support @chicagobob123 , unfortunatelly everything is already there, please see the result of
make all below:
pi@raspberrypi:~/ncsdk/ncappzoo/caffe/SSD_MobileNet $ make all
Prototxt file already exists, skipping download.
caffemodel already exists, skipping download.
NCS graph file already exists, skipping compile.
It seems this file labels.txt is generated by oder process or has to be downloaded.
Any comment is welcome!
I have found the content of the labels.txt in github: