boostcampaitech7 / level2-objectdetection-cv-21

level2-objectdetection-cv-21 created by GitHub Classroom
3 stars 0 forks source link

[FEAT] Add ultralytics model #108

Closed boyamie closed 2 weeks ago

boyamie commented 2 weeks ago

Background

Todo

See also

boyamie commented 2 weeks ago

rt-DETR

from ultralytics import RTDETR

# Load a COCO-pretrained RT-DETR-l model
model = RTDETR("rtdetr-l.pt")

# Display model information (optional)
model.info()

# Train the model on the COCO8 example dataset for 100 epochs
results = model.train(data="coco8.yaml", epochs=100, imgsz=640)

# Run inference with the RT-DETR-l model on the 'bus.jpg' image
results = model("path/to/bus.jpg")