# yolo_format **Repository Path**: ncwu-hy/yolo_format ## Basic Information - **Project Name**: yolo_format - **Description**: 将LabelImg标注的VOC数据转为Yolo格式 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-07-13 - **Last Updated**: 2023-07-26 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # LabelImg标注VOC数据转Yolo格式 CLI说明: 1. --labeled_dir / -ld: LabelImg直接标注的后的文件夹,该文件夹内包含图像及对应的xml文件。 2. --label_list / -ll:一个文本文件,记录了检测类别,每个类别一行 3. --output_image_dir / -oimgdir: 只包含图片的文件夹 4. --output_anno_dir / -oanndir: 只包含标注txt文件的文件夹 5. --move / -mv: 若使用该参数,则将labeled_dir中的图片移动到output_image_dir,否则只复制,labeled_dir中的图片仍保留。 ```shell python labelimgvoc2yolo.py -ld D:/Datasets/bird_drone_dataset/image_voc -ll D:/Datasets/bird_drone_dataset/label_list.txt -oimgdir D:/Datasets/bird_drone_dataset/image -oanndir D:/Datasets/bird_drone_dataset/labels ``` ```shell File Name: labelimgvoc2yolo.py Author: HY Xie Mail: 82154915@qq.com Created Time: 2022-07-12 Description: Convert labeld dataset created directly by LableImg to yolo format --labeled_dir: a directory including images and xml files, this directory is the original labeled_dir --label_list: a txt file include class name, one class per line --output_image_dir: a directory including image only, this directory will be created automatically if not exists --output_anno_dir: a directory including annotations only, this directory will be created automatically if not exists --move: if this argument is used, the images in labeled_dir will be moved to output_image_dir License: MIT ```