objectDetection_Yolo using .ckpt instead of .weights

hi

I am testing objectDetection_Yolo and find that it uses .weights file.

I want to use a tensorflow checkpoint file instead.

Can it be done?

Thanks.

@pijebom737

Yes, you can do it.
You can convert tensorflow model into ONNX, and then convert ONNX into tensorRT engine before deploying into DeepStream.

In addition, you have to take care of how your model outputs may look like. For example, which layers are these outputs come from?
These outputs may be from:

  1. the last conv layers without going through yolo layers
  2. The yolo layers
  3. NMS layers that are after yolo layers

Shapes and contents of these outputs depend on which layers these outputs come from.
You have to use different strategies depending on 1, 2 and 3.

For 1:
You can use similar strategy as what the YOLOv3 sample does in objectDetection_Yolo : writing C++ API to add yolo plugin into the engine, and use a similar bbox parser like the ones in nvdsinfer_custom_impl_Yolo/nvdsparsebbox_Yolo.cpp

For 2:
You should ignore the yolo plugin because yolo layer already exists in your model. Just implement a similar bbox parser like the ones in nvdsinfer_custom_impl_Yolo/nvdsparsebbox_Yolo.cpp

For 3:
You should implement a customized parser to handle NMS outputs, and ignore NMS option in the configuration file