Skip to content

Latest commit

 

History

History
37 lines (28 loc) · 857 Bytes

README.md

File metadata and controls

37 lines (28 loc) · 857 Bytes

AutoLabelX

AutoLabel Image as Txt on Yolov7/Yolov5 Using Pre-Train Model

You NEED a pre-train model or train model to use

Setting

# Paths
image_folder = Path(r'Jnx03\DSC07001-9000') #Image you want to label
label_folder = Path(r'Jnx03\label') #Save Label folder

# Model
model = torch.load('best.pt', map_location=device)['model'].float() #Change Best.pt to you pre-train model

Instructions

  1. Install PyTorch and other dependencies:

    pip install torch torchvision pillow numpy
  2. Download and set up YOLOv7:

    git clone https://github.com/WongKinYiu/yolov7
    cd yolov7
  3. Place best.pt in the YOLOv7 directory.

  4. Run the script: Save the script above in a Python file, for example auto_label.py, and run it:

    python AutoLabel.py