Due to using easily accessible YAML metadata sidecar files PhotoDB enables interaction with image metadata through any programming language at any point of a proccessing workflow. When annotating large image sets you might want to use object detection models. Here, you can learn how to use the python package photodb_yolo_object_detection to

  • transform annotations generated in PhotoApp to YOLO format

  • train a custom YOLO model

and

  • apply the model to unseen images

Prerequisits

  • Python > 3.2

  • photodb_yolo_object_detection installation

  • configure PhotoDB

    • make sure to name the image data root directory images/ to comply with YOLO formating expectations

    • make sure your config.yaml (located in PhotoDB root directory) is up to date

  • annotated training, validation, and optionally testing data

    • use photo_review_lists to mark subsets of your image data for model training / validation / testing

    • draw training / validation / testing bounding boxes in PhotoApp

Workflow

— Use -h or --help to show command line tool usage. —

First, convert your training / validation / testing data into YOLO format, i.e. generate individual YOLO format label files stored in labels/ parallel to images/, and some YOLO configuration files stored in [project name]/ within specified output directory.

photodb_yolo_reformat

Second, use your custom data to train a YOLO model for object detection. This tool provides minimal training, i.e. uses default training parameters and does not do hyperparameter tuning. Adjust the script to include hyperparameter tuning for optimal model results, if needed.

photodb_yolo_train

Third, apply your custom trained model to all images.

photodb_yolo_detect