Train a Model
import roboflow
rf = roboflow.Roboflow(api_key="YOUR_API_KEY")
project = rf.workspace().project("my-detector")
# Create a version with preprocessing and augmentation if you don't have one yet.
new_version = project.generate_version({
"preprocessing": {
"auto-orient": True,
"resize": {"width": 640, "height": 640, "format": "Stretch to"},
},
"augmentation": {},
})
version = project.version(new_version)
# Schedule training.
model = version.train(
model_type="rfdetr-nano", # pass an invalid value to get the full list back as an error
checkpoint=None, # optional: resume from a previous checkpoint
epochs=100, # optional: defaults are model-type-dependent
plot_in_notebook=False, # display a training-progress plot (notebook only)
)Parameters
After training
Last updated
Was this helpful?