Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
eepeacock opened this issue Sep 23, 2022 · 15 comments
Open

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

eepeacock opened this issue Sep 23, 2022 · 15 comments

Comments

@eepeacock
Copy link

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
Copy link
Collaborator

hsosik commented Sep 23, 2022

@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
Copy link
Author

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
Copy link
Collaborator

hsosik commented Sep 23, 2022

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
Copy link
Author

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
Copy link
Author

Actually, better to show the whole ROI:
image

@hsosik
Copy link
Collaborator

hsosik commented Sep 23, 2022

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
Copy link
Author

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
Copy link
Author

All of these are distorted:
image

@eepeacock
Copy link
Author

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

@eepeacock
Copy link
Author

And top left:
image

@joefutrelle
Copy link
Collaborator

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
Copy link
Author

Thanks!

@joefutrelle
Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Collaborator

hsosik commented Sep 28, 2022

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.]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants