tapis-project / camera-traps

BSD 3-Clause "New" or "Revised" License
5 stars 9 forks source link

Standardize file naming conventions #19

Closed richcar58 closed 1 year ago

richcar58 commented 1 year ago

Currently, the output directory (camera-traps/resources/images_dir) contains these files after execution:

All the input files end in .jpg, but the image_recv_plugin uses the image_format field from the NewImageEvent message when it names the .jpeg file. Afterwards, the image_score_plugin writes the _detections.jpg file.

The image_store_plugin doesn't know the naming convention used by the image_score_plugin. For deletion, I can change the image_store_plugin to delete .*, but for other operations the two plugins need an agreed upon file naming convention. Here's my recommendation:

  1. File names are constructed as documented:
    • .
  2. The image_score_plugin can create file named like this:
    • _detections.
richcar58 commented 1 year ago

The image_store_plugin now recognizes all files that begin with this string:

  <image_file_prefix><image_uuid>

Further coordination may be needed in the future if a resolution reduction strategy is implemented, but for now the image_store_plugin can manage all files related to an image as long as they are named as described.

richcar58 commented 1 year ago

Implemented in release 0.3.1.