Skip to content

Commit 67f4fc6

Browse files
Internal change
PiperOrigin-RevId: 519275194
1 parent 018ff09 commit 67f4fc6

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

official/legacy/detection/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ The pre-trained ResNet-50 checkpoint can be downloaded [here](https://storage.cl
4343
Note: The ResNet implementation under
4444
[detection/](https://github.com/tensorflow/models/tree/master/official/legacy/detection)
4545
is currently different from the one under
46-
[classification/](https://github.com/tensorflow/models/blob/master/docs/vision/image_classification.ipynb),
46+
[classification/](https://github.com/tensorflow/models/tree/master/official/vision/image_classification),
4747
so the checkpoints are not compatible.
4848
We will unify the implementation soon.
4949

official/vision/evaluation/coco_evaluator.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,8 @@ def _process_bbox_predictions(self, predictions):
287287
predictions['detection_outer_boxes'] /= image_scale
288288

289289
def _process_keypoints_predictions(self, predictions):
290-
image_scale = predictions['image_info'][:, 2:3, :]
290+
image_scale = tf.reshape(predictions['image_info'][:, 2:3, :],
291+
[-1, 1, 1, 2])
291292
predictions['detection_keypoints'] = (
292293
predictions['detection_keypoints'].astype(np.float32))
293294
predictions['detection_keypoints'] /= image_scale

0 commit comments

Comments
 (0)