Skip to content

Documentation for convert_to_coco_classification ​

Path: utils/convert_to_coco_classification.py

Module Description ​

Convert classification dataset to COCO JSON format.

This script converts a folder-based classification dataset (where each folder is a class) to COCO JSON format that can be uploaded to Roboflow for classification training.

Functions ​

convert_dataset_to_coco ​

Convert a folder-based classification dataset to COCO JSON format.

Args: dataset_path (str): Path to the dataset root directory output_json_path (str): Path to output JSON file relative_paths (bool): Whether to use relative paths in JSON (recommended for Roboflow) limit_per_class (int, optional): Limit number of images per class. Defaults to None.

main ​

No description provided.