I am trying to create a visualisation for how transfer learning (feature extraction in particular) works with MobileNet.

With the ml5.js library, you can extract a part of the pre-trained model (the features). Those features allow you to 'retrain' or 'reuse' the model for a new custom task (transfer learning). Then, we can map the features to our own set of labels.

I found a good explanation here. I tried to visualise the process according to the just-mentioned video.

enter image description here

However, this figure doesn't show anything about the retraining. Here, it looks like we're not doing any training at all and just mapping the whole thing to our custom labels.

What could be a good way to visualise the feature extraction process with MobileNet?

Here is the ml5 featureExtraction documentation:

  • $\begingroup$ @x89 Hi! It's not clear what you actually want to do here! You say "this figure doesn't show anything about the retraining", i'm not sure what is the source of the image and the context behind it, and you can definitely find some that does show what you want somewhere on the internet. If your issue is "how to create the feature extractor", then the documentation is of good quality and there is a follow up video by the same creator that does that. If your only issue is that the diagram is not clear enough, then I don't think this is a question related to AI theory or programming $\endgroup$
    – SajanGohil
    May 7 at 5:57
  • $\begingroup$ I have created the diagram msyelf and I need to use it to explain feature extraction to a group of people. However, I don't fully understand how it works so I am unable to visualize it. From the documentation I understand that we use the "features" to retrain. However, the video explains it as if we are just mapping the logits to our own labels. Then where is the training happening? The problem isn't that I dont have a visualization but the fact that I am not understanding it well enough to make a visualization. @SajanGohil $\endgroup$
    – Jbd
    May 7 at 15:37
  • $\begingroup$ In that case, your question should focus on that (concept of feature extraction and transfer learning) and not on the visualisation. At a high level, transfer learning uses pretrained model. The features here are the outputs of the hidden layer/s. To map those to a new set of classes, you need to remove the output layer and add a new output layer which has no weights trained to convert your hidden layer outputs to your new classes. For this reason, you train your network with new output layer, so it learns the weights to map hidden layer outputs (extracted features) to a new set of classes. $\endgroup$
    – SajanGohil
    May 7 at 15:48
  • $\begingroup$ There are a lot of other things that affect your transfer learning methods, so take a look at some more resources on transfer learning and feature extraction. For starters I suggest (youtube.com/watch?v=yofjFQddwHE) $\endgroup$
    – SajanGohil
    May 7 at 15:50
  • $\begingroup$ Please, add the details that you added here in the comment section directly to your post by editing it. Make sure you describe that picture and clarify what your question really is. $\endgroup$
    – nbro
    May 10 at 11:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.