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
4 stars 12 forks source link

Enable users to run publicly available models #409

Open victor-wildlife opened 1 month ago

victor-wildlife commented 1 month ago

When running the template project users are automatically redirected to sign in with their W&B. We should enable all projects to access some basic models that are publicly available (e.g. no need to register in a different platform). @jannesgg and I talked about enabling users to select models from a model Zoo (a short list of models from Zenodo)

jannesgg commented 1 month ago

@victor-wildlife This is now implemented in the latest dev. By default, the registry will now be "None" and only use WandB or MLFlow if the appropriate environment variables are defined. Have a look and let me know if it makes sense as it is now :)

victor-wildlife commented 4 weeks ago

I am still getting asked to access W&B even after selecting the template project in Colab. After I access it. I only get the options from the koster seafloor observatory project. Is there any way to add the Zoo models to all the projects? I will dig deeper in the code later and report back but in the meantime this is what I got when running the template project in colab image

jannesgg commented 4 weeks ago

@victor-wildlife I think I have found the issue. Since Colab usually resets the runtime (clearing any sys.path), and also runs from a different path than the usual notebooks in kso/notebooks, it typically downloads the packaged version of kso_utils. This package was out of date with the latest dev and so the changes did not appear there. I have have now updated the package so it should work (0.2.8).

It should by default add these models to any project as I have set it up, but let me know how it goes for you.

victor-wildlife commented 4 weeks ago

@jannesgg I have tested the "publish observations" tutorial in colab with the template project and the ref-gu-4sp.zip model downloaded correctly. I got an error though when trying to process the detections. The error says that "annotations.csv" is not found. The image below captures the output of running the model on movie#4 of the template project. image The arguments to run the model are the default arguments so it should be saving the annotations right? image

Also, we need to report some log messages to ensure users that cells ran correctly for the "Initialise mlp" and "Download model" cells.

jannesgg commented 2 weeks ago

@victor-wildlife This seemed to be an issue related to not specifying a registry.

I have now made some changes in this pull request #414. Please have a look and let me know if it seems okay.