This project focuses on detecting faults in railway tracks using advanced computer vision and machine learning techniques. By analyzing images of railway tracks, the system predicts the likelihood of accidents, enabling proactive measures to ensure safety.
- Fault Detection: Identifies potential faults in railway tracks from images.
- Accident Prediction: Provides insights into the likelihood of accidents based on detected faults.
- Comprehensive Preprocessing: Includes image resizing, normalization, and splitting into training, validation, and test sets.
- Data Augmentation: Applies transformations like flipping, rotation, and zooming to enhance training data.
- Transfer Learning with VGG16: Adapts a pretrained VGG16 model for task-specific classification.
- Performance Evaluation: Evaluates model accuracy and provides detailed classification reports.
- Visualization: Generates correlation heatmaps and class distribution plots for insights.
- Upload the dataset (in ZIP format) containing railway track images.
- Extract and organize files in the appropriate structure.
- Read metadata from a CSV file.
- Display dataset statistics for initial exploration.
- Resize images to standard dimensions.
- Normalize pixel values for consistent input.
- Define utility functions for batch loading.
- Split the dataset into training, validation, and testing subsets.
- Apply transformations like flipping, rotation, zooming, and brightness adjustments to enrich the training set.
- Load the VGG16 model with pretrained weights.
- Freeze the base model layers and add custom classification layers.
- Compile the model with appropriate loss and optimization settings.
- Train the model using augmented data with early stopping to prevent overfitting.
- Evaluate the trained model on the test dataset.
- Generate a detailed classification report.
- Compute and visualize a correlation matrix.
- Plot class distributions and other relevant charts.
- Python
- TensorFlow/Keras
- OpenCV
- Pandas
- Matplotlib/Seaborn
Install required libraries using:
pip install -r requirements.txt
- Successfully identified faults in railway tracks with high accuracy.
- Data augmentation significantly improved model generalization.
- Visualizations provided actionable insights into track fault patterns.
- Clone the repository:
git clone https://github.com/your-repo-name.git
- Navigate to the project directory:
cd your-repo-name
- Open the Jupyter Notebook and follow the steps.
- Enhance the model to classify specific types of faults.
- Integrate the system into a real-time monitoring solution.
- Experiment with other pretrained models (e.g., ResNet, Inception).
This project is licensed under the MIT License.