The problem
Railway tracks develop visible surface faults — cracks, squats, shelling and head checks — that maintenance crews still inspect largely by eye, on foot or from camera-equipped trolleys. Manual visual inspection is slow, inconsistent and hard to scale across a large rail network, and the same surface can be judged differently by different inspectors. Computer vision offers a way to assist that inspection: a convolutional neural network can learn the visual patterns of defective versus healthy rail surfaces directly from photographs. The hard part is that genuine faults must be distinguished from harmless texture, shadows and lighting artefacts in track photographs. This project studies that idea end to end on the public RSDD rail surface defect dataset: a binary defective/healthy classifier with a per-image fault confidence score, an adjustable decision threshold, and — critically — a misclassification review gallery so failure modes are inspected honestly rather than hidden behind a single accuracy number.
Rail surface photographs from the RSDD dataset (Gan et al. 2017): Type-I express-track and Type-II ordinary and heavy-haul images.
Follow the working sequence
How it works
Dataset & model:
Dataset name: RSDD — Rail Surface Defect Dataset (Gan et al., "A hierarchical extractor-based visual rail surface inspection system", IEEE Sensors Journal, 2017).
Source: Official academic release of the RSDD dataset.
Task: Binary image classification (defective vs healthy rail surface).
Classes: Defective / healthy — the official release ships pixel-level defect/background ground-truth masks (Type-I: 67 express-track images; Type-II: 128 ordinary/heavy-haul track images) and does NOT provide per-type defect labels. Defect-type naming (cracks, squats, shelling, head checks) in the review material is qualitative domain vocabulary, not dataset labels.
Model: CNN classifier — custom convolutional backbone, plus an ImageNet-pretrained transfer-learning variant for comparison (TensorFlow/Keras).
Input: Rail surface photographs, normalized to a fixed input size with contrast enhancement.
Prediction: Fault probability per image (defective vs healthy).
Output: Per-image fault confidence score with an adjustable decision threshold; misclassification review gallery.
Evaluation metrics: Accuracy, precision, recall, F1 and confusion matrix on a held-out validation split — computed by the Jupyter notebook during the buyer's build. No measured performance claimed; design target approximately 85% or better accuracy on the split.
Working:
- Rail images are loaded from the RSDD dataset structure, normalized to a fixed input size and contrast-enhanced.
- Preprocessing: augmentation with rotations, flips and brightness jitter tolerates the lighting and angle variation of real track photos.
- Training phase: a CNN (custom backbone, plus an optional transfer-learning variant) trains for binary defective/healthy classification, with accuracy and loss logged each epoch.
- Evaluation phase: the Jupyter notebook runs the full evaluation on the held-out validation split — accuracy, precision, recall, F1, confusion matrix — and collects misclassified images into a review gallery.
- Inference phase: the trained model scores new rail images, outputting a fault probability with an adjustable decision threshold.
- Output: per-image fault confidence; the notebook's misclassification gallery documents exactly which images the model gets wrong.
Specifications:
Model | CNN classifier (custom backbone + ImageNet-pretrained transfer-learning variant), TensorFlow/Keras
Dataset | RSDD rail surface defect dataset — Type-I 67 images, Type-II 128 images (Gan et al. 2017)
Task | Binary image classification (defective / healthy rail surface)
Input | Rail surface photographs, fixed input size with contrast enhancement
Output | Per-image fault confidence score with adjustable decision threshold
Evaluation | Accuracy, precision, recall, F1, confusion matrix on held-out validation split — computed during the buyer's build
Design target | Approximately 85% or better accuracy on the split (target, not a measured claim)
Error analysis | Misclassification review gallery documenting real failure modes
Scope | Strictly visual-surface inspection of rail photographs
Project features
[Defective/Healthy Rail Classifier] (implemented) — CNN binary classifier trained on RSDD rail images with a per-image fault confidence score and an adjustable decision threshold.
[From-Scratch vs Transfer-Learning Comparison] (implemented) — A custom convolutional backbone and an ImageNet-pretrained transfer-learning variant are both included for direct comparison.
[Field-Lighting Augmentation] (implemented) — Rotations, flips and brightness jitter tolerate the lighting and angle variation of real track photos.
[Misclassification Review Gallery] (implemented) — Misclassified images are collected into a review gallery so failure modes are documented openly.
[Training Curves and Confusion Matrix] (implemented) — Training/validation loss and accuracy curves plus a confusion matrix feed the report's error analysis.
[Configurable Decision Threshold] (configurable) — The fault-confidence threshold can be tuned to trade precision against recall.
[Defect Localization Head] (optional) — Pixel-level defect segmentation using RSDD's ground-truth masks is outside the base classification build and can be developed as an extension, scoped at quotation.
What is included
Complete source code (data pipeline, CNN training, transfer-learning variant, inference script)
Jupyter evaluation notebook (validation metrics, confusion matrix, misclassification review)
Project report PDF (background, RSDD dataset, methodology, evaluation, error analysis)
PPT presentation for final review
Viva Q&A preparation document (CNNs, convolution, transfer learning, classification metrics, inspection context)
Setup guide (environment, dataset download, training and inference commands)
Advantages
- From-scratch versus transfer-learning comparison — both a custom CNN and an ImageNet-pretrained variant included for direct comparison.
- Field-lighting augmentation (rotations, flips, brightness jitter) tolerates lighting and angle variation of real track photos.
- Misclassification review gallery documents failure modes openly.
- Configurable decision threshold lets the buyer trade precision against recall.
- Training curves and confusion matrix feed the report's error analysis.
- Optional pixel-level defect-localization head extension scoped at quotation.
Disadvantages
- Only the defect types and lighting conditions in RSDD data are known — subsurface, geometry and ultrasonic faults are entirely outside scope.
- RSDD gives binary defect/background ground truths, not per-type defect labels — per-defect-type claims are not supported.
- Track photographs far from the training images classify worse.
- Visual-surface inspection prototype for study and demonstration — never a safety certification tool.
- Performance depends on the split, augmentation and training conditions of the buyer's own run.
Limitations & prerequisites
The model only knows the defect types and lighting conditions represented in the RSDD data; subsurface, geometry and ultrasonic faults are entirely outside its scope.
RSDD provides binary defect/background ground truths, not per-type defect labels — per-defect-type claims are not supported by the dataset.
Track photographs vary in lighting and angle; conditions far from the training images classify worse.
This is a visual-surface inspection prototype for study and demonstration — never a safety certification tool, and it must not be used, cited or presented as a railway-safety or track-approval system.
Performance depends on the split, augmentation and training conditions of the buyer's own run.
Frequently Asked Questions
Which dataset and model are used?
The public RSDD rail surface defect dataset (Gan et al., IEEE Sensors Journal 2017): Type-I (67 express-track images) and Type-II (128 ordinary/heavy-haul images) with pixel-level defect/background ground truths. The build trains a CNN classifier on rail images — a custom convolutional backbone plus an ImageNet-pretrained transfer-learning variant for comparison — using TensorFlow/Keras.
What defect types does it report?
The model classifies images as defective or healthy with a fault-confidence score. RSDD does not ship per-type defect labels, so defect-type naming (cracks, squats, shelling, head checks) is qualitative domain vocabulary used in the misclassification review, not a dataset label the model was trained on.
Is the performance guaranteed?
No measured performance is claimed. The included Jupyter notebook computes accuracy, precision, recall, F1 and the confusion matrix on a held-out validation split during the buyer's build; the design target is approximately 85% or better accuracy on that split.
Can this be used for railway safety certification?
Absolutely not. It is a visual-surface inspection prototype for study and demonstration. It must never be used, cited or presented as a railway-safety or track-approval system.
Is this project suitable for a final-year project?
Yes, for B.E./B.Tech in Computer Science, AI/ML, Data Science, Electronics and related programs. It demonstrates CNN image classification on real-world imagery, transfer learning vs from-scratch comparison, and honest error analysis.
What will I receive, and can it be customized?
Source code (data pipeline, CNN training, transfer-learning variant, inference script), the evaluation notebook with the misclassification review gallery, report, PPT, viva Q&A and a setup guide. Customizable: additional track datasets, defect-localization heads, or a trolley-camera demo interface, scoped at quotation.
Components & software requirements
Python 3.10, TensorFlow/Keras (CNN training and inference)
OpenCV (image loading, resizing, contrast enhancement)
NumPy, pandas (dataset handling, metric computation)
Matplotlib, Seaborn (training curves, confusion matrix)
Jupyter Notebook (evaluation procedure run during the buyer's build)
scikit-learn (train/validation splitting, metric utilities)
RSDD rail surface defect dataset (Gan et al.; download guidance in the setup guide)
GPU recommended for CNN training (cloud-GPU guidance in the setup guide)
Delivery information
Built-to-order: the source code, evaluation notebook, report, PPT and viva kit are prepared fresh for the buyer. Typical delivery spans dataset setup, the training runs (both variants), evaluation and documentation; the exact schedule is confirmed at quotation.
Support terms
Setup guidance (environment, RSDD download, training and inference commands); viva preparation covering CNNs, convolution, transfer learning, classification metrics and the inspection context; customization discussion (additional datasets, localization heads, trolley-camera demo) scoped at quotation.
Download free synopsis (PDF)
Enter your name and WhatsApp number — the synopsis PDF downloads immediately. We may send occasional project updates on WhatsApp; no spam.
RSDNet: A New Multiscale Rail Surface Defect Detection Model (Du et al., Sensors 2024)