Open AdityaKallingal opened 2 weeks ago
Before starting, ensure that your datasets are converted into the COCO format (JSON file). The COCO format is widely used for object detection tasks and consists of three main components:
images: Contains the metadata of the images (ID, file name, dimensions, etc.).
annotations: Contains the annotations for each image, including the bounding box coordinates, segmentation masks, and category IDs.
categories: Contains the list of object categories (classes).
You can use custom scripts or available tools to convert datasets from various formats (Pascal VOC, YOLO, etc.) into the COCO format. Once the datasets are in COCO format, proceed to the next step.
After converting your dataset into COCO format, use the provided split.py script to split the dataset into training and testing sets. The script randomly divides the dataset into the specified proportions (e.g., 80% for training and 20% for testing).
Here’s how to use the split.py:
This script will output two new JSON files: 1.train.json: Contains the training data. 2.test.json: Contains the testing data.
After splitting the dataset, you can select a suitable number of samples from the training set for k-shot learning. k-shot refers to selecting a small number (k) of examples for each category in the dataset.
To generate a k-shot dataset from the training set, follow these steps:
Once this process is complete, the kshot_train.json will contain the selected k-shot data, which can be used for training k-shot models.
Before training, update these two files:lib/categories.py, detectron2/data/datasets/build.py. Then adding your datasets name in 'datasets_name'.
Hi,
First, I want to thank you for your incredible work on CD-ViTO. I’m really excited to explore its capabilities for few-shot object detection! I’ve successfully gone through the initial setup and experiments, but now I’d like to train the model on my own custom dataset.
Could you please provide a step-by-step guide or any pointers on how to prepare and train CD-ViTO using custom data? Specifically, I would appreciate some insights on:
Dataset Preparation:
1.What format should the custom dataset be in (e.g., COCO, Pascal VOC)? 2.How should annotations be structured for compatibility with the model? 3.Any preprocessing steps required?
Configuration:
1.What changes need to be made to the configuration files (e.g., specifying the number of classes, dataset paths, etc.)? Training Pipeline:
2.How can I initiate training on my custom dataset? Any specific command-line arguments or scripts I should follow?
3.I would greatly appreciate it if you could walk me through the process or point me to relevant parts of the documentation (if available).
Thank you for your time and for creating this amazing tool!
Best regards, Aditya.