precision-sustainable-ag / Field-AnnotationPipeline

This repo automates semantic labels and bounding boxes for Field imagery, within the broader Ag Image Repository, focusing on real-world agricultural conditions essential for training deep learning models.
MIT License
0 stars 0 forks source link

testing for segment_weeds.py #12

Closed mkutu closed 3 weeks ago

mkutu commented 1 month ago
  1. save results by species for a more thorough/easier way to identify segmentation cleaning differences
  2. play around/ look into pixelated borders that's occurring for some "broad" categories
    • create rules to define area_threshold in remove_small_holes for example:
      if clean_mask_area > 1000:
      area_threshold = 100
  3. clean up the script
    • organize saving and cleaning in separate methods
    • place remove_gray_hsv_color in clean_mask
    • add comments in large blocks of code
  4. place "broad" and "sparse" class_ids in config file, not hard coded in the script with their common name in comments
  5. add "category" in species metadata. for examples:
    {
    "detection_results": {
        "image_id": "DSC09709",
        "bbox": {
            "x_min": 457,
            "y_min": 25,
            "x_max": 1295,
            "y_max": 1066
        },
        "class_id": 41
    },
    "category": {
        "SEOB4": {
            "class_id": 41,
            "USDA_symbol": "SEOB4",
            "EPPO": "CASOB",
            "group": "dicot",
            "class": "Magnoliopsida",
            "subclass": "Rosidae",
            "order": "Fabales",
            "family": "Fabaceae",
            "genus": "Senna",
            "species": "obtusifolia",
            "common_name": "Sicklepod",
            "authority": "(Linnaeus) Irwin and Barneby",
            ...
        }
    },....
  6. explore moving remove_gray_hsv before remove_holes
  7. explore remove_objects or combining with remove_holes
  8. check the 2 list of sparse vs broad to make sure you've got all the weeds
navjot-nangia commented 1 month ago

Remaining:

  1. play around/ look into pixelated borders that's occurring for some "broad" categories

  2. create rules to define area_threshold in remove_small_holes for example: if clean_mask_area > 1000: area_threshold = 100

  3. clean up the script

    • organize saving and cleaning in separate methods
    • place remove_gray_hsv_color in clean_mask
    • add comments in large blocks of code
  4. explore moving remove_gray_hsv before remove_holes

  5. explore remove_objects or combining with remove_holes

navjot-nangia commented 1 month ago

Remaining:

  1. play around/ look into pixelated borders that's occurring for some "broad" categories
  2. create rules to define area_threshold in remove_small_holes for example: if clean_mask_area > 1000: area_threshold = 100
  3. clean up the script organize saving and cleaning in separate methods add comments in large blocks of code
  4. explore remove_objects or combining with remove_holes