Reuse of a model trained in my cpp application

Hello

I’m new to TF and I don’t yet understand the whole philosophy of this framework.

I have trained a network on one of my videos and I have tested it on other videos and it works very well. Now my goal is to be able to reuse the network in a C++ application. I guess I have to use the TF API for that (or any other).

First I try to create a python prototyp. I understand that I have to reload my model and then launch a deconvolution on my image to get the position estimation.

By analyzing the DLC code I admit that I don’t know where to start.

thanks for your help

I have never converted the TF code into C++ code. But e.g. this Medium article is talking about how you might be able to do this: https://medium.com/@hamedmp/exporting-trained-tensorflow-models-to-c-the-right-way-cf24b609d183

I thank you for your lead.

I have one last question please.

You trained a model on a CNN but I didn’t understand how deconvolution gives you the position.

must we do as much deconvolution as there are bodyparts

By the way, your work is very inspiring.

1 Like

In fact there are 3 deconvolutions per body part. One for the scoremap, which encodes the probability of a bodypart being in a particular pixel, and two for predicting the relative x and y shift (respectively) in order to predict the position in dimensions of the original image. This is good, because the ResNet downsamples the spatial information, by a factor of 16 (as it is configured by default), and the deconv. only upsamples it by a factor of 8. Thus, the x & y shift maps give provide a location refinement given the coarse spatial information in the scoremap.

I thank you for your answers and your availability.

I wonder if it is possible to use a resnet 18 to reduce the prediction time because the generalization in real time. Of course, having a GPU would be advantageous

mobilnets are available in 2.1! https://arxiv.org/abs/1909.11229
super fast:
image

thinks for your advices