ocean-data-factory-sweden / kso

Notebooks to upload/download marine footage, connect to a citizen science project, train machine learning models and publish marine biological observations.
GNU General Public License v3.0
5 stars 12 forks source link

Update view_subject function to display subject frames in tut#8 straight from Zooniverse #260

Open victor-wildlife opened 1 year ago

victor-wildlife commented 1 year ago

We should standardise the "view_subject" function from tutorial_utils. Right now, if we want to display a clip subject, we retrieve the Zooniverse https link but if we want to display a frame, we extract the frame from the original movie (instead of getting the actual Zooniverse link to the frame). @jannes do you remember the reasoning for this approach?

I think the view_subject function should retrieve the zooniverse link for the subject. If that subject doesn't exist we could temporarily extract the images from the original movies but we should somehow let the user know that the subject doesn't exist in Zooniverse anymore and that the images displayed have been just retrieved from the original movie.

Image

jannesgg commented 1 year ago

@victor-wildlife The code above seems to show that it is already using the "subject_location" to show the frame? As far as I know this was the Zooniverse https link or am I missing something?

The only extra logic here was that we had to save the Zooniverse image to a local "temp" file so that we could provide the viewer with a local url, since it did not want to display images that were not available on the local drive inside the Jupyter Notebook.

victor-wildlife commented 1 year ago

Ok that makes sense now. I just didn't know why we needed it to save it