Skip to content

precision-sustainable-ag/SemiF-AnnotationPipeline

Repository files navigation

SemiField Annotation Pipeline

Find unprocessed batches

  1. Install azcopy
  2. Activate conda environment
python find_unprocessed.py general.batch_id=find_unprocessed
  1. 2 files will be created
Path Input Output
.batchlogs/container_list.txt Used in the pipeline as input for download_data.py to download the appropriate batch sub-directories (images, masks, plant-detections) Created in find_unprocessed.py and lists container items in each batch directory in the Azure blob container
.batchlogs/unprocessed.txt Used as input for execute.sh to loop through each listed batch to run the pipeline Created in find_unprocessed.py

These 2 files must be compatible

If a batch is list in unprocessed.py It must also be in container_list.py with the appropriate batch sub-directories (images, masks, plant-detections) listed.

Run the pipeline

  1. Setup keys

  1. Manually list batches

    Create a file (.batchlogs/unprocessed.txt) and list the batches you want processed. Batches must be in the same "season". List the batches with one batch per line, for example:

    NOTE: The listed batches must be in the semifield-developed-images blob storage container.

    MD_2022-06-22
    MD_2022-06-24
    NC_2022-06-27
    TX_2022-06-28

    ⚠️ Batches from different seasons cannot be processed together.

    NOTE: If only listing one batch, it must be followed by an empty line.


  1. Define season in config.yaml

    Choose which "season" or type of crop to process. The season must correctly correspond with the listed batches in .batchlogs/unprocessed.txt. All batches must be of a single season.

    The general.season must be written exactly as one of currently available seasons, defined below:

    1. summer_weeds_2022
    2. cool_season_covers_2022_2023

  1. Other config settings
process setting description default
AutoSfM downscale.factor Input image downscaling factor (0-1) 0.5
AutoSfM align_photos.downscale Image alignment accuracy, lower is better 1
AutoSfM depth_map.downscale Depth map quality, lower is better 4

  1. Run the pipeline

    ./execute.sh

  1. Monitor Logs in .batchlogs



Release Notes:

Cool season cover crops 2022/23

  1. Removed dap (days after planting) metadata information in image and cutout metadata
  2. added season metadata field in cutouts
  3. added cropout_mean, cutout_mean, cropout_std, and cropout_std metadata for individual cutout images



Confluence Links

This repo contains the code necessary to automatically annotate batches of incoming images from 3 location around the US and was designed specifically for the Semi-field image acquisition protocols developed by the PSA network.

Details about the project and repo documentation can be found on the SemiField private Confluence page. Direct links to various sections can be found below.