Repository navigation
v3.16.1 – YOLO Classification Folder Checks, Detection Crops & Public Model Names
License note (added with 3.17.1): the YOLO implementation in this release (
Sources/SwiftVision/YOLO/andYOLODetector) 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.displayNameis public (YOLOv8n,YOLO11s).YOLOv8Detector.modelName,YOLOv8Classifier.modelNameandYOLOCheckpointInfo.modelNameadd the task, so classifiers readYOLOv8n-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>/…pngwithout resampling and returns the dataset, so objects annotated for detection (faces labeled by expression, for example) train aYOLOv8Classifierdirectly.classNamesfixes label indices across splits;paddingadds a clamped margin; crops belowminimumSizepixels 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,imagesandlabels. A directory holding exactlyimages/andlabels/now throwsVisionError.invalidInputnaming the detection layout and the cropping initializer, and class folders with no images throw an error that lists them, as torchvision'sImageFolderdoes. Images in nested subfolders still count for their class.