-
Notifications
You must be signed in to change notification settings - Fork 0
basic_predict
basic_predict.py - run a basic YOLO11 Predict Mode for object inference
python basic_predict.py
This Python script performs the following steps:
- Imports the Ultralytics YOLO package
- Defines the pretrained model for object inference
- Specifies the input data for object inference
- Returns the results after processing by YOLO11
A Boxes object containing the detection bounding boxes.
A Masks object containing the detection masks.
A Keypoints object containing detected keypoints for each object.
A Probs object containing probabilities of each class for classification task. The labels are from COCO:
5 - bus
0 - person
An OBB object containing oriented bounding boxes. Must use a model that provides OBB support.
The labels used in Common Object in Context, COCO, to classify the images. Note that the index starts at zero.
{0: 'person', ... 79: 'toothbrush'}
A list of all environment variables that affect the program or function and how they affect it.
A list of the files the program or function uses, such as configuration files, startup files, and files the program directly operates on.
A description of any standards or conventions that relate to the function or command. Commonly just a list of standards.
Adapted from the Ultralytics website.
Miscellaneous notes.
n/a
n/a
$ python basic_predict.py
armw
Model Prediction with Ultralytics YOLO
ultralytics/engine/results.py
A description of the command-line options accepted by a program and how they change its behavior.
The normal termination message for the script is:
Process finished with exit code 0
- Python packages:
- os - operating system functions (used here to split fully qualifed filenames)
- Ultralytics - YOLOv8 or later
- Python interpreter - 3.11 or later
n/a
There are no explicit versions of this script. The repository contains trackable commits, pushes and merges.
Keep on learning!