Classifies night and day images based on pixel values.
There are two modes you can run the script: cluster or classify
- In cluster mode, all the images are cluster into two categories (can change). The centroid values are automatically saved in centroids.json file.
- In 'classify' mode, the centroid values are read from the json file and used to classify new images. If the similarity measures (distance between two images) are too high, a warning message will be shown.
Converts label files from one format to another. Currently, supported formats are:
- CVAT xml to EdgeImpulse
- Kaggle xml to EdgeImpulse
Example:
python .\convert_labels.py -mode convert -path .\SkNetworks_CarDashboard_21036\01.rawData\2\BMW\BMW_day_0_1.xml -for
mat_in cvat_xml
The format of COCO JSON is here The bounding box format for object detection is
annotation{
"id": int, "image_id": int, "category_id": int, "segmentation": RLE or [polygon], "area": float, "bbox": [x,y,width,height], "iscrowd": 0 or 1,
}
categories[{
"id": int, "name": str, "supercategory": str,
}]