Skip to content

v3.16.1 – YOLO Classification Folder Checks, Detection Crops & Public Model Names

Choose a tag to compare

@Nodibell Nodibell released this 04 Dec 15:26
· 50 commits to main since this release
4e02db5

License note (added with 3.17.1): the YOLO implementation in this release (Sources/SwiftVision/YOLO/ and YOLODetector) is a port of Ultralytics YOLO and is licensed under the GNU AGPL-3.0, not MIT. It was labelled MIT by mistake. Every other module is MIT. See NOTICE and the 3.17.1 release.

Added

  • Public YOLO model names (SwiftVision, G-069): YOLOv8Scale.displayName is public (YOLOv8n, YOLO11s). YOLOv8Detector.modelName, YOLOv8Classifier.modelName and YOLOCheckpointInfo.modelName add the task, so classifiers read YOLOv8n-cls / YOLO11s-cls.
  • Classification crops from detection splits (SwiftVision, G-068): YOLOClassificationDataset(croppingDetectionSamples:into:classNames:padding:minimumSize:) cuts every labeled box of [YOLODatasetSample] into <output>/<class>/…png without resampling and returns the dataset, so objects annotated for detection (faces labeled by expression, for example) train a YOLOv8Classifier directly. classNames fixes label indices across splits; padding adds a clamped margin; crops below minimumSize pixels are skipped.

Fixed

  • YOLOClassificationDataset(directory:) rejects folders that are not image-folder classes (SwiftVision, G-068): every subdirectory used to become a class, so a YOLO detection split opened as a classification dataset trained on two classes, images and labels. A directory holding exactly images/ and labels/ now throws VisionError.invalidInput naming the detection layout and the cropping initializer, and class folders with no images throw an error that lists them, as torchvision's ImageFolder does. Images in nested subfolders still count for their class.