Reference for ultralytics/models/fastsam/val.py
Note
This file is available at https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/fastsam/val.py. If you spot a problem please help fix it by contributing a Pull Request 🛠️. Thank you 🙏!
ultralytics.models.fastsam.val.FastSAMValidator
Bases: SegmentationValidator
Custom validation class for fast SAM (Segment Anything Model) segmentation in Ultralytics YOLO framework.
Extends the SegmentationValidator class, customizing the validation process specifically for fast SAM. This class sets the task to 'segment' and uses the SegmentMetrics for evaluation. Additionally, plotting features are disabled to avoid errors during validation.
Attributes:
Name | Type | Description |
---|---|---|
dataloader |
The data loader object used for validation. |
|
save_dir |
str
|
The directory where validation results will be saved. |
pbar |
str
|
A progress bar object. |
args |
str
|
Additional arguments for customization. |
_callbacks |
str
|
List of callback functions to be invoked during validation. |
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dataloader
|
DataLoader
|
Dataloader to be used for validation. |
None
|
save_dir
|
Path
|
Directory to save results. |
None
|
pbar
|
tqdm
|
Progress bar for displaying progress. |
None
|
args
|
SimpleNamespace
|
Configuration for the validator. |
None
|
_callbacks
|
dict
|
Dictionary to store various callback functions. |
None
|
Notes
Plots for ConfusionMatrix and other related metrics are disabled in this class to avoid errors.