python results different from tensorflowsharp
See original GitHub issueI use tensorflowsharp to locate items on a conveyor belt - it works 😃 but the results i see on a python (anaconda) are much better than the tensorflowharp
python image is
when i run tensorflowsharp with my inference graph i get
To get here i changed the tnsorflosharp object detection sample like this
_catalogPath = "C:/Users/user 67/Downloads/TensorFlowSharp-master/Examples/ExampleObjectDetection/bin/Debug/demo/inferencegraph/labelmap.pbtxt";
if (_catalogPath == null) {
_catalogPath = DownloadDefaultTexts (_currentDir);
}
_modelPath = "C:/Users/user 67/Downloads/TensorFlowSharp-master/Examples/ExampleObjectDetection/bin/Debug/demo/inferencegraph/frozen_inference_graph.pb";
if (_modelPath == null) {
_modelPath = DownloadDefaultModel (_currentDir);
}
the .pb file is too large to be here i will try to upload it later
all of this in a slightly nicer form in a link link
in the tensorflosharp console differ in that in the original i get some lines of warnings (5-6) while if i try to load my file i get this tensorflosharp results.txt tensorflowsharp does not say if it is an error or just reading of .pb file contents
windows 10 .net 4.7.1
Issue Analytics
- State:
- Created 5 years ago
- Comments:13
Top Results From Across the Web
Same Tensorflow model giving different results on Android ...
I am trying to run a Tensorflow model on my Android application, but the same trained model gives different results (wrong inference) ...
Read more >Errors with Tensorflowsharp output = runner.Run() on ...
I've written a YOLO object detection model that tests out properly when inferenced in Python or with TFSharp in Visual Studio only.
Read more >Mr_Mao/TensorFlowSharp
TensorFlowSharp is a good runtime to run your existing models, ... NET which takes a different approach than TensorFlowSharp, it uses the Python...
Read more >TensorFlow - Creating C# Applications using ...
Training a CNN Model using TensorFlow and Python ... Convolutional neural networks (CNN) if trained properly can give spectacular results.
Read more >Introduction to graphs and tf.function
A Function is a Python callable that builds TensorFlow graphs from ... tf.function applies to a function and all other functions it calls:....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thank you for your answer. I arrive to the same solution redoing the code following the python version:
private static TFGraph ConstructGraphToNormalizeImage( out TFOutput input, out TFOutput output, TFDataType destinationDataType = TFDataType.Float) { var graph = new TFGraph();
The output from the Object Detection demo it’s the same that in the Python version.
Before the execution the image is resized based in the model training, you need to change it based in your model before execute take a look when converting an image to tensor see my code const int W = 300; const int H = 300; const float Mean = 0; const float Scale = 1;