def main(): #geojson_file = '../bounding_box_referenced_2.geojson' #geojson_file = '../harvey_test_second.geojson' geojson_file = '../bboxes_tomnod_2class_v1.geojson' coords, chips, classes, uids = wv.get_labels_w_uid_nondamaged(geojson_file) print('number of chips is :', chips.shape) test_tif = '20170902_10400100324DAE00_3210111_jpeg_compressed_09_05.tif' if test_tif in chips.tolist(): print('test tif exists!!!!!') #print('chips, ', chips.tolist()) #path = '/home/ubuntu/anyan/harvey_data/harvey_test_second/' #save_path = '/home/ubuntu/anyan/harvey_data/inspect_black_in_test/' path = '../harvey_vis_result_toydata/' save_path = '../harvey_vis_result_toydata_bboxes/' #aug.draw_bboxes_withindex(arr,coords_chip, uids_chip) draw_bbox_on_tiff(path, coords, chips, classes, uids, save_path)
num_class2_bbox = 0 num_class1_chip = 0 # number of chips contain class 1 num_class2_chip = 0 num_class1_aug_bbox = 0 # number of augmentated bbox num_class2_aug_bbox = 0 num_class1_aug_chip = 0 num_class2_aug_chip = 0 num_shifted_chips = 0 # number of chips added by shift #Parameters max_chips_per_res = 100000 train_writer = tf.python_io.TFRecordWriter("harvey_train_%s.record" % args.suffix) #test_writer = tf.python_io.TFRecordWriter("harvey_test_%s.record" % args.suffix) #coords,chips,classes = wv.get_labels(args.json_filepath) coords, chips, classes, uids = wv.get_labels_w_uid_nondamaged( args.json_filepath) # debug sample_percent = args.sample_percent # a list of classes to be augment. Set to set to be empty if no augmentation # is wanted if AUGMENT == True: class_to_aug = set([1]) else: class_to_aug = set([]) num_aug_per_class = {} # class_id: # of augmentation generated for class_id in class_to_aug: num_aug_per_class[class_id] = 0 #debug