瀏覽代碼

minor update in dataset info file. changed the way the feature names are constructed. minor changes in display script

Dimitri Korsch 6 年之前
父節點
當前提交
a2eedc2708
共有 4 個文件被更改,包括 19 次插入2 次删除
  1. 1 1
      cvdatasets/utils/__init__.py
  2. 1 0
      scripts/display.py
  3. 15 1
      scripts/info_files/info.yml
  4. 2 0
      scripts/utils/parser.py

+ 1 - 1
cvdatasets/utils/__init__.py

@@ -14,7 +14,7 @@ def feature_file_name(subset, part_info, model_info):
 	return "{subset}{suffix}.{model}.npz".format(
 			subset=subset,
 			suffix=part_info.feature_suffix,
-			model=model_info.folder)
+			model=model_info.class_key)
 
 def read_info_file(fpath):
 	with open(fpath) as f:

+ 1 - 0
scripts/display.py

@@ -34,6 +34,7 @@ def main(args):
 	data = annot.new_dataset(
 		args.subset,
 
+		center_cropped=not args.no_center_crop,
 		crop_to_bb=args.crop_to_bb,
 		crop_uniform=args.crop_uniform,
 

+ 15 - 1
scripts/info_files/info.yml

@@ -122,7 +122,6 @@ PART_TYPES:
       - 0.31
 
   NAC:            &parts_nac
-    annotations: NAC/2017-bilinear
     feature_suffix: _20parts
     rescale_size: !!int 224
     scales:
@@ -205,6 +204,7 @@ PARTS:
   CUB200_NAC:
     <<: *cub200
     <<: *parts_nac
+    annotations: NAC/2017-bilinear
 
   CUB200_L1_pred:
     <<: *cub200
@@ -232,6 +232,20 @@ PARTS:
     rescale_size: !!int 427
     feature_suffix: _15parts_L1_full
 
+  CUB200_L1_pred_2:
+    <<: *cub200
+    <<: *parts_l1p
+    annotations: L1_pred_2
+    rescale_size: !!int 427
+    feature_suffix: _2parts_L1_pred
+
+  CUB200_L1_full_2:
+    <<: *cub200
+    <<: *parts_l1f
+    annotations: L1_full_2
+    rescale_size: !!int 427
+    feature_suffix: _2parts_L1_full
+
 
   ####################################
   # NA Birds

+ 2 - 0
scripts/utils/parser.py

@@ -45,6 +45,8 @@ def parse_args():
 			help="Crop image to the bounding box",
 			action="store_true"),
 
+		Arg("--no_center_crop", action="store_true"),
+
 		Arg("--crop_uniform",
 			help="Try to extend the bounding box to same height and width",
 			action="store_true"),