"name" : "Convolutional_Pose_Machine/stage_5_out",
"index" : [-1, 1, 1, 1],
"landmark_type" : 0,
+ "landmark_coordinate" : 1,
"decoding_type" : 1,
"decoding_info" :
{
"name" : "MobilenetV1/heatmap_2/BiasAdd",
"index" : [-1, 1, 1, 1],
"landmark_type" : 1,
+ "landmark_coordinate" : 1,
"decoding_type" : 2,
"decoding_info" :
{
DimInfo dimInfo;
int type; /**< 0: 2d-single, 1: 2d-multi, 2: 3-single */
int offset;
+ int coordinate; /**< 0: ratio, 1: pixel */
int decodingType; /**< 0: decoding unnecessary,
1: decoding heatmap,
2: decoding heatmap with additional refine data */
DimInfo GetDimInfo() { return dimInfo; }
int GetType();
int GetOffset();
+ int GetCoordinate();
int GetDecodingType();
DecodeInfo& GetDecodingInfo();
return ret;
}
- float inputW = static_cast<float>(mMetadata.GetInputMeta().layer.begin()->second.GetWidth());
- float inputH = static_cast<float>(mMetadata.GetInputMeta().layer.begin()->second.GetHeight());
+ float inputW = 1.f;
+ float inputH = 1.f;
float thresRadius = landmarkInfo.GetType() == 0 ? 0.0 : outputMeta.GetLandmark().GetDecodingInfo().heatMap.nmsRadius;
+ if (landmarkInfo.GetCoordinate() == 1) {
+ inputW = static_cast<float>(mMetadata.GetInputMeta().layer.begin()->second.GetWidth());
+ inputH = static_cast<float>(mMetadata.GetInputMeta().layer.begin()->second.GetHeight());
+ }
+
poseDecoder.decode(inputW, inputH, thresRadius);
int part = 0;
offset = static_cast<int>(json_object_get_int_member(pObject, "landmark_offset"));
LOGI("landmark offset: %d", offset);
+ coordinate = static_cast<int>(json_object_get_int_member(pObject, "landmark_coordinate"));
+ LOGI("landmark coordinate: %d", coordinate);
+
decodingType = static_cast<int>(json_object_get_int_member(pObject, "decoding_type"));
LOGI("landmark decodeing type: %d", decodingType);
}
return offset;
}
+ int Landmark::GetCoordinate()
+ {
+ return coordinate;
+ }
+
int Landmark::GetDecodingType()
{
return decodingType;