Class 7 · CBSE AI · Strand B — Python for AI
Using a pre-trained image model — transfer learning for Class 7
How a model trained on millions of images can be reused for your own task. Transfer learning, explained. For Class 7.
Class 7 · CBSE AI · Strand B — Python for AI
How a model trained on millions of images can be reused for your own task. Transfer learning, explained. For Class 7.
A guide dog trained by experts
A guide dog trained by an expert already knows how to lead a person safely through busy streets. A family can rely on it without training it themselves — but it learned on the streets of its own city. Take it to a very different place, like a crowded hill-station market, and it may need extra practice. Pre-trained models are the same: powerful but context-dependent.
Using a national highway vs. building a new road
A pre-trained model is like the national highway network — someone else spent years and crores of rupees building it. You just drive on it. But if you need to reach a village not on the highway, you might need to add a small road at the end. That last stretch is fine-tuning.
Every Dhee Learning session for this concept follows three stages. We share the questions Dhee actually asks, so you can hear what a session sounds like.
Stage 1 — Surface
Training an image recognition model from scratch on your laptop might take weeks. But you can use a model a big lab already trained in a few lines of code. What is the catch — what might go wrong with using someone else's trained model?
Rote answer
"It might not be accurate for my images"
Understood
"The model was trained on specific data that may not represent my use case — a model trained on Western faces may perform poorly on Indian faces. I also do not know exactly what it was trained on, how biased it is, or whether I am allowed to use it commercially."
Stage 2 — Reasoning
A pre-trained model expects images of size 224x224 pixels. Your photos are 1080x1920. What do you need to do before feeding your photos in, and why does the model not just resize them automatically?
Follow-up Dhee may use: If you resize a tall portrait photo to a square, what happens to the image content? Does that matter for classification?
Stage 3 — Application
With a parent, load a pre-trained MobileNet or ResNet model in a Python notebook. Feed it three photos of things around you. What did it predict, and where was it wrong? Why do you think it got those wrong?
Misconception Dhee watches for: Assuming a wrong prediction means the model is broken, rather than understanding that all models have a confidence distribution and fail on out-of-distribution inputs
Dhee turns this concept into a short spoken lesson — teaching, listening, and probing — so your child builds the idea themselves.
How a model trained on millions of images can be reused for your own task. Transfer learning, explained. For Class 7.
A pre-trained model works equally well on all types of images — in reality, accuracy drops significantly when input images differ from the training distribution
Dhee opens with a question — for example: "Training an image recognition model from scratch on your laptop might take weeks. But you can use a model a big lab already trained in a few lines of code. What is the catch — what might go wrong with using someone else's trained model?" — listens to your child's answer, then probes the reasoning behind it. The session ends when the child can apply the idea to a brand-new situation, not just recall it.