|
|
@@ -59,14 +59,14 @@ def gen_onet_data(data_dir, anno_file, pnet_model_file, rnet_model_file, prefix_ |
|
|
|
cPickle.dump(all_boxes, f, cPickle.HIGHEST_PROTOCOL) |
|
|
|
|
|
|
|
|
|
|
|
gen_onet_sample_data(data_dir,anno_file,save_file) |
|
|
|
gen_onet_sample_data(data_dir,anno_file,save_file,prefix_path) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def gen_onet_sample_data(data_dir,anno_file,det_boxs_file): |
|
|
|
def gen_onet_sample_data(data_dir,anno_file,det_boxs_file,prefix): |
|
|
|
|
|
|
|
neg_save_dir = os.path.join(data_dir, "48/negative") |
|
|
|
pos_save_dir = os.path.join(data_dir, "48/positive") |
|
|
@@ -93,7 +93,7 @@ def gen_onet_sample_data(data_dir,anno_file,det_boxs_file): |
|
|
|
|
|
|
|
for annotation in annotations: |
|
|
|
annotation = annotation.strip().split(' ') |
|
|
|
im_idx = annotation[0] |
|
|
|
im_idx = os.path.join(prefix,annotation[0]) |
|
|
|
|
|
|
|
boxes = map(float, annotation[1:]) |
|
|
|
boxes = np.array(boxes, dtype=np.float32).reshape(-1, 4) |
|
|
|