Individual Beetle Pictures with Pixel-Level Annotations

#27
by samuelstevens - opened
HDR Imageomics Institute org
edited Oct 2

Goal: I want individual beetle pictures with pixel-level annotations.

Attempts:

  1. Map the annotations from BeetleMeasurements.csv to the group images. These don't match. See attached A00000032929.jepg (resized to 1024px width to fit in this comment). This is from the main branch, commit b1dd26a9fbb058ad6b8ce62731c9ccbeba320485.
  2. Use the group images in /fs/ess/PAS2136/BeetlePalooza-2024/Resized Images [Corrected from ISA] on OSC. These match the annotations. However, I need to know the individual beetle image positions in the group image so I can offset the annotations from the group image to the individual images. In the past, I've used skimage.feature.match_template() to do this. But I don't get a good match between the individual images and the resized group images. In contrast, I get a perfect match between the individual images and the original group images.

Things I have yet to try:

  1. Resize the individual images using the same resizing ratio from the original group image to the resized group image. Downside: this requires both the original group image that produced the indvidual image crops AND the resized group image that matches the annotations to calculate the resizing ratio.
  2. Use the resized images and simply add padding to the annotations to re-crop individual images from the group images. Downside: this is a heuristic and throws away all of the work done cropping the indvidiuals originally.
  3. Downloading pr/26 and praying that one of my original attempts works.

Do you have any recommendations?

A00000032929.jpeg

HDR Imageomics Institute org

I believe this should be resolved with #25 and #26. @mridulk will have more details, but these updates are pending.

HDR Imageomics Institute org
edited Oct 8

PR #28 handles this.
The first option is the best one. Re-cropping based on annotations can be problematic because the antenna lengths and beetle sizes are quite different, so no single padding percentage would properly capture the entire beetle.
What was done is to calculate the scaling ratio for each individual image (between the group and resized) and then apply that to the individual images corresponding to that particular image

HDR Imageomics Institute org

@samuelstevens , is the issue resolved?

HDR Imageomics Institute org

the group_images_resized images do match the annotations. Note that the README lists "resized_group_images" while the files have "group_images_resized". I'm still working on confirming that the individual images match to the group_images_resized.

HDR Imageomics Institute org

the group_images_resized images do match the annotations. Note that the README lists "resized_group_images" while the files have "group_images_resized". I'm still working on confirming that the individual images match to the group_images_resized.

Thanks for catching that! I'll add that fix to the documentation in #32.

HDR Imageomics Institute org

This issue has been resolved in #28 and #32.

egrace479 changed discussion status to closed

Sign up or log in to comment