Advanced Deep Learning project implementing transfer learning on the TensorFlow Flowers dataset using EfficientNetB0.
Training a deep neural network from scratch requires massive amounts of labeled data and days of GPU time. Transfer learning sidesteps both problems: we take EfficientNetB0, already trained on 1.2 million ImageNet images, and reuse the visual features it has learned (edges, textures, shapes) for our flower classification task.
The key advantages over training from scratch:
- Less data needed — The backbone already understands visual structure; we only need enough data to learn the flower-specific patterns on top.
- Faster training — Phase 1 trains only the new classification head (a few thousand parameters) instead of millions. Total training time drops from hours to minutes.
- Better accuracy — Features learned from ImageNet generalize well to new visual tasks. A randomly initialized network of the same size would underfit badly on a 3,670-image dataset.
- Lower compute cost — No need for a large GPU cluster; a single T4 on Google Colab is sufficient.
Classifies 5 flower species (daisy, dandelion, roses, sunflowers, tulips) using a pre-trained EfficientNetB0 backbone with a two-phase training strategy: feature extraction followed by fine-tuning.
| File | Description |
|---|---|
transfer_learning.ipynb |
Main notebook — full pipeline, ready to run on Colab |
- Upload
transfer_learning.ipynbto Google Colab - Set runtime to GPU → T4 (Runtime → Change runtime type)
- Run all cells
No additional installs needed — tensorflow-datasets is pre-installed on Colab.
EfficientNetB0 (ImageNet weights, include_top=False)
└── GlobalAveragePooling2D
└── Dense(256, relu)
└── Dropout(0.5)
└── Dense(5, softmax)
| Phase | Epochs | Learning Rate | Base Model |
|---|---|---|---|
| 1 — Feature Extraction | 10 | 1e-3 | Frozen |
| 2 — Fine-tuning | 5 | 1e-5 | Last 20 layers unfrozen |
TensorFlow Flowers — 3,670 images, 5 classes, loaded automatically via tensorflow_datasets.