Files
openvino/model-optimizer/extensions/front/tf/rfcn_support_api_v1.14.json
T
Evgeny Lazarev d28ecc4f2f New approach for Proposal sub-graph conversion for TF OD API models (#5847)
* Draft version of new approach for Proposal sub-graph conversion for TF OD API models

* Added clip_after_nms = True for Proposal sub-graph being replaced with DetectionOutput

* Refactored code to insert DetectionOutput instead of Proposal operation

* Code cleanup

* Added separate function to insert DetectionOutput instead of Proposal operation

* Updated transformation configuration files for the TF OD API models with Proposal transformation

* Code refactoring

* Code refactoring

* Fix for the condition

* Fixed transformation

* Fixed transformation. One more time

* Updated document about conversion of the TF OD API models

* Update code comments
2021-08-01 10:17:22 +03:00

147 lines
4.0 KiB
JSON

[
{
"custom_attributes": {},
"id": "ObjectDetectionAPIPreprocessorReplacement",
"inputs": [
[
{
"node": "map/Shape$",
"port": 0
},
{
"node": "map/TensorArrayUnstack/Shape$",
"port": 0
},
{
"node": "map/TensorArrayUnstack/TensorArrayScatter/TensorArrayScatterV3$",
"port": 2
}
]
],
"instances": [
".*Preprocessor/"
],
"match_kind": "scope",
"outputs": [
{
"node": "sub$",
"port": 0
},
{
"node": "map/TensorArrayStack_1/TensorArrayGatherV3$",
"port": 0
}
]
},
{
"custom_attributes": {
"operation_to_add": "Proposal",
"clip_before_nms": false,
"clip_after_nms": true
},
"id": "ObjectDetectionAPIProposalReplacement",
"include_inputs_to_sub_graph": true,
"include_outputs_to_sub_graph": true,
"instances": {
"end_points": [
"map/TensorArrayStack/TensorArrayGatherV3",
"map_2/TensorArrayStack/TensorArrayGatherV3",
"BatchMultiClassNonMaxSuppression/map/TensorArrayStack_5/TensorArrayGatherV3"
],
"start_points": [
"FirstStageBoxPredictor/Reshape",
"FirstStageBoxPredictor/Reshape_1",
"GridAnchorGenerator/Identity",
"Shape"
]
},
"match_kind": "points"
},
{
"custom_attributes": {
"clip_before_nms": false,
"clip_after_nms": true,
"coordinates_swap_method": "add_convolution"
},
"id": "ObjectDetectionAPIDetectionOutputReplacement",
"inputs": [
[
{
"node": "Reshape$",
"port": 0
}
],
[
{
"node": "Reshape_1$",
"port": 0
}
],
[
{
"node": "ExpandDims$",
"port": 0
}
]
],
"instances": [
".*SecondStagePostprocessor/"
],
"match_kind": "scope",
"outputs": [
{
"node": "BatchMultiClassNonMaxSuppression/map/TensorArrayStack/TensorArrayGatherV3$",
"port": 0
}
]
},
{
"custom_attributes": {},
"id": "ObjectDetectionAPIPSROIPoolingReplacement",
"inputs": [
[
{
"node": "Shape$",
"port": 0
},
{
"node": "TensorArrayUnstack/Shape$",
"port": 0
},
{
"node": "TensorArrayUnstack/TensorArrayScatter/TensorArrayScatterV3$",
"port": 2
}
],
[
{
"node": "TensorArrayUnstack_1/TensorArrayScatter/TensorArrayScatterV3$",
"port": 2
},
{
"node": "TensorArrayUnstack_1/Shape$",
"port": 0
}
]
],
"instances": [
"SecondStageBoxPredictor/map/",
"SecondStageBoxPredictor/map_1/"
],
"match_kind": "scope",
"outputs": [
{
"node": "TensorArrayStack/TensorArrayGatherV3$",
"port": 0
}
]
},
{
"custom_attributes": {
"outputs": "detection_boxes"
},
"id": "ObjectDetectionAPIOutputReplacement",
"match_kind": "general"
}
]