dotnet / dotnet/machinelearning-samples
Help in output parser to get bounding box when use Tensorflow scoring Yolov3
- Lingua principale
- PowerShell
- Stelle
- 4.7k
- Fork
- 2.7k
- Merge medio
- 2g 22h
- PR unite (30g)
- 1
Descrizione
Hi, I'm use this [**tensorflow yolov3 source**](https://github.com/YunYang1994/TensorFlow2.0-Examples/tree/master/4-Object_Detection/YOLOV3) to train my custom object, and result is a [**frozen model (pb) file**](https://drive.google.com/open?id=1hvBq5mMSMP4RLPOdW2AeAznVz4ot9rfL). I've followed [**this sample**](https://github.com/dotnet/machinelearning-samples/tree/master/samples/csharp/end-to-end-apps/ObjectDetection-Onnx) to scoring this model with some modify in code to fit with model
```
public string ModelInput { get; } = "x";
public string ModelOutput { get; } = "Identity_5";
public string[] Labels { get; } =
{
"vietnam_map", "vietnam_img"
};
private readonly (float x, float y)[] anchors = new (float x, float y)[]
{
(1.25F,1.625F),(2.0F,3.75F),(4.125F,2.875F),(1.875F,3.8125F),(3.875F,2.8125F),(3.6875F,7.4375F),(3.625F,2.8125F),(4.875F,6.1875F),(11.65625F,10.1875F)
};
```
Scoring use ML.NET, this model return a array float size [3549] (in ML.NET it flattens dimensional into one dimensional array 1x13x13x3x7 ) (_in TensorFlow it is a tensor float32 with shape **(1, 13, 13, 3, 7)**_)
I'm struggling to parser array float to get bounding box.
**Can anyone help, modify in OnnxOutputParser.cs to run with that score?**
_Width_ `ModelInput = "x"` _and_ `ModelOutput = "Identity_5"` _I've tested in TensorFlow code and it run perfect, you can try_ [**this file**](https://github.com/huanbd/TensorFlow2.0-Examples/blob/master/4-Object_Detection/YOLOV3/image_demo_pb.py)
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia con OnnxOutputParser.cs nell’esempio ObjectDetection-Onnx referenziato e confronta la forma di output prevista con l’array ML.NET di Identity_5. Traccia come vengono utilizzati ModelInput, ModelOutput, le etichette, gli anchor e il tensore appiattito 1x13x13x3x7. Il lavoro è completato quando il parser produce bounding boxes per il modello TensorFlow YOLOv3 e corrisponde all’esempio TensorFlow funzionante.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- csharp, tensorflow
- Ambito
- computer-vision, machine-learning
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100