https://github.com/mominurr/object-detection-for-security-and-autonomous-systems
Fastai-based object detection model for 11 different types of image classification
https://github.com/mominurr/object-detection-for-security-and-autonomous-systems
deep-learning deployment fastai image-classification image-processing image-recognition machine-learning python
Last synced: 3 months ago
JSON representation
Fastai-based object detection model for 11 different types of image classification
- Host: GitHub
- URL: https://github.com/mominurr/object-detection-for-security-and-autonomous-systems
- Owner: mominurr
- License: mit
- Created: 2025-02-18T16:52:08.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2025-02-18T20:58:45.000Z (3 months ago)
- Last Synced: 2025-02-18T21:28:41.350Z (3 months ago)
- Topics: deep-learning, deployment, fastai, image-classification, image-processing, image-recognition, machine-learning, python
- Language: Jupyter Notebook
- Homepage: https://mominurr.github.io/Object-Detection-For-Security-And-Autonomous-Systems/
- Size: 84 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Object Detection for Security and Autonomous Systems
## 📌 Overview
This project focuses on developing an **object detection model** using **Fastai**, capable of accurately classifying images into **11 distinct categories**. The model is designed to enhance security, surveillance, and autonomous systems, enabling object identification for critical decision-making.## 🎯 Objectives
- Train a deep learning model for object classification.
- Improve accuracy and efficiency for object detection.
- Deploy the model using **Gradio** on **Hugging Face** for easy accessibility.## 🚀 Use Cases
- **Security & Surveillance**: Detect humans, vehicles, and potential threats.
- **Autonomous Vehicles**: Identify obstacles such as cars, trucks, and pedestrians.
- **Aviation Safety**: Recognize aircraft and airborne hazards like birds.## 🏷️ Categories for Detection
- **Human**
- **Airplane**
- **Automobile**
- **Bird**
- **Cat**
- **Deer**
- **Dog**
- **Frog**
- **Horse**
- **Ship**
- **Truck**## ⚙️ Technologies Used
- **Python** 🐍
- **Fastai** 🏎️
- **Gradio** 🎛️
- **Hugging Face** 🤗
- **Jupyter Notebook** 📓
- **icrawler** 🌍 (for dataset downloading from Bing search engine crawling)## 📊 Model Training & Evaluation
- **Dataset:** Custom dataset with images labeled into 11 categories. Dataset downloading from Bing search engine crawling.
- **Preprocessing:** Image augmentation, normalization, and dataset balancing.
- **Architecture:** Fastai-based transfer learning model for improved accuracy.
- **Training Strategy:** The model utilizes a **ResNet34 architecture** and undergoes fine-tuning with **three training epochs** to optimize accuracy.
- **Metrics:** error_rate, accuracy### 3rd Time Training Result:
```
epoch train_loss valid_loss error_rate accuracy time
0 0.617954 0.029938 0.010135 0.989865 06:55
epoch train_loss valid_loss error_rate accuracy time
0 0.095386 0.070000 0.016892 0.983108 01:35
1 0.089504 0.049305 0.013514 0.986486 01:35
2 0.046270 0.043154 0.010135 0.989865 01:35
```### Dependencies for All Notebooks:
```bash
!pip install -Uqq fastai fastbook nbdev icrawler
```## 🌍 Deployment
The trained model is deployed using **Gradio** on **Hugging Face** for easy access and real-time testing.🔗 **[HuggingFace Spaces App Live URL](https://huggingface.co/spaces/developermominur/Object-Detection-for-Security-and-Autonomous-Systems)**
### Deployed Model Testing Image Result
![]()
![]()
### API-Based Webpage
A **webpage** is being developed where users can **interact with the deployed model** through an **API**, allowing them to upload images and receive real-time classification results or detection outcomes..🔗 **[Webpage Live URL](https://mominurr.github.io/Object-Detection-For-Security-And-Autonomous-Systems/)**
## 📝 Setup Instructions
### 1️⃣ Clone Repository
```bash
git clone https://github.com/mominurr/Object-Detection-for-Security-and-Autonomous-Systems.git
cd Object-Detection-for-Security-and-Autonomous-Systems
```### 2️⃣ Install Dependencies
```bash
pip install -Uqq fastai fastbook nbdev icrawler
```### 3️⃣ Run Model Inference
```bash
cd notebook
jupyter notebook
```
Open `inference.ipynb` and run all cells.### 4️⃣ Deploy Model (Optional)
```bash
cd deployment
python app.py
```## 🔬 Testing
- Use images from `test_images/` to validate model performance.
- Modify `test_download_dir/` for image downloading tests.
- Run `inference.ipynb` to evaluate real-world detection.## 📜 License
This project is licensed under the **MIT License** – see the [LICENSE](LICENSE) file for details.## 🛠️ Contributions
We welcome contributions! Feel free to fork the repository and submit a pull request.## 📩 Contact
For any inquiries or collaborations:
- **Portfolio:** [mominur.dev](https://mominur.dev)
- **GitHub:** [github.com/mominurr](https://github.com/mominurr)
- **LinkedIn:** [linkedin.com/in/mominur--rahman](https://www.linkedin.com/in/mominur--rahman/)
- **Email:** [email protected]🚀 **Star this repo** ⭐ if you find it useful!