create_annotations.py: Create Draft Annotation From Animal Detector Output

August 5, 2021 ยท View on GitHub

This program ingests the animal detection log file generated by the autocopy.py program and creates a draft video annotation for use by the annotator.py program.

Command Line Arguments

All arguments are optional; default values can be provided in a configuration file.

Short FormLong FormTypeDescription
-c--configpathConfiguration file. If not provided, defaults to "create_annotations.config" located in the same directory as this program.

Configuration File Settings

If no configuration file is provided using the -c command line option, this program will read configuration settings from a file named create_annotations.config An example of how each setting is used can be found in the configuration file production.config

[General_Settings]

This section contains configuration variables used by more than one program in the Camera Trap Tools suite.

  • default_annotation_folder: path to root of the default folder where annotations are stored
  • default_image_folder: path to root of default folder where images are stored
  • detection_box_folder: path to root of the folder storing bounding boxes of animals detected
  • detection_log_file: path to file indicating the number of animals detected in each image file
  • prefix: string prepended to image filename

[Create_Annotations]

This section contains configuration variables only used by this program.

  • append_annotations: indicates if annotations should be appended to an existing annotation file
  • sequence_break_threshold: The number of consecutive images not containing an animal that is needed to indicate break in sequence.
    The animal detector is not perfect and often creates small gaps in what should be a continuous sequence of images containing animals. To overcome this problem, we ignore gaps smaller than this threshold.