- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
hi sir,
I want to something similar to "Build a Safety Gear Detector" demo. And I find some ready-to-use yolov3_tiny model in darknet here
I use the command to convert to darknet model to tensorflow one
sudo python3 ./convert_weights_pb.py --class_names ~/hardhat.names --data_format NHWC --weights_file ~/yolov3-tiny_final.weights --tiny
and use the command to convert tensorflow model to openvino one
sudo python3 mo_tf.py --input_model ~/hardHat.pb --tensorflow_use_custom_operations_config /opt/intel/openvino/deployment_tools/model_optimizer/extensions/front/tf/yolo_v3_tiny.json --batch 1 --data_type FP32
And the yolo_v3_tiny.json is look like:
[
{
"id": "TFYOLOV3",
"match_kind": "general",
"custom_attributes": {
"classes": 5,
"anchors": [10, 14, 23, 27, 37, 58, 81, 82, 135, 169, 344, 319],
"coords": 4,
"num": 6,
"masks": [[3, 4, 5], [0, 1, 2]],
"entry_points": ["detector/yolo-v3-tiny/Reshape", "detector/yolo-v3-tiny/Reshape_4"]
}
}
]
However, the result in openvino is different from the original model by using the Opencv dnn
as in the image, the left image is result of darknet model by using Opencv dnn module, the right image is the model converted to openvino and use the yolov3 demo program in open_model_zoo. The converted openvino model can only show result of label 0. And In this example it shows nothing.
What should I do now?
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Hi ininder, gg,
Try adding the --reverse_input_channels to the model optimizer command. This is the command I used with my custom trained model from darknet.
python3 <OpenVINO>/deployment_tools/model_optimizer/mo_tf.py --input_model frozen_darknet_yolov3_model.pb --tensorflow_use_custom_operations_config yolov3_tiny_custom.json --batch 1 --data_type FP32 --reverse_input_channels
Regards,
Jesus
Link copiado
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Hi ininder, gg,
Try adding the --reverse_input_channels to the model optimizer command. This is the command I used with my custom trained model from darknet.
python3 <OpenVINO>/deployment_tools/model_optimizer/mo_tf.py --input_model frozen_darknet_yolov3_model.pb --tensorflow_use_custom_operations_config yolov3_tiny_custom.json --batch 1 --data_type FP32 --reverse_input_channels
Regards,
Jesus
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Hi ininder, gg,
Glad this worked for you! Feel free to reach out again if you have additional questions.
Regards,
Jesus

- Subscrever fonte RSS
- Marcar tópico como novo
- Marcar tópico como lido
- Flutuar este Tópico para o utilizador atual
- Marcador
- Subscrever
- Página amigável para impressora