Forum

VL.tensorflow

vl

#1

Hi I took a shot at the tensorflowsharp library in vl based on the object detection exemple and added webcam input. It works but the python exemple version is more efficient. Don’t know if it comes from some parts of the patch that aren’t optimize (may be obivous things) or from a lower level.

I finally go back to the python exemple for time saving since I started to use other python plugins. If someone is interested to dig on it I put a readme with the stuffs to install.
tensorflow-vvvv.zip (129.0 KB)


#2

Good work David_sh. I also came across some slowness with Tensorflowsharp when I tried out image recognition, and like yourself I’m not sure what the reason for the slowness was. It seemed to get better after the first image, perhaps because it was the start of the session, or maybe once I sorted out the garbage collection in a later version. That the model runs faster in Python may also be related to the fact the Python API and the C API actually reference different c++ code bases, with the C API codebase as the redheaded step child of the suite.

Also a word of caution:

The Tensorflow C API that Tensorflowsharp is based on is incomplete with some functions available but not implemented for training, so I found my options were very limited using it for training my own data (Transfer Learning) or do much beyond running Tensorflow protobuf models. I started wrapping this library a while back when I realised it was a bit of a deadend for doing much else.

This is still important though, general (and fast) loading and running module for Tensorflow models would be very useful in many circumstances, but the drawbacks and short comings led me to develop VLML.

Lastly, double check if Yolo hasn’t been implemenetation in VL.OpenCV yet.

H


#3

Hey there, we did add YOLO to VL.OpenCV (YOLO v2 for now) so please give it a test, there is a sample patch that comes with the lib. Word of caution: it does run on CPU only for now so it may be slower than what you need.

Cheers.


#4

Hi thx for your answers. @Hadasi Too bad I didn’t find your github code before. Mmm I see all those library level things don’t sound good. Here the issue is more about accuracy than speed but probably for the same reasons that you evoked. Thanks for your works on making machine learning possibilities accessible, VLML looks awesome!
@Hadasi @ravazquez I will stick to tensorflow for that project compare to YOLO since I already followed a couple of tutorials and used google cloud plateform to train my data, I’m worried about extra steps to use the “trained output” with YOLO. But still it’s so cool to have it available. I have to try it. After adding the two yolo files in vvvv root directory I get this error
w


#5

@david_sh just tested it again against latest alpha (36.1) and it does work. I do get an initial error message, hit OK and Close and then it runs properly.

Make sure you are using YOLO 2 files, these are the ones I test with:

Let me know how it goes.


#6

.cfg file should be 3KB
.weights file should be 197,954KB


#7

My bad I actually saved the .cfg file in .txt… Thx for your time it works now