# Tensorflow build and train model with C++ API

**URL:** <https://discuss.ai.google.dev/t/tensorflow-build-and-train-model-with-c-api/29731>\
**Category:** General Discussion\
**Tags:** models, help\_request\
**Created:** [August 22, 2021, 2:18am UTC](https://discuss.ai.google.dev/t/tensorflow-build-and-train-model-with-c-api/29731 "2021-08-22T02:18:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alex\_Bilityuk](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/alex_bilityuk/32/8685_2.png) [@Alex\_Bilityuk](https://discuss.ai.google.dev/u/Alex_Bilityuk)\
**Post date:** [August 22, 2021, 2:18am UTC](https://discuss.ai.google.dev/t/tensorflow-build-and-train-model-with-c-api/29731/1 "2021-08-22T02:18:36Z")

</div>

Hi dear developers! This is my first day of using tensorflow and i am really new to this library. Today i successfully compile the library with vcpkg (with the following command: vcpkg install tensorflow-cc:x64-windows-static)., and now i want to learn how to make an object detection model with C++ tensorflow, train that model and use it in my project? My goal is to take a bunch of pictures with faces (with face mask) and (without face mask) and make a trained model and after i want to make a face mask detection with openCV and tensoflow.

Could anybody give me a hand with that task and let to know from wich point to start? Where to find C++ code examples and is there any GUI for constructing building and training tensorflow models?

---

<div class="post-metadata">

**Author:** ![Bhack](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/bhack/32/6388_2.png) [@Bhack](https://discuss.ai.google.dev/u/Bhack)\
**Post date:** [August 22, 2021, 7:41am UTC](https://discuss.ai.google.dev/t/tensorflow-build-and-train-model-with-c-api/29731/3 "2021-08-22T07:41:50Z")

</div>

Just to give you an example of a pipeline take a look at:

> **[COVID-19: Face Mask Detector with OpenCV, Keras/TensorFlow, and Deep Learning...](https://pyimagesearch.com/2020/05/04/covid-19-face-mask-detector-with-opencv-keras-tensorflow-and-deep-learning/)**
>
> In this tutorial, you will learn how to train a COVID-19 face mask detector with OpenCV, Keras/TensorFlow, and Deep Learning.

I don’t know why you need to use C++ but generally you will train in python then you could use your model with TF directly or on different targets exporting on TFLite (mobile, embedded) , TFMicro (microcontrollers), TFJS (browser).
