label-studio-ml-backend
label-studio-ml-backend copied to clipboard
Tutorial with pytorch is missing substantial parts
I want to use the label studio ml backend together with an image classification dataset and a pretrained pytorch model. There seems to be a blog / tutorial for it: https://labelstud.io/tutorials/pytorch-image-transfer-learning.html
However, this tutorial is missing substantial parts:
-
ImageClassifierDataset._get_image_from_url(self, url)
is not implemented. -
ImageClassifierAPI.__init__()
uses the variableresources
, which is never defined. -
ImageClassifierDataset
is never used. -
ImageClassifierAPI.predict(self, tasks, **kwargs)
andImageClassifierAPI.fit(self, completions, **kwargs)
are not implemented. In general, I found it hard to find out anything about the types/contents of the input arguments: E.g. What is the content of tasks[0], or what is the required output format? This prevented my from implementing it myself.
Ideally, the tutorial would also come with an example dataset running it through. E.g. use the clothing dataset small which is very easily downloadable:
git clone https://github.com/alexeygrigorev/clothing-dataset-small.git
Bump.
The tutorial is not up to date with https://github.com/heartexlabs/label-studio-ml-backend/blob/master/label_studio_ml/examples/pytorch_transfer_learning/pytorch_transfer_learning.py.
Hi @MalteEbner The tutorial is only an example how to use pytorch with Label Studio. As for the params you can check this tutorial to understand LS tasks format.