Transfer learning for image categorization

My goal is avoiding the complexity of actually code into Keras, to achieve a transfer learning for custom image categories.
Maybe I misundestood Knime but I suppose I can

  • Install a docker with TensorFlow
  • load a pretrained net such as ResNet50
  • load my training set
  • define custom classifier
  • retrain the net using my images
  • test using a new image
    all without coding but using Knime modules. Not sure if this is really possible or I’m just misunderstanding his usage.

Hello @davide445,

yes and no.
You can load a Keras network, append layers to it and then train the new network.
However, a typical strategy is to freeze certain parts of a network (i.e. these parts are not changed during training). Currently, this freezing can only be done via our python nodes (DL Python Network Creator and DL Python Network Editor).
I would like to also highlight that it is possible to perform transfer learning in a different way by using the network only as a feature extractor and then relying on another ML algorithm (e.g. XGBoost) to classify your images based on those features. For an example, you can take a look at this forum thread: Multi-Label Image Classification in Knime?

Finally, I am not sure whether a Docker installation of TensorFlow is compatible with KNIME since we didn’t try this yet.
Our recommendation is to set up an Anaconda environment which KNIME can then use to access Keras (see https://www.knime.com/deeplearning/keras for further instructions).

Best,

Adrian

6 Likes

Hello @nemad
thanks for your answer.
Since I’m trying to avoid messing up with my laptop installing things I dind’t control as a non-expert, I’ll prefer to use containerized elements that are also much easier to install as fully predefined.
Considering this will try to use my new PyTorch+fastai installation outside Knime for experiments and use Knime for all the other part of the workflow. I would lilke to experiment also with Caffe2 considering his ability to generate models to be installed on mobile.
Did you consider to support also them?

Hello @davide445,

oh yes I understand your concern but I am no expert on docker so I don’t know if it is possible for KNIME to access the python exectuable of the container (I think that might defeat the purpose).
While anaconda is not as isolated as docker, we try to provide configurations that affect only the conda environment used by KNIME.
We would love to also have integrations for those frameworks but we simply couldn’t get around to it yet and probably won’t in the near future. However, KNIME is an open source platform and contributions are always welcome.

Best,

Adrian

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.