Classification Agent
The ClassificationAgent
performs image classification.
Initialization
Parameters
The ClassificationAgent
is initialized with two arguments:
Specifies the list of class labels that will be used for the image classification task.
Each object of interest (or “class”) should be described textually within the classes
list.
Represents the model used to perform the image segmentation task and takes an instance of ClassificationModel
. If left unspecified, this parameter defaults to the CLIP()
Model.
The supported ClassificationModel
models can be found below:
Note: Since a text embedding of each class will be used to when classifying the image, a more specific class name will yield a more specific detection. You should scope your class names accordingly.
For instance, a
"car"
class will result in more general detections than a"blue Honda Accord"
class.
Example
The output from this agent will be an ExecutionNode containing the previous image and the classification result (i.e. either “hard hat” or “no hard hat”).