Commit 70e20023 authored by Ross Girshick's avatar Ross Girshick Committed by Facebook Github Bot

Remove legacy multi-scale inference support

Reviewed By: ir413

Differential Revision: D7148425

fbshipit-source-id: 78c11427b0559248116ca1065b8252355f0034a3
parent 9b41e84b
......@@ -29,7 +29,7 @@ TRAIN:
RPN_PRE_NMS_TOP_N: 2000 # Per FPN level
TEST:
DATASETS: ('coco_2014_minival',)
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
RPN_PRE_NMS_TOP_N: 1000 # Per FPN level
......
......@@ -29,7 +29,7 @@ TRAIN:
RPN_PRE_NMS_TOP_N: 2000 # Per FPN level
TEST:
DATASETS: ('coco_2014_minival',)
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
RPN_PRE_NMS_TOP_N: 1000 # Per FPN level
......
......@@ -26,7 +26,7 @@ TRAIN:
BATCH_SIZE_PER_IM: 512
TEST:
DATASETS: ('coco_2014_minival',)
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
RPN_PRE_NMS_TOP_N: 6000
......
......@@ -26,7 +26,7 @@ TRAIN:
BATCH_SIZE_PER_IM: 512
TEST:
DATASETS: ('coco_2014_minival',)
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
RPN_PRE_NMS_TOP_N: 6000
......
......@@ -29,7 +29,7 @@ TRAIN:
RPN_PRE_NMS_TOP_N: 2000 # Per FPN level
TEST:
DATASETS: ('coco_2014_minival',)
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
RPN_PRE_NMS_TOP_N: 1000 # Per FPN level
......
......@@ -29,7 +29,7 @@ TRAIN:
RPN_PRE_NMS_TOP_N: 2000 # Per FPN level
TEST:
DATASETS: ('coco_2014_minival',)
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
RPN_PRE_NMS_TOP_N: 1000 # Per FPN level
......
......@@ -36,7 +36,7 @@ TRAIN:
RPN_PRE_NMS_TOP_N: 2000 # Per FPN level
TEST:
DATASETS: ('coco_2014_minival',)
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
RPN_PRE_NMS_TOP_N: 1000 # Per FPN level
......
......@@ -36,7 +36,7 @@ TRAIN:
RPN_PRE_NMS_TOP_N: 2000 # Per FPN level
TEST:
DATASETS: ('coco_2014_minival',)
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
RPN_PRE_NMS_TOP_N: 1000 # Per FPN level
......
......@@ -36,7 +36,7 @@ TRAIN:
RPN_PRE_NMS_TOP_N: 2000 # Per FPN level
TEST:
DATASETS: ('coco_2014_minival',)
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
RPN_PRE_NMS_TOP_N: 1000 # Per FPN level
......
......@@ -37,7 +37,7 @@ TRAIN:
RPN_PRE_NMS_TOP_N: 2000 # Per FPN level
TEST:
DATASETS: ('coco_2014_minival',)
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
RPN_PRE_NMS_TOP_N: 1000 # Per FPN level
......
......@@ -43,7 +43,7 @@ TRAIN:
RPN_PRE_NMS_TOP_N: 2000 # Per FPN level
TEST:
DATASETS: ('keypoints_coco_2014_minival',)
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
RPN_PRE_NMS_TOP_N: 1000 # Per FPN level
......
......@@ -43,7 +43,7 @@ TRAIN:
RPN_PRE_NMS_TOP_N: 2000 # Per FPN level
TEST:
DATASETS: ('keypoints_coco_2014_minival',)
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
RPN_PRE_NMS_TOP_N: 1000 # Per FPN level
......
......@@ -43,7 +43,7 @@ TRAIN:
RPN_PRE_NMS_TOP_N: 2000 # Per FPN level
TEST:
DATASETS: ('keypoints_coco_2014_minival',)
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
RPN_PRE_NMS_TOP_N: 1000 # Per FPN level
......
......@@ -43,7 +43,7 @@ TRAIN:
RPN_PRE_NMS_TOP_N: 2000 # Per FPN level
TEST:
DATASETS: ('keypoints_coco_2014_minival',)
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
RPN_PRE_NMS_TOP_N: 1000 # Per FPN level
......
......@@ -48,7 +48,7 @@ TRAIN:
RPN_PRE_NMS_TOP_N: 2000 # Per FPN level
TEST:
DATASETS: ('keypoints_coco_2014_minival',)
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
RPN_PRE_NMS_TOP_N: 1000 # Per FPN level
......
......@@ -48,7 +48,7 @@ TRAIN:
RPN_PRE_NMS_TOP_N: 2000 # Per FPN level
TEST:
DATASETS: ('keypoints_coco_2014_minival',)
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
RPN_PRE_NMS_TOP_N: 1000 # Per FPN level
......
......@@ -49,7 +49,7 @@ TRAIN:
RPN_PRE_NMS_TOP_N: 2000 # Per FPN level
TEST:
DATASETS: ('keypoints_coco_2014_minival',)
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
RPN_PRE_NMS_TOP_N: 1000 # Per FPN level
......
......@@ -49,7 +49,7 @@ TRAIN:
RPN_PRE_NMS_TOP_N: 2000 # Per FPN level
TEST:
DATASETS: ('keypoints_coco_2014_minival',)
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
RPN_PRE_NMS_TOP_N: 1000 # Per FPN level
......
......@@ -38,7 +38,7 @@ TRAIN:
RPN_PRE_NMS_TOP_N: 2000 # Per FPN level
TEST:
DATASETS: ('coco_2014_minival',)
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
RPN_PRE_NMS_TOP_N: 1000 # Per FPN level
......
......@@ -38,7 +38,7 @@ TRAIN:
RPN_PRE_NMS_TOP_N: 2000 # Per FPN level
TEST:
DATASETS: ('coco_2014_minival',)
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
RPN_PRE_NMS_TOP_N: 1000 # Per FPN level
......
......@@ -34,7 +34,7 @@ TRAIN:
BATCH_SIZE_PER_IM: 512
TEST:
DATASETS: ('coco_2014_minival',)
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
RPN_PRE_NMS_TOP_N: 6000
......
......@@ -34,7 +34,7 @@ TRAIN:
BATCH_SIZE_PER_IM: 512
TEST:
DATASETS: ('coco_2014_minival',)
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
RPN_PRE_NMS_TOP_N: 6000
......
......@@ -38,7 +38,7 @@ TRAIN:
RPN_PRE_NMS_TOP_N: 2000 # Per FPN level
TEST:
DATASETS: ('coco_2014_minival',)
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
RPN_PRE_NMS_TOP_N: 1000 # Per FPN level
......
......@@ -38,7 +38,7 @@ TRAIN:
RPN_PRE_NMS_TOP_N: 2000 # Per FPN level
TEST:
DATASETS: ('coco_2014_minival',)
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
RPN_PRE_NMS_TOP_N: 1000 # Per FPN level
......
......@@ -45,7 +45,7 @@ TRAIN:
RPN_PRE_NMS_TOP_N: 2000 # Per FPN level
TEST:
DATASETS: ('coco_2014_minival',)
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
RPN_PRE_NMS_TOP_N: 1000 # Per FPN level
......
......@@ -45,7 +45,7 @@ TRAIN:
RPN_PRE_NMS_TOP_N: 2000 # Per FPN level
TEST:
DATASETS: ('coco_2014_minival',)
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
RPN_PRE_NMS_TOP_N: 1000 # Per FPN level
......
......@@ -46,7 +46,7 @@ TRAIN:
RPN_PRE_NMS_TOP_N: 2000 # Per FPN level
TEST:
DATASETS: ('coco_2014_minival',)
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
RPN_PRE_NMS_TOP_N: 1000 # Per FPN level
......
......@@ -46,7 +46,7 @@ TRAIN:
RPN_PRE_NMS_TOP_N: 2000 # Per FPN level
TEST:
DATASETS: ('coco_2014_minival',)
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
RPN_PRE_NMS_TOP_N: 1000 # Per FPN level
......
......@@ -45,7 +45,7 @@ TRAIN:
RPN_PRE_NMS_TOP_N: 2000 # Per FPN level
TEST:
DATASETS: ('coco_2014_minival',)
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
BBOX_VOTE:
......
......@@ -30,7 +30,7 @@ TEST:
DATASETS: ('coco_2014_minival',)
PROPOSAL_FILES: ('https://s3-us-west-2.amazonaws.com/detectron/35998887/12_2017_baselines/rpn_R-101-FPN_1x.yaml.08_07_07.vzhHEs0V/output/test/coco_2014_minival/generalized_rcnn/rpn_proposals.pkl',)
PROPOSAL_LIMIT: 1000
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
OUTPUT_DIR: .
......@@ -30,7 +30,7 @@ TEST:
DATASETS: ('coco_2014_minival',)
PROPOSAL_FILES: ('https://s3-us-west-2.amazonaws.com/detectron/35998887/12_2017_baselines/rpn_R-101-FPN_1x.yaml.08_07_07.vzhHEs0V/output/test/coco_2014_minival/generalized_rcnn/rpn_proposals.pkl',)
PROPOSAL_LIMIT: 1000
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
OUTPUT_DIR: .
......@@ -28,7 +28,7 @@ TEST:
DATASETS: ('coco_2014_minival',)
PROPOSAL_FILES: ('https://s3-us-west-2.amazonaws.com/detectron/35998355/12_2017_baselines/rpn_R-50-C4_1x.yaml.08_00_43.njH5oD9L/output/test/coco_2014_minival/rpn/rpn_proposals.pkl',)
PROPOSAL_LIMIT: 1000
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
OUTPUT_DIR: .
......@@ -28,7 +28,7 @@ TEST:
DATASETS: ('coco_2014_minival',)
PROPOSAL_FILES: ('https://s3-us-west-2.amazonaws.com/detectron/35998355/12_2017_baselines/rpn_R-50-C4_1x.yaml.08_00_43.njH5oD9L/output/test/coco_2014_minival/rpn/rpn_proposals.pkl',)
PROPOSAL_LIMIT: 1000
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
OUTPUT_DIR: .
......@@ -30,7 +30,7 @@ TEST:
DATASETS: ('coco_2014_minival',)
PROPOSAL_FILES: ('https://s3-us-west-2.amazonaws.com/detectron/35998814/12_2017_baselines/rpn_R-50-FPN_1x.yaml.08_06_03.Axg0r179/output/test/coco_2014_minival/generalized_rcnn/rpn_proposals.pkl',)
PROPOSAL_LIMIT: 1000
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
OUTPUT_DIR: .
......@@ -30,7 +30,7 @@ TEST:
DATASETS: ('coco_2014_minival',)
PROPOSAL_FILES: ('https://s3-us-west-2.amazonaws.com/detectron/35998814/12_2017_baselines/rpn_R-50-FPN_1x.yaml.08_06_03.Axg0r179/output/test/coco_2014_minival/generalized_rcnn/rpn_proposals.pkl',)
PROPOSAL_LIMIT: 1000
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
OUTPUT_DIR: .
......@@ -37,7 +37,7 @@ TEST:
DATASETS: ('coco_2014_minival',)
PROPOSAL_FILES: ('https://s3-us-west-2.amazonaws.com/detectron/36760102/12_2017_baselines/rpn_X-101-32x8d-FPN_1x.yaml.06_00_16.RWeBAniO/output/test/coco_2014_minival/generalized_rcnn/rpn_proposals.pkl',)
PROPOSAL_LIMIT: 1000
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
OUTPUT_DIR: .
......@@ -37,7 +37,7 @@ TEST:
DATASETS: ('coco_2014_minival',)
PROPOSAL_FILES: ('https://s3-us-west-2.amazonaws.com/detectron/36760102/12_2017_baselines/rpn_X-101-32x8d-FPN_1x.yaml.06_00_16.RWeBAniO/output/test/coco_2014_minival/generalized_rcnn/rpn_proposals.pkl',)
PROPOSAL_LIMIT: 1000
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
OUTPUT_DIR: .
......@@ -37,7 +37,7 @@ TEST:
DATASETS: ('coco_2014_minival',)
PROPOSAL_FILES: ('https://s3-us-west-2.amazonaws.com/detectron/35998956/12_2017_baselines/rpn_X-101-64x4d-FPN_1x.yaml.08_08_41.Seh0psKz/output/test/coco_2014_minival/generalized_rcnn/rpn_proposals.pkl',)
PROPOSAL_LIMIT: 1000
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
OUTPUT_DIR: .
......@@ -37,7 +37,7 @@ TEST:
DATASETS: ('coco_2014_minival',)
PROPOSAL_FILES: ('https://s3-us-west-2.amazonaws.com/detectron/35998956/12_2017_baselines/rpn_X-101-64x4d-FPN_1x.yaml.08_08_41.Seh0psKz/output/test/coco_2014_minival/generalized_rcnn/rpn_proposals.pkl',)
PROPOSAL_LIMIT: 1000
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
OUTPUT_DIR: .
......@@ -44,7 +44,7 @@ TEST:
DATASETS: ('keypoints_coco_2014_minival',)
PROPOSAL_FILES: ('https://s3-us-west-2.amazonaws.com/detectron/35999521/12_2017_baselines/rpn_person_only_R-101-FPN_1x.yaml.08_20_33.1OkqMmqP/output/test/keypoints_coco_2014_minival/generalized_rcnn/rpn_proposals.pkl',)
PROPOSAL_LIMIT: 1000
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
OUTPUT_DIR: .
......@@ -44,7 +44,7 @@ TEST:
DATASETS: ('keypoints_coco_2014_minival',)
PROPOSAL_FILES: ('https://s3-us-west-2.amazonaws.com/detectron/35999521/12_2017_baselines/rpn_person_only_R-101-FPN_1x.yaml.08_20_33.1OkqMmqP/output/test/keypoints_coco_2014_minival/generalized_rcnn/rpn_proposals.pkl',)
PROPOSAL_LIMIT: 1000
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
OUTPUT_DIR: .
......@@ -44,7 +44,7 @@ TEST:
DATASETS: ('keypoints_coco_2014_minival',)
PROPOSAL_FILES: ('https://s3-us-west-2.amazonaws.com/detectron/35998996/12_2017_baselines/rpn_person_only_R-50-FPN_1x.yaml.08_10_08.0ZWmJm6F/output/test/keypoints_coco_2014_minival/generalized_rcnn/rpn_proposals.pkl',)
PROPOSAL_LIMIT: 1000
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
OUTPUT_DIR: .
......@@ -44,7 +44,7 @@ TEST:
DATASETS: ('keypoints_coco_2014_minival',)
PROPOSAL_FILES: ('https://s3-us-west-2.amazonaws.com/detectron/35998996/12_2017_baselines/rpn_person_only_R-50-FPN_1x.yaml.08_10_08.0ZWmJm6F/output/test/keypoints_coco_2014_minival/generalized_rcnn/rpn_proposals.pkl',)
PROPOSAL_LIMIT: 1000
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
OUTPUT_DIR: .
......@@ -49,7 +49,7 @@ TEST:
DATASETS: ('keypoints_coco_2014_minival',)
PROPOSAL_FILES: ('https://s3-us-west-2.amazonaws.com/detectron/36760438/12_2017_baselines/rpn_person_only_X-101-32x8d-FPN_1x.yaml.06_04_23.M2oJlDPW/output/test/keypoints_coco_2014_minival/generalized_rcnn/rpn_proposals.pkl',)
PROPOSAL_LIMIT: 1000
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
OUTPUT_DIR: .
......@@ -49,7 +49,7 @@ TEST:
DATASETS: ('keypoints_coco_2014_minival',)
PROPOSAL_FILES: ('https://s3-us-west-2.amazonaws.com/detectron/36760438/12_2017_baselines/rpn_person_only_X-101-32x8d-FPN_1x.yaml.06_04_23.M2oJlDPW/output/test/keypoints_coco_2014_minival/generalized_rcnn/rpn_proposals.pkl',)
PROPOSAL_LIMIT: 1000
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
OUTPUT_DIR: .
......@@ -50,7 +50,7 @@ TEST:
DATASETS: ('keypoints_coco_2014_minival',)
PROPOSAL_FILES: ('https://s3-us-west-2.amazonaws.com/detectron/35999553/12_2017_baselines/rpn_person_only_X-101-64x4d-FPN_1x.yaml.08_21_33.ghFzzArr/output/test/keypoints_coco_2014_minival/generalized_rcnn/rpn_proposals.pkl',)
PROPOSAL_LIMIT: 1000
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
OUTPUT_DIR: .
......@@ -50,7 +50,7 @@ TEST:
DATASETS: ('keypoints_coco_2014_minival',)
PROPOSAL_FILES: ('https://s3-us-west-2.amazonaws.com/detectron/35999553/12_2017_baselines/rpn_person_only_X-101-64x4d-FPN_1x.yaml.08_21_33.ghFzzArr/output/test/keypoints_coco_2014_minival/generalized_rcnn/rpn_proposals.pkl',)
PROPOSAL_LIMIT: 1000
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
OUTPUT_DIR: .
......@@ -39,7 +39,7 @@ TEST:
DATASETS: ('coco_2014_minival',)
PROPOSAL_FILES: ('https://s3-us-west-2.amazonaws.com/detectron/35998887/12_2017_baselines/rpn_R-101-FPN_1x.yaml.08_07_07.vzhHEs0V/output/test/coco_2014_minival/generalized_rcnn/rpn_proposals.pkl',)
PROPOSAL_LIMIT: 1000
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
OUTPUT_DIR: .
......@@ -39,7 +39,7 @@ TEST:
DATASETS: ('coco_2014_minival',)
PROPOSAL_FILES: ('https://s3-us-west-2.amazonaws.com/detectron/35998887/12_2017_baselines/rpn_R-101-FPN_1x.yaml.08_07_07.vzhHEs0V/output/test/coco_2014_minival/generalized_rcnn/rpn_proposals.pkl',)
PROPOSAL_LIMIT: 1000
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
OUTPUT_DIR: .
......@@ -36,7 +36,7 @@ TEST:
DATASETS: ('coco_2014_minival',)
PROPOSAL_FILES: ('https://s3-us-west-2.amazonaws.com/detectron/35998355/12_2017_baselines/rpn_R-50-C4_1x.yaml.08_00_43.njH5oD9L/output/test/coco_2014_minival/rpn/rpn_proposals.pkl',)
PROPOSAL_LIMIT: 1000
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
OUTPUT_DIR: .
......@@ -36,7 +36,7 @@ TEST:
DATASETS: ('coco_2014_minival',)
PROPOSAL_FILES: ('https://s3-us-west-2.amazonaws.com/detectron/35998355/12_2017_baselines/rpn_R-50-C4_1x.yaml.08_00_43.njH5oD9L/output/test/coco_2014_minival/rpn/rpn_proposals.pkl',)
PROPOSAL_LIMIT: 1000
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
OUTPUT_DIR: .
......@@ -39,7 +39,7 @@ TEST:
DATASETS: ('coco_2014_minival',)
PROPOSAL_FILES: ('https://s3-us-west-2.amazonaws.com/detectron/35998814/12_2017_baselines/rpn_R-50-FPN_1x.yaml.08_06_03.Axg0r179/output/test/coco_2014_minival/generalized_rcnn/rpn_proposals.pkl',)
PROPOSAL_LIMIT: 1000
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
OUTPUT_DIR: .
......@@ -39,7 +39,7 @@ TEST:
DATASETS: ('coco_2014_minival',)
PROPOSAL_FILES: ('https://s3-us-west-2.amazonaws.com/detectron/35998814/12_2017_baselines/rpn_R-50-FPN_1x.yaml.08_06_03.Axg0r179/output/test/coco_2014_minival/generalized_rcnn/rpn_proposals.pkl',)
PROPOSAL_LIMIT: 1000
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
OUTPUT_DIR: .
......@@ -46,7 +46,7 @@ TEST:
DATASETS: ('coco_2014_minival',)
PROPOSAL_FILES: ('https://s3-us-west-2.amazonaws.com/detectron/36760102/12_2017_baselines/rpn_X-101-32x8d-FPN_1x.yaml.06_00_16.RWeBAniO/output/test/coco_2014_minival/generalized_rcnn/rpn_proposals.pkl',)
PROPOSAL_LIMIT: 1000
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
OUTPUT_DIR: .
......@@ -46,7 +46,7 @@ TEST:
DATASETS: ('coco_2014_minival',)
PROPOSAL_FILES: ('https://s3-us-west-2.amazonaws.com/detectron/36760102/12_2017_baselines/rpn_X-101-32x8d-FPN_1x.yaml.06_00_16.RWeBAniO/output/test/coco_2014_minival/generalized_rcnn/rpn_proposals.pkl',)
PROPOSAL_LIMIT: 1000
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
OUTPUT_DIR: .
......@@ -47,7 +47,7 @@ TEST:
DATASETS: ('coco_2014_minival',)
PROPOSAL_FILES: ('https://s3-us-west-2.amazonaws.com/detectron/35998956/12_2017_baselines/rpn_X-101-64x4d-FPN_1x.yaml.08_08_41.Seh0psKz/output/test/coco_2014_minival/generalized_rcnn/rpn_proposals.pkl',)
PROPOSAL_LIMIT: 1000
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
OUTPUT_DIR: .
......@@ -47,7 +47,7 @@ TEST:
DATASETS: ('coco_2014_minival',)
PROPOSAL_FILES: ('https://s3-us-west-2.amazonaws.com/detectron/35998956/12_2017_baselines/rpn_X-101-64x4d-FPN_1x.yaml.08_08_41.Seh0psKz/output/test/coco_2014_minival/generalized_rcnn/rpn_proposals.pkl',)
PROPOSAL_LIMIT: 1000
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
OUTPUT_DIR: .
......@@ -33,7 +33,7 @@ TRAIN:
RPN_STRADDLE_THRESH: -1 # default 0
TEST:
DATASETS: ('coco_2014_minival',)
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
RPN_PRE_NMS_TOP_N: 10000 # Per FPN level
......
......@@ -33,7 +33,7 @@ TRAIN:
RPN_STRADDLE_THRESH: -1 # default 0
TEST:
DATASETS: ('coco_2014_minival',)
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
RPN_PRE_NMS_TOP_N: 10000 # Per FPN level
......
......@@ -33,7 +33,7 @@ TRAIN:
RPN_STRADDLE_THRESH: -1 # default 0
TEST:
DATASETS: ('coco_2014_minival',)
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
RPN_PRE_NMS_TOP_N: 10000 # Per FPN level
......
......@@ -33,7 +33,7 @@ TRAIN:
RPN_STRADDLE_THRESH: -1 # default 0
TEST:
DATASETS: ('coco_2014_minival',)
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
RPN_PRE_NMS_TOP_N: 10000 # Per FPN level
......
......@@ -38,7 +38,7 @@ TRAIN:
RPN_STRADDLE_THRESH: -1 # default 0
TEST:
DATASETS: ('coco_2014_minival',)
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
RPN_PRE_NMS_TOP_N: 10000 # Per FPN level
......
......@@ -38,7 +38,7 @@ TRAIN:
RPN_STRADDLE_THRESH: -1 # default 0
TEST:
DATASETS: ('coco_2014_minival',)
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
RPN_PRE_NMS_TOP_N: 10000 # Per FPN level
......
......@@ -38,7 +38,7 @@ TRAIN:
RPN_STRADDLE_THRESH: -1 # default 0
TEST:
DATASETS: ('coco_2014_minival',)
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
RPN_PRE_NMS_TOP_N: 10000 # Per FPN level
......
......@@ -38,7 +38,7 @@ TRAIN:
RPN_STRADDLE_THRESH: -1 # default 0
TEST:
DATASETS: ('coco_2014_minival',)
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
RPN_PRE_NMS_TOP_N: 10000 # Per FPN level
......
......@@ -25,7 +25,7 @@ TRAIN:
MAX_SIZE: 1333
TEST:
DATASETS: ('coco_2014_minival','coco_2014_train','coco_2014_valminusminival')
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
RPN_PRE_NMS_TOP_N: 1000 # Per FPN level
RPN_POST_NMS_TOP_N: 2000
......
......@@ -20,7 +20,7 @@ TRAIN:
MAX_SIZE: 1333
TEST:
DATASETS: ('coco_2014_minival','coco_2014_train','coco_2014_valminusminival')
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
USE_NCCL: False
OUTPUT_DIR: .
......@@ -25,7 +25,7 @@ TRAIN:
MAX_SIZE: 1333
TEST:
DATASETS: ('coco_2014_minival','coco_2014_train','coco_2014_valminusminival')
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
RPN_PRE_NMS_TOP_N: 1000 # Per FPN level
RPN_POST_NMS_TOP_N: 2000
......
......@@ -30,7 +30,7 @@ TRAIN:
MAX_SIZE: 1333
TEST:
DATASETS: ('coco_2014_minival','coco_2014_train','coco_2014_valminusminival')
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
RPN_PRE_NMS_TOP_N: 1000 # Per FPN level
RPN_POST_NMS_TOP_N: 2000
......
......@@ -30,7 +30,7 @@ TRAIN:
MAX_SIZE: 1333
TEST:
DATASETS: ('coco_2014_minival','coco_2014_train','coco_2014_valminusminival')
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
RPN_PRE_NMS_TOP_N: 1000 # Per FPN level
RPN_POST_NMS_TOP_N: 2000
......
......@@ -25,7 +25,7 @@ TRAIN:
MAX_SIZE: 1333
TEST:
DATASETS: ('keypoints_coco_2014_minival', 'keypoints_coco_2014_train', 'keypoints_coco_2014_valminusminival', 'keypoints_coco_2015_test')
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
RPN_PRE_NMS_TOP_N: 1000 # Per FPN level
RPN_POST_NMS_TOP_N: 2000
......
......@@ -25,7 +25,7 @@ TRAIN:
MAX_SIZE: 1333
TEST:
DATASETS: ('keypoints_coco_2014_minival', 'keypoints_coco_2014_train', 'keypoints_coco_2014_valminusminival', 'keypoints_coco_2015_test')
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
RPN_PRE_NMS_TOP_N: 1000 # Per FPN level
RPN_POST_NMS_TOP_N: 2000
......
......@@ -30,7 +30,7 @@ TRAIN:
MAX_SIZE: 1333
TEST:
DATASETS: ('keypoints_coco_2014_minival', 'keypoints_coco_2014_train', 'keypoints_coco_2014_valminusminival', 'keypoints_coco_2015_test')
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
RPN_PRE_NMS_TOP_N: 1000 # Per FPN level
RPN_POST_NMS_TOP_N: 2000
......
......@@ -30,7 +30,7 @@ TRAIN:
MAX_SIZE: 1333
TEST:
DATASETS: ('keypoints_coco_2014_minival', 'keypoints_coco_2014_train', 'keypoints_coco_2014_valminusminival', 'keypoints_coco_2015_test')
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
RPN_PRE_NMS_TOP_N: 1000 # Per FPN level
RPN_POST_NMS_TOP_N: 2000
......
......@@ -46,7 +46,7 @@ TRAIN:
RPN_PRE_NMS_TOP_N: 2000 # Per FPN level
TEST:
DATASETS: ('coco_2014_minival',)
SCALES: (500,)
SCALE: 500
MAX_SIZE: 833
NMS: 0.5
RPN_PRE_NMS_TOP_N: 1000 # Per FPN level
......
......@@ -46,7 +46,7 @@ TRAIN:
RPN_PRE_NMS_TOP_N: 2000 # Per FPN level
TEST:
DATASETS: ('coco_2014_minival',)
SCALES: (500,)
SCALE: 500
MAX_SIZE: 833
NMS: 0.5
RPN_PRE_NMS_TOP_N: 1000 # Per FPN level
......
......@@ -46,7 +46,7 @@ TRAIN:
RPN_PRE_NMS_TOP_N: 2000 # Per FPN level
TEST:
DATASETS: ('coco_2014_minival',)
SCALES: (500,)
SCALE: 500
MAX_SIZE: 833
NMS: 0.5
RPN_PRE_NMS_TOP_N: 1000 # Per FPN level
......
......@@ -46,7 +46,7 @@ TRAIN:
RPN_PRE_NMS_TOP_N: 2000 # Per FPN level
TEST:
DATASETS: ('coco_2014_minival',)
SCALES: (500,)
SCALE: 500
MAX_SIZE: 833
NMS: 0.5
RPN_PRE_NMS_TOP_N: 1000 # Per FPN level
......
......@@ -38,7 +38,7 @@ TRAIN:
RPN_PRE_NMS_TOP_N: 2000 # Per FPN level
TEST:
DATASETS: ('coco_2014_minival',)
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
RPN_PRE_NMS_TOP_N: 1000 # Per FPN level
......
......@@ -44,7 +44,7 @@ TEST:
DATASETS: ('keypoints_coco_2014_minival',)
PROPOSAL_FILES: ('https://s3-us-west-2.amazonaws.com/detectron/35998996/12_2017_baselines/rpn_person_only_R-50-FPN_1x.yaml.08_10_08.0ZWmJm6F/output/test/keypoints_coco_2014_minival/generalized_rcnn/rpn_proposals.pkl',)
PROPOSAL_LIMIT: 1000
SCALES: (800,)
SCALE: 800
MAX_SIZE: 1333
NMS: 0.5
WEIGHTS: https://s3-us-west-2.amazonaws.com/detectron/37651887/12_2017_baselines/keypoint_rcnn_R-50-FPN_s1x.yaml.20_01_40.FDjUQ7VX/output/train/keypoints_coco_2014_train%3Akeypoints_coco_2014_valminusminival/generalized_rcnn/model_final.pkl
......
......@@ -213,11 +213,8 @@ __C.TEST.WEIGHTS = b''
# If multiple datasets are listed, testing is performed on each one sequentially
__C.TEST.DATASETS = ()
# Scales to use during testing
# Each scale is the pixel size of an image's shortest side
# If multiple scales are given, then all scales are used as in multiscale
# inference
__C.TEST.SCALES = (600, )
# Scale to use during testing
__C.TEST.SCALE = 600
# Max pixel size of the longest side of a scaled input image
__C.TEST.MAX_SIZE = 1000
......@@ -968,7 +965,7 @@ __C.CLUSTER.ON_CLUSTER = False
# yaml configs, you can add the full config key as a string to the set below.
# ---------------------------------------------------------------------------- #
_DEPCRECATED_KEYS = set(
(
{
'FINAL_MSG',
'MODEL.DILATION',
'ROOT_GPU_ID',
......@@ -977,7 +974,7 @@ _DEPCRECATED_KEYS = set(
'TRAIN.DROPOUT',
'USE_GPU_NMS',
'TEST.NUM_TEST_IMAGES',
)
}
)
# ---------------------------------------------------------------------------- #
......@@ -1006,6 +1003,11 @@ _RENAMED_KEYS = {
"'path/to/file1:path/to/file2' -> " +
"('path/to/file1', 'path/to/file2')"
),
'TEST.SCALES': (
'TEST.SCALE',
"Also convert from a tuple, e.g. (600, ), " +
"to a integer, e.g. 600."
),
}
......
......@@ -42,9 +42,9 @@ from core.config import cfg
from datasets import task_evaluation
from datasets.json_dataset import JsonDataset
from modeling import model_builder
from utils.blob import im_list_to_blob
from utils.io import save_object
from utils.timer import Timer
import utils.blob as blob_utils
import utils.c2 as c2_utils
import utils.env as envu
import utils.net as nu
......@@ -186,8 +186,8 @@ def generate_proposals_on_roidb(
def im_proposals(model, im):
"""Generate RPN proposals on a single image."""
inputs = {}
inputs['data'], inputs['im_info'] = _get_image_blob(im)
scale = inputs['im_info'][0, 2]
inputs['data'], im_scale, inputs['im_info'] = \
blob_utils.get_image_blob_for_inference(im)
for k, v in inputs.items():
workspace.FeedBlob(core.ScopedName(k), v.astype(np.float32, copy=False))
workspace.RunNet(model.net.Proto().name)
......@@ -224,7 +224,7 @@ def im_proposals(model, im):
# Column 0 is the batch index in the (batch ind, x1, y1, x2, y2) encoding,
# so we remove it since we just want to return boxes
# Scale proposals back to the original input image scale
boxes = boxes[:, 1:] / scale
boxes = boxes[:, 1:] / im_scale
return boxes, scores
......@@ -255,41 +255,3 @@ def evaluate_proposal_file(dataset, proposal_file, output_dir):
recall_file = os.path.join(output_dir, 'rpn_proposal_recall.pkl')
save_object(results, recall_file)
return results
def _get_image_blob(im):
"""Converts an image into a network input.
Arguments:
im (ndarray): a color image in BGR order
Returns:
blob (ndarray): a data blob holding an image pyramid
im_scale_factors (list): list of image scales (relative to im) used
in the image pyramid
"""
im_orig = im.astype(np.float32, copy=True)
im_orig -= cfg.PIXEL_MEANS
im_shape = im_orig.shape
im_size_min = np.min(im_shape[0:2])
im_size_max = np.max(im_shape[0:2])
processed_ims = []
assert len(cfg.TEST.SCALES) == 1
target_size = cfg.TEST.SCALES[0]
im_scale = float(target_size) / float(im_size_min)
# Prevent the biggest axis from being more than MAX_SIZE
if np.round(im_scale * im_size_max) > cfg.TEST.MAX_SIZE:
im_scale = float(cfg.TEST.MAX_SIZE) / float(im_size_max)
im = cv2.resize(im_orig, None, None, fx=im_scale, fy=im_scale,
interpolation=cv2.INTER_LINEAR)
im_info = np.hstack((im.shape[:2], im_scale))[np.newaxis, :]
processed_ims.append(im)
# Create a blob to hold the input images
blob = im_list_to_blob(processed_ims)
return blob, im_info
This diff is collapsed.
......@@ -27,10 +27,10 @@ from collections import defaultdict
from caffe2.python import core, workspace
from core.config import cfg
from core.rpn_generator import _get_image_blob
from modeling.generate_anchors import generate_anchors
from utils.timer import Timer
import utils.blob as blob_utils
import utils.boxes as box_utils
logger = logging.getLogger(__name__)
......@@ -76,7 +76,8 @@ def im_detect_bbox(model, im, timers=None):
k_max, k_min = cfg.FPN.RPN_MAX_LEVEL, cfg.FPN.RPN_MIN_LEVEL
A = cfg.RETINANET.SCALES_PER_OCTAVE * len(cfg.RETINANET.ASPECT_RATIOS)
inputs = {}
inputs['data'], inputs['im_info'] = _get_image_blob(im)
inputs['data'], im_scale, inputs['im_info'] = \
blob_utils.get_image_blob_for_inference(im)
cls_probs, box_preds = [], []
for lvl in range(k_min, k_max + 1):
suffix = 'fpn{}'.format(lvl)
......@@ -86,7 +87,6 @@ def im_detect_bbox(model, im, timers=None):
workspace.FeedBlob(core.ScopedName(k), v.astype(np.float32, copy=False))
workspace.RunNet(model.net.Proto().name)
scale = inputs['im_info'][0, 2]
cls_probs = workspace.FetchBlobs(cls_probs)
box_preds = workspace.FetchBlobs(box_preds)
......@@ -147,7 +147,7 @@ def im_detect_bbox(model, im, timers=None):
pred_boxes = (
box_utils.bbox_transform(boxes, box_deltas)
if cfg.TEST.BBOX_REG else boxes)
pred_boxes /= scale
pred_boxes /= im_scale
pred_boxes = box_utils.clip_tiled_boxes(pred_boxes, im.shape)
box_scores = np.zeros((pred_boxes.shape[0], 5))
box_scores[:, 0:4] = pred_boxes
......
......@@ -105,7 +105,7 @@ def _get_image_blob(roidb):
im = im[:, ::-1, :]
target_size = cfg.TRAIN.SCALES[scale_inds[i]]
im, im_scale = blob_utils.prep_im_for_blob(
im, cfg.PIXEL_MEANS, [target_size], cfg.TRAIN.MAX_SIZE
im, cfg.PIXEL_MEANS, target_size, cfg.TRAIN.MAX_SIZE
)
im_scales.append(im_scale[0])
processed_ims.append(im[0])
......
......@@ -37,6 +37,33 @@ from caffe2.proto import caffe2_pb2
from core.config import cfg
def get_image_blob_for_inference(im):
"""Converts an image into a network input.
Arguments:
im (ndarray): a color image in BGR order
Returns:
blob (ndarray): a data blob holding an image pyramid
im_scale (float): image scale (target size) / (original size)
im_info (ndarray)
"""
processed_im, im_scale = prep_im_for_blob(
im, cfg.PIXEL_MEANS, cfg.TEST.SCALE, cfg.TEST.MAX_SIZE
)
blob = im_list_to_blob(processed_im)
# NOTE: this height and width may be larger than actual scaled input image
# due to the FPN.COARSEST_STRIDE related padding in im_list_to_blob. We are
# maintaining this behavior for now to make existing results exactly
# reproducible (in practice using the true input image height and width
# yields nearly the same results, but they are sometimes slightly different
# because predictions near the edge of the image will be pruned more
# aggressively).
height, width = blob.shape[2], blob.shape[3]
im_info = np.hstack((height, width, im_scale))[np.newaxis, :]
return blob, im_scale, im_info.astype(np.float32)
def im_list_to_blob(ims):
"""Convert a list of images into a network input. Assumes images were
prepared using prep_im_for_blob or equivalent: i.e.
......@@ -47,6 +74,8 @@ def im_list_to_blob(ims):
Output is a 4D HCHW tensor of the images concatenated along axis 0 with
shape.
"""
if not isinstance(ims, list):
ims = [ims]
max_shape = np.array([im.shape for im in ims]).max(axis=0)
# Pad the image so they can be divisible by a stride
if cfg.FPN.FPN_ON:
......@@ -55,8 +84,9 @@ def im_list_to_blob(ims):
max_shape[1] = int(np.ceil(max_shape[1] / stride) * stride)
num_images = len(ims)
blob = np.zeros((num_images, max_shape[0], max_shape[1], 3),
dtype=np.float32)
blob = np.zeros(
(num_images, max_shape[0], max_shape[1], 3), dtype=np.float32
)
for i in range(num_images):
im = ims[i]
blob[i, 0:im.shape[0], 0:im.shape[1], :] = im
......@@ -67,7 +97,7 @@ def im_list_to_blob(ims):
return blob
def prep_im_for_blob(im, pixel_means, target_sizes, max_size):
def prep_im_for_blob(im, pixel_means, target_size, max_size):
"""Prepare an image for use as a network input blob. Specially:
- Subtract per-channel pixel mean
- Convert to float32
......@@ -80,19 +110,19 @@ def prep_im_for_blob(im, pixel_means, target_sizes, max_size):
im_shape = im.shape
im_size_min = np.min(im_shape[0:2])
im_size_max = np.max(im_shape[0:2])
ims = []
im_scales = []
for target_size in target_sizes:
im_scale = float(target_size) / float(im_size_min)
# Prevent the biggest axis from being more than max_size
if np.round(im_scale * im_size_max) > max_size:
im_scale = float(max_size) / float(im_size_max)
im = cv2.resize(im, None, None, fx=im_scale, fy=im_scale,
interpolation=cv2.INTER_LINEAR)
ims.append(im)
im_scales.append(im_scale)
return ims, im_scales
im_scale = float(target_size) / float(im_size_min)
# Prevent the biggest axis from being more than max_size
if np.round(im_scale * im_size_max) > max_size:
im_scale = float(max_size) / float(im_size_max)
im = cv2.resize(
im,
None,
None,
fx=im_scale,
fy=im_scale,
interpolation=cv2.INTER_LINEAR
)
return im, im_scale
def zeros(shape, int32=False):
......
......@@ -434,8 +434,6 @@ def _prepare_blobs(
def run_model_pb(args, net, init_net, im, check_blobs):
assert len(cfg.TEST.SCALES) == 1
workspace.ResetWorkspace()
workspace.RunNetOnce(init_net)
mutils.create_input_blobs_for_net(net.Proto())
......@@ -445,7 +443,7 @@ def run_model_pb(args, net, init_net, im, check_blobs):
input_blobs = _prepare_blobs(
im,
cfg.PIXEL_MEANS,
cfg.TEST.SCALES[0], cfg.TEST.MAX_SIZE
cfg.TEST.SCALE, cfg.TEST.MAX_SIZE
)
gpu_blobs = []
if args.device == 'gpu':
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment