original page is here:
https://marearts.notion.site/Labelme2Yolo-Yolo2Labelme-3564dd886ac64b5499d6f2784a8a4be8
yolo2labelme main code
if __name__ == "__main__":
#parameters
paser = argparse.ArgumentParser()
args = paser.parse_args("")
##### set params #####
#input : yolo image, label path
args.yolo_images_path = './yolo_data/images/'
args.yolo_labels = './yolo_data/labels/'
#class count
args.yolo_nc = 80
#class names
args.yolo_names = ['aeroplane', 'apple', 'backpack', 'banana', 'baseball bat', 'baseball glove', 'bear', 'bed', 'bench', 'bicycle', 'bird', 'boat', 'book', 'bottle', 'bowl', 'broccoli', 'bus', 'cake', 'car', 'carrot', 'cat', 'cell phone', 'chair', 'clock', 'cow', 'cup', 'diningtable', 'dog', 'donut', 'elephant', 'fire hydrant', 'fork', 'frisbee', 'giraffe', 'hair drier', 'handbag', 'horse', 'hot dog', 'keyboard', 'kite', 'knife', 'laptop', 'microwave', 'motorbike', 'mouse', 'orange', 'oven', 'parking meter', 'person', 'pizza', 'pottedplant', 'refrigerator', 'remote', 'sandwich', 'scissors', 'sheep', 'sink', 'skateboard', 'skis', 'snowboard', 'sofa', 'spoon', 'sports ball', 'stop sign', 'suitcase', 'surfboard', 'teddy bear', 'tennis racket', 'tie', 'toaster', 'toilet', 'toothbrush', 'traffic light', 'train', 'truck', 'tvmonitor', 'umbrella', 'vase', 'wine glass', 'zebra']
#output : labelme output path
args.labelme_path = './output_yolo2labelme/'
args.labelme_save_image = True #False #create jpg images in output path
#######################
#######################
#start processing
yolo2labelme_main(args)
#######################
labelme2yolo main code
#parameters
paser = argparse.ArgumentParser()
args = paser.parse_args("")
##### set params #####
#input : labelme output path
args.labelme_path = './output_yolo2labelme/'
args.labelme_save_image = True #False #create jpg images in output path
#output : yolo image, label path
args.yolo_images_path = './output_yolo_data/images/'
args.yolo_labels = './output_yolo_data/labels/'
#class count
args.yolo_nc = 80
#class names
args.yolo_names = ['aeroplane', 'apple', 'backpack', 'banana', 'baseball bat', 'baseball glove', 'bear', 'bed', 'bench', 'bicycle', 'bird', 'boat', 'book', 'bottle', 'bowl', 'broccoli', 'bus', 'cake', 'car', 'carrot', 'cat', 'cell phone', 'chair', 'clock', 'cow', 'cup', 'diningtable', 'dog', 'donut', 'elephant', 'fire hydrant', 'fork', 'frisbee', 'giraffe', 'hair drier', 'handbag', 'horse', 'hot dog', 'keyboard', 'kite', 'knife', 'laptop', 'microwave', 'motorbike', 'mouse', 'orange', 'oven', 'parking meter', 'person', 'pizza', 'pottedplant', 'refrigerator', 'remote', 'sandwich', 'scissors', 'sheep', 'sink', 'skateboard', 'skis', 'snowboard', 'sofa', 'spoon', 'sports ball', 'stop sign', 'suitcase', 'surfboard', 'teddy bear', 'tennis racket', 'tie', 'toaster', 'toilet', 'toothbrush', 'traffic light', 'train', 'truck', 'tvmonitor', 'umbrella', 'vase', 'wine glass', 'zebra']
#######################
#######################
#start processing
labelme2yolo_main(args)
#######################
Thank you.
www.marearts.com
๐๐ป♂️
No comments:
Post a Comment