Image Classification TensorFlow.
A TensorFlow-based deep learning computer vision pipeline classifying six-class natural scene landscapes with 88% test accuracy, exported for TFLite and TensorFlow.js deployment.
Computer Vision Challenges & Edge Constraints
Automated scene recognition and classification of natural environments requires visual computing models robust to camera angle variations, dynamic lighting, and complex background textures. Simultaneously, the model footprint must remain lightweight for edge computing, mobile devices, and client-side browsers without requiring dedicated GPU infrastructure.
This project constructs an end-to-end deep learning pipeline using TensorFlow to classify natural images into six categories: buildings, forest, glacier, mountain, sea, and street. The model achieves 88.00% test accuracy and is exported across multiple lightweight runtime formats.
Custom 4-Block Convolutional Neural Network Architecture
The network is designed sequentially with a four-block convolutional stack to extract hierarchical visual representations from raw spatial input to high-level semantic features:
└── Block 1: Conv2D (32 filter, 3x3, ReLU) → MaxPooling2D (2x2)
└── Block 2: Conv2D (64 filter, 3x3, ReLU) → MaxPooling2D (2x2)
└── Block 3: Conv2D (128 filter, 3x3, ReLU) → MaxPooling2D (2x2)
└── Block 4: Conv2D (256 filter, 3x3, ReLU) → MaxPooling2D (2x2)
└── Regularization: Flatten → Dropout (0.5) → Dense (512 neuron, ReLU)
└── Output Head: Dense (6 neuron, Softmax Output)
Random real-time data augmentation (rotation, zoom, horizontal flips, shear) is dynamically integrated into the input pipeline to prevent overfitting and bolster generalization across unseen real-world viewpoints.
Training Convergence & Model Learning Curves
Training was executed using the Adam optimizer with Categorical Crossentropy loss. Applying 0.5 dropout and real-time augmentation yielded stable learning curves between the training and validation sets:
- Test Accuracy: Reached 88.00% on the independent evaluation dataset.
- Loss Stability: Validation loss tracks training loss without diverging, proving that regularization effectively prevented overfitting.
Inference Samples & Visual Prediction Results
Inference evaluation on real-world test images demonstrates high predictive confidence, even when distinguishing visually similar neighboring classes:
The model distinguishes glaciers (glacier) from rocky mountains (mountain) using ice textures and lighting gradients, while cleanly separating urban architecture (buildings) from transit corridors (street).
Multi-Format Export & Runtime Portability
Upon training completion, the model was converted into three separate deployment formats:
Complete computational graph format for Python backend serving, TF Serving, or containerized microservices.
Quantized compact model for low-latency on-device inference on Android and iOS platforms.
Compatible for in-browser client-side execution via WebGL acceleration without transmitting user images to a server.