This example uses tensorflow object detection model API and TensorFlowSharp library to identify multiple objects in a single image using .NET programming languages like C# and F#.
git clone https://github.com/migueldeicaza/TensorFlowSharp- build TensorFlowSharp.sln
- copy 'libtensorflow.dylib' (Mac OS) or 'libtensorflow.dll' (Windows) to the project output path (see where you can get the library under Working on TensorFlowSharp section)
- Run the ExampleObjectDetection util from command line:
ExampleObjectDetection
By default, the example downloads a pretrained model, but you can specify your own using the following options:
input_image - optional, the path to the image for processing (the default is 'test_images/input.jpg')
output_image - optional, the path where the image with detected objects will be saved (the default is 'test_images/output.jpg')
catalog - optional, the path to the '.pbtxt' file (by default, 'mscoco_label_map.pbtxt' been loaded)
model - optional, the path to the '.pb' file (by default, 'frozen_inference_graph.pb' model been used, but you can download any other from here https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/detection_model_zoo.md or train your own):
ExampleObjectDetection --input_image="/demo/input.jpg" --output_image="/demo/output.jpg" --catalog="/demo/mscoco_label_map.pbtxt" --model="/demo/frozen_inference_graph.pb"
If you want to address a bug or a question related to the object detection example - just create a new issue on github starting with [Object Detection Example] tag.
