Railway Track Fault Detection — InceptionV3
Trained InceptionV3-based image classification model for detecting visible railway track faults from images.
This model is part of the Railway Track Fault Detection project, which uses transfer learning with an ImageNet-pretrained InceptionV3 backbone to classify railway track images into two classes:
Model Details
| Property | Value |
|---|
| Architecture | InceptionV3 + custom binary classification head |
| Framework | TensorFlow / Keras |
| Input shape | (300, 300, 3) |
| Output shape | (1,) |
| Output activation | Sigmoid |
| Classification | Binary |
| Classes | Defective, Non defective |
| Parameters | 37,385,377 |
| Model format | Keras HDF5 (.h5) |
| File size | 377,560,336 bytes (~360 MiB) |
| Prediction threshold | 0.5 |
The model uses an ImageNet-pretrained InceptionV3 backbone with include_top=False. Features are taken from the mixed7 layer and passed through a custom classification head consisting of Flatten, Dense (128, ReLU), Dropout (0.3), and Dense (1, Sigmoid).
Performance
Evaluation was performed on a held-out set containing 62 images, with 31 images from each class.
| Metric | Score |
|---|
| Accuracy | 0.8871 |
| Macro F1-score | 0.89 |
| Weighted F1-score | 0.89 |
Classification Report
| Class | Precision | Recall | F1-score | Support |
|---|
| Defective | 0.90 | 0.87 | 0.89 | 31 |
| Non defective | 0.88 | 0.90 | 0.89 | 31 |
These results describe performance on the project's evaluation set and should not be interpreted as guaranteed performance on railway imagery from other environments or data distributions.
Input Preprocessing
Images should be:
- Converted to RGB.
- Resized to
300 × 300.
- Converted to an array.
- Normalized to
[0, 1] by dividing pixel values by 255.0.
- Expanded with a batch dimension before inference.
Output Interpretation
The model produces a single sigmoid probability.
With the project's threshold of 0.5:
- probability
> 0.5 → Non defective
- probability
<= 0.5 → Defective
Training
The model was trained using transfer learning with:
- ImageNet-pretrained InceptionV3
- Adam optimizer
- Binary cross-entropy loss
- Data augmentation
- Early stopping
- Model checkpointing
The project supports both the original training dataset and an offline-augmented training dataset. Dataset selection is configurable in the training pipeline.
Model File
inceptionv3_railway_fault_detector.h5
SHA-256:
BC79FC3BE8250276779D5FA168E1A2BA08651FDA2B834DC214A976F6C2689E4A
Source Code
The complete modular training, evaluation, preprocessing, visualization, and inference pipeline is available on GitHub:
Dataset
The project was developed using the Railway Track Fault Detection dataset associated with the original Kaggle project:
kaggle kernels pull salmaneunus/railway-track-fault-detection-1
The dataset itself is not redistributed through this model repository. Users should review the original dataset source and its applicable terms before reuse.
Limitations
This model is an experimental computer-vision project and is not a certified railway inspection or safety system.
Performance may vary with:
- lighting conditions
- camera angle and distance
- image quality
- track environment
- fault types not represented in the training data
- images from distributions different from the training dataset
Predictions should not be used as the sole basis for real-world railway maintenance or safety decisions.
License
The project code and this model repository are released under the MIT License. Third-party datasets and other external materials remain subject to their respective licenses and terms.