Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mihirkudale/sensor-fault-detection-ml
This repository focuses on improving the efficiency and sustainability of heavy-duty vehicles by accurately predicting failures in the Air Pressure System (APS) and reducing the cost of unnecessary repairs.
https://github.com/mihirkudale/sensor-fault-detection-ml
aps-sensorfaultdetection aws-s3 awsec2 awsecr docker fastapi github-actions machine-learning-algorithms mongodb python terrraform
Last synced: about 1 month ago
JSON representation
This repository focuses on improving the efficiency and sustainability of heavy-duty vehicles by accurately predicting failures in the Air Pressure System (APS) and reducing the cost of unnecessary repairs.
- Host: GitHub
- URL: https://github.com/mihirkudale/sensor-fault-detection-ml
- Owner: mihirkudale
- Created: 2023-02-27T11:47:45.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-21T16:26:42.000Z (7 months ago)
- Last Synced: 2024-11-26T01:14:33.821Z (about 1 month ago)
- Topics: aps-sensorfaultdetection, aws-s3, awsec2, awsecr, docker, fastapi, github-actions, machine-learning-algorithms, mongodb, python, terrraform
- Language: Jupyter Notebook
- Homepage:
- Size: 12.5 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Sensor-Fault-Detection
### Problem Statement
The Air Pressure System (APS) is a critical component of a heavy-duty vehicle that uses compressed air to force a piston to provide pressure to the brake pads, slowing the vehicle down. The benefits of using an APS instead of a hydraulic system are the easy availability and long-term sustainability of natural air.This is a Binary Classification problem, in which the affirmative class indicates that the failure was caused by a certain component of the APS, while the negative class
indicates that the failure was caused by something else.### Solution Proposed
In this project, the system in focus is the Air Pressure system (APS) which generates pressurized air that are utilized in various functions in a truck, such as braking and gear changes. The datasets positive class corresponds to component failures for a specific component of the APS system. The negative class corresponds to trucks with failures for components not related to the APS system.The problem is to reduce the cost due to unnecessary repairs. So it is required to minimize the false predictions.
## Tech Stack Used
1. Python
2. FastAPI
3. Machine learning algorithms
4. Docker
5. MongoDB## Infrastructure Required.
1. AWS S3
2. AWS EC2
3. AWS ECR
4. Git Actions
5. Terraform## How to run?
Before we run the project, make sure that you are having MongoDB in your local system, with Compass since we are using MongoDB for data storage. You also need AWS account to access the service like S3, ECR and EC2 instances.## Data Collections
![image](https://user-images.githubusercontent.com/57321948/193536736-5ccff349-d1fb-486e-b920-02ad7974d089.png)## Project Archietecture
![image](https://user-images.githubusercontent.com/57321948/193536768-ae704adc-32d9-4c6c-b234-79c152f756c5.png)## Deployment Archietecture
![image](https://user-images.githubusercontent.com/57321948/193536973-4530fe7d-5509-4609-bfd2-cd702fc82423.png)### Step 1: Clone the repository
```bash
git clone https://github.com/mihirkudale/Sensor-Fault-Detection.git
```### Step 2- Create a conda environment after opening the repository
```bash
conda create -n sensor python=3.7.6 -y
``````bash
conda activate sensor
```### Step 3 - Install the requirements
```bash
pip install -r requirements.txt
```### Step 4 - Export the environment variable
```bash
export AWS_ACCESS_KEY_ID=export AWS_SECRET_ACCESS_KEY=
export AWS_DEFAULT_REGION=
export MONGODB_URL="mongodb+srv://:@ineuron-ai-projects.7eh1w4s.mongodb.net/?retryWrites=true&w=majority"
```
### Step 5 - Run the application server
```bash
python app.py
```### Step 6. Train application
```bash
http://localhost:8080/train```
### Step 7. Prediction application
```bash
http://localhost:8080/predict```
## Run locally
1. Check if the Dockerfile is available in the project directory
2. Build the Docker image
```
docker build --build-arg AWS_ACCESS_KEY_ID= --build-arg AWS_SECRET_ACCESS_KEY= --build-arg AWS_DEFAULT_REGION= --build-arg MONGODB_URL= .```
3. Run the Docker image
```
docker run -d -p 8080:8080
```To run the project first execute the below commmand.
MONGO DB URL:
```
mongodb+srv://mihir:[email protected]/admin?authSource=admin&replicaSet=atlas-okvkrd-shard-0&w=majority&readPreference=primary&appname=MongoDB%20Compass&retryWrites=true&ssl=true
```
windows user```
MONGO_DB_URL=mongodb+srv://mihir:[email protected]/admin?authSource=admin&replicaSet=atlas-okvkrd-shard-0&w=majority&readPreference=primary&appname=MongoDB%20Compass&retryWrites=true&ssl=true
```Linux user
```
export MONGO_DB_URL=mongodb+srv://mihir:[email protected]/admin?authSource=admin&replicaSet=atlas-okvkrd-shard-0&w=majority&readPreference=primary&appname=MongoDB%20Compass&retryWrites=true&ssl=true
```then run
```
python main.py
```