LouisK130 / IFCB-Annotate

A web-based interface for classifying IFCB image data
3 stars 2 forks source link

Stitched ROIS from IFCB1 and IFCB5 do not display correctly #95

Open eepeacock opened 2 years ago

eepeacock commented 2 years ago

Stitched ROIs appear as:

First ROI of pair only is displayed, but it takes up the size and dimensions of the stitched pair. Since new CNN results are available and I am reviewing some older data, this is a problem.

hsosik commented 2 years ago

@eepeacock I suspect this is a dashboard issue not an ifcb-annotate issue. Do the ROIs look the same in ifcb-annotate and ifcb-dashboard? Is this happening for all stitched ROIs or only some? Can you post a few examples here?

eepeacock commented 2 years ago

image

But if you right click to link in the dashboard you get: https://ifcb-data.whoi.edu/mvco/IFCB1_2006_279_234103_00612.html

hsosik commented 2 years ago

Hmm...what did you mean by "it takes up the size and dimension of the stitched pair"? That looks like just the first ROI.

eepeacock commented 2 years ago

But it is stretched and distorted to have the dimensions of the stitched pair. At least I think that is what is happening. It is definitely distorted compared with: image

eepeacock commented 2 years ago

Actually, better to show the whole ROI: image

hsosik commented 2 years ago

I think it's just the single ROI. We'll have to ask Joe what api call is being made from ifcb-annotate to ifcb-dashboard--and why that is returning unstitched ROIs. Does the bin zip link for this bin provide the stitched ROIs or the separate singles?

eepeacock commented 2 years ago

THe images are definitely distorted. It makes it easy to spot them. I would not have noticed the issue if I was just viewing one ROI.... it would just look like one ROI. Here is another exampled: image

https://ifcb-data.whoi.edu/mvco/IFCB1_2007_155_234217_02186.html

eepeacock commented 2 years ago

All of these are distorted: image

eepeacock commented 2 years ago

How the bottom left one from above image should look: image

eepeacock commented 2 years ago

And top left: image

joefutrelle commented 2 years ago

There's an interaction between the dashboard and annotate that fetches ROI metrics like width/height independently of the zip, to decide how to lay out the images before the zip is loaded. If there are discrepancies between the image metrics returned by the dashboard and the zip returned by the dashboard, it would likely cause this problem.

I don't think I need more examples @eepeacock , I will investigate the likely cause. Thanks

eepeacock commented 2 years ago

Thanks!

joefutrelle commented 2 years ago

I believe this is the line where I don't stitch when returning roi sizes to annotate; should be a quick fix

https://github.com/WHOIGit/ifcbdb/blob/dfe8798eaf1a5bc87e526089426c8650849b2a8f/ifcbdb/dashboard/views.py#L590

joefutrelle commented 2 years ago

Looks like the same issue in the production of the zip. I will confirm and it'll require fixes in both repos if my diagnosis is correct.

https://github.com/joefutrelle/pyifcb/blob/5adf18ccfc6369bfa53cf425fd14b05ab975cc0e/ifcb/data/zip.py#L41

hsosik commented 2 years ago

Oh, man. I just realized that this bug in the bin zips (stitched ROIs not there) cascades through the complete v4 production of blobs and features.... [We did not have this problem when v2 blobs and features were created.]