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

Rescale unevenly sized panos #33

Open
michaelduan8 opened this issue Nov 29, 2021 · 4 comments · Fixed by #36
Open

Rescale unevenly sized panos #33

michaelduan8 opened this issue Nov 29, 2021 · 4 comments · Fixed by #36
Assignees
Labels
bug Something isn't working Priority: Medium Medium priority task; slightly more urgent

Comments

@michaelduan8
Copy link
Collaborator

As @shokiami mentioned here (#22 ), we see that some of the scraped panos are smaller and result in black space on the bottom and right sides. Two things we noticed is that the SV image coordinates don't line up correctly with the poorly scaled images (so some label crops end up just being completely black) and our generated null crops sometimes are chosen such that the resulting null crop is largely/completely black.

@michaelduan8 michaelduan8 added bug Something isn't working Priority: High High priority task; needs immediate attention labels Nov 29, 2021
@misaugstad
Copy link
Member

Right. If you look at the DownloadRunner code (I think) you'll notice conditionals trying to figure out the correct size of the panorama. Most panos are the same size, but there are some that are smaller. And it looks like the downloader didn't realize that correctly sometimes.

@jonfroehlich
Copy link
Member

Would be good to loop back and solve this problem at its source then (in the DownloadRunner) code...

@misaugstad
Copy link
Member

Coming back now that I have a bit more time. There are two places where this needs to be fixed upstream. The first is in the Project Sidewalk code. I mention in this issue that it seems that the image width/height were hardcoded from the beginning, though I found out that we can actually get that information from the JavaScript API. So we should start to fill in those values in the database correctly from now on.

The 2nd thing to do is to make sure that whatever API endpoint that DownloadRunner uses to get Project Sidewalk data actually includes the image_width and image_height parameters.

And finally, the DownloadRunner can then be modified to just use those parameters instead of trying (and occasionally failing) to guess which size it's going for.

That still leaves the question of what to do about past data. We might want to write a script to go in and clean up the old panoramas (cropping out the black areas) on the SFTP server. But that should be the last step.

@michaelduan8
Copy link
Collaborator Author

Wanted to reopen this since this is still a pretty large issue given where it propagates from and the current fix is only a temporary one to meant to meet an oncoming deadline.

@michaelduan8 michaelduan8 reopened this Dec 1, 2021
@michaelduan8 michaelduan8 added Priority: Medium Medium priority task; slightly more urgent and removed Priority: High High priority task; needs immediate attention labels Dec 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Priority: Medium Medium priority task; slightly more urgent
Projects
None yet
4 participants