Skip to content

changsin/ClassifyImages

Repository files navigation

Classify Images

classify_night_day.py

Classifies night and day images based on pixel values.

cluster_images.py

There are two modes you can run the script: cluster or classify

  1. In cluster mode, all the images are cluster into two categories (can change). The centroid values are automatically saved in centroids.json file.
  2. 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.

convert_labels.py

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

Formats

COCO JSON

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,
}]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published