{"id":28318157,"url":"https://github.com/hasanulmukit/ai-smart-factory-optimization","last_synced_at":"2025-07-26T09:34:01.808Z","repository":{"id":290550243,"uuid":"973419495","full_name":"hasanulmukit/ai-smart-factory-optimization","owner":"hasanulmukit","description":"An AI/ML system designed to optimize smart factory operations by streamlining production lines, reducing waste, and automating material recycling. ","archived":false,"fork":false,"pushed_at":"2025-05-03T04:33:42.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-01T15:15:28.382Z","etag":null,"topics":["artificial-intelligence","machine-learning","recycling","streamlit","waste-classification"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hasanulmukit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-27T00:21:07.000Z","updated_at":"2025-05-03T04:35:55.000Z","dependencies_parsed_at":"2025-04-29T12:23:48.439Z","dependency_job_id":"1410000b-88b4-4de8-b7d0-7dc4a42f3933","html_url":"https://github.com/hasanulmukit/ai-smart-factory-optimization","commit_stats":null,"previous_names":["hasanulmukit/ai-smart-factory-optimization"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hasanulmukit/ai-smart-factory-optimization","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hasanulmukit%2Fai-smart-factory-optimization","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hasanulmukit%2Fai-smart-factory-optimization/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hasanulmukit%2Fai-smart-factory-optimization/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hasanulmukit%2Fai-smart-factory-optimization/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hasanulmukit","download_url":"https://codeload.github.com/hasanulmukit/ai-smart-factory-optimization/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hasanulmukit%2Fai-smart-factory-optimization/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267145664,"owners_count":24042651,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-26T02:00:08.937Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["artificial-intelligence","machine-learning","recycling","streamlit","waste-classification"],"created_at":"2025-05-25T07:12:00.836Z","updated_at":"2025-07-26T09:34:01.799Z","avatar_url":"https://github.com/hasanulmukit.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Smart Factory Optimization with Automated Material Recycling\n\n**Repository Overview**\n\nThis project implements an AI/ML system designed to optimize smart factory operations by streamlining production lines, reducing waste, and automating material recycling. Leveraging state-of-the-art deep learning models and advanced data processing tools, this repository guides you through every step—from data collection and preprocessing to model training, inference, and dashboard deployment using Streamlit.\n\n---\n\n## Table of Contents\n\n* [Features](#features)\n* [System Architecture](#system-architecture)\n* [Prerequisites](#prerequisites)\n* [Installation](#installation)\n* [Project Structure](#project-structure)\n* [Data Preparation](#data-preparation)\n* [Model Training](#model-training)\n* [Inference Pipeline](#inference-pipeline)\n* [Streamlit Dashboard](#streamlit-dashboard)\n* [Advanced Data Processing with DeepSeek](#advanced-data-processing-with-deepseek)\n* [Testing and Optimization](#testing-and-optimization)\n* [Deployment](#deployment)\n* [Contributing](#contributing)\n* [License](#license)\n* [Acknowledgments](#acknowledgments)\n\n---\n\n## Features\n\n* **Image-based Waste Classification:** Uses transfer learning on EfficientNet to classify recyclable vs. non-recyclable materials.\n* **Data Augmentation:** On-the-fly augmentation to improve model robustness.\n* **Automated Inference Pipeline:** Real-time image ingestion and classification.\n* **Interactive Dashboard:** Streamlit app for uploading images, visualizing predictions, and monitoring performance metrics.\n* **DeepSeek Integration:** Advanced data processing and report generation on production metrics.\n* **Extensible Design:** Easily swap model architectures or integrate object detection frameworks like YOLO.\n\n---\n\n## System Architecture\n\n```plaintext\n+---------------------+       +----------------------+       +--------------------+\n| Production Line Cam |  --\u003e  | Inference Pipeline   |  --\u003e  | Automated Sorting  |\n+---------------------+       +----------------------+       +--------------------+\n         |                                                          ^\n         v                                                          |\n+----------------------+       +----------------------+                |\n| Data Collection      |       | Model Training       |-----------------+\n+----------------------+       +----------------------+                |\n         |                                                          |\n         v                                                          v\n+----------------------+       +----------------------+       +----------------+\n| DeepSeek Reporting   |\u003c--    | Streamlit Dashboard  |       | Visualization  |\n+----------------------+       +----------------------+       +----------------+\n```\n\n---\n\n## Prerequisites\n\n* Python 3.8+\n* Kaggle or Google Colab for model training (with GPU runtime)\n* VS Code for local development\n* Streamlit for dashboard\n* Git for version control\n\n---\n\n## Installation\n\n1. Clone the repository:\n\n   ```bash\n   git clone https://github.com/yourusername/smart-factory-recycling.git\n   cd smart-factory-recycling\n   ```\n\n2. (Optional) Create and activate a virtual environment:\n\n   ```bash\n   python3 -m venv env\n   source env/bin/activate        # macOS/Linux\n   env\\Scripts\\activate.bat     # Windows\n   ```\n\n3. Install dependencies:\n\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n---\n\n## Project Structure\n\n```plaintext\nsmart-factory-recycling/\n├── dataset/                       # Raw and processed images\n├── data_preprocessing.py         # Data loading \u0026 augmentation\n├── model_training.py             # Model definition \u0026 training loop\n├── inference.py                  # Inference utilities\n├── dashboard.py                  # Streamlit dashboard\n├── deep_insights.py              # DeepSeek integration scripts\n├── requirements.txt              # Python dependencies\n├── best_model.h5                 # Saved best model weights\n└── README.md                     # Project documentation\n```\n\n---\n\n## Data Preparation\n\n1. **Organize Dataset:** Place images in `dataset/\u003cclass_name\u003e/` directories (e.g., `dataset/recyclable/`, `dataset/non_recyclable/`).\n2. **Run Preprocessing:**\n\n   ```bash\n   python data_preprocessing.py\n   ```\n3. **Inspect Augmentations:** The script visualizes sample augmentations to verify correctness.\n\n---\n\n## Model Training\n\n1. **Configure Hyperparameters:** Modify constants in `model_training.py` (e.g., `IMG_HEIGHT`, `BATCH_SIZE`, `EPOCHS`).\n2. **Train Model on Kaggle/Colab:**\n\n   * Upload scripts and dataset to Colab.\n   * Enable GPU runtime.\n   * Run:\n\n     ```bash\n     python model_training.py\n     ```\n3. **Best Model:** Training checkpoints and the best-performing model will be saved as `best_model.h5`.\n\n---\n\n## Inference Pipeline\n\nUse `inference.py` to load the trained model and classify new images:\n\n```bash\npython inference.py --image path_to_image.jpg\n```\n\nThis script outputs the predicted class and confidence score. Integrate with the factory camera feed for real-time classification.\n\n---\n\n## Streamlit Dashboard\n\nLaunch the interactive dashboard to upload images and visualize predictions:\n\n```bash\nstreamlit run dashboard.py\n```\n\nFeatures:\n\n* Image uploader\n* Real-time classification display\n* Confidence visualization\n\n---\n\n## Advanced Data Processing with DeepSeek\n\nIf you have access to DeepSeek:\n\n```bash\npython deep_insights.py --csv production_data.csv\n```\n\nThis generates a comprehensive report on throughput, waste metrics, and optimization suggestions.\n\n---\n\n## Testing and Optimization\n\n* **Local Testing:** Validate the inference pipeline with sample images.\n* **Fine-Tuning:** Unfreeze top layers of EfficientNet for additional training.\n* **Quantization:** Use TensorFlow Lite for edge deployment.\n* **Batch Processing:** Optimize throughput by processing images in batches or asynchronously.\n\n---\n\n## Deployment\n\n* **REST API (Optional):** Wrap inference in FastAPI:\n\n  ```bash\n  uvicorn api:app --host 0.0.0.0 --port 8000\n  ```\n* **Docker:** Containerize the app for scalable deployment.\n* **Cloud Services:** Deploy on AWS EC2, GCP Compute Engine, or Azure VM.\n\n---\n\n## Contributing\n\nContributions are welcome! Please follow these steps:\n\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature-name`)\n3. Commit your changes (`git commit -m 'Add feature'`)\n4. Push to the branch (`git push origin feature-name`)\n5. Open a Pull Request\n\n---\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n---\n\n## Acknowledgments\n\n* [TrashNet Dataset](https://github.com/garythung/trashnet) for waste classification data\n* TensorFlow \u0026 Keras for deep learning APIs\n* Streamlit for rapid dashboard development\n* DeepSeek for advanced data analytics\n\n---\n\nHappy optimizing!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhasanulmukit%2Fai-smart-factory-optimization","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhasanulmukit%2Fai-smart-factory-optimization","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhasanulmukit%2Fai-smart-factory-optimization/lists"}