Upload README.md
Browse files
README.md
CHANGED
@@ -1,60 +1,100 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
|
|
|
|
|
|
|
|
12 |
|
13 |
-
|
14 |
-
The Construction Site Safety Analyzer is a powerful tool designed to enhance workplace safety and compliance through advanced image and video analysis. Utilizing cutting-edge technologies like Llama 3.2 90B Vision and expert chat assistance, this application helps identify potential hazards, ensure adherence to safety standards, and recommend actionable steps.
|
15 |
|
16 |
-
|
17 |
|
18 |
-
|
19 |
-
|
20 |
-
3. **Expert Chat Assistance**: Engages in real-time conversations to answer specific safety-related questions and provide additional insights.
|
21 |
-
4. **Summary Reports**: Generates comprehensive reports summarizing all analyzed files and chat interactions.
|
22 |
-
5. **User-friendly Interface**: Designed with ease of use in mind, featuring a clean and intuitive design.
|
23 |
|
24 |
### Installation
|
25 |
|
26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
|
28 |
```bash
|
29 |
-
|
30 |
```
|
31 |
|
32 |
-
|
33 |
|
34 |
-
|
35 |
|
36 |
-
1. **
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
3. **
|
43 |
-
|
44 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
|
46 |
-
|
|
|
|
|
|
|
|
|
|
|
47 |
|
48 |
-
|
49 |
|
50 |
-
|
51 |
|
52 |
-
|
53 |
|
54 |
-
|
55 |
|
56 |
-
This
|
57 |
|
58 |
---
|
59 |
|
60 |
-
|
|
|
1 |
+
# Construction Site Snag Detector
|
2 |
+
|
3 |
+
## Overview
|
4 |
+
|
5 |
+
The Construction Site Snag Detector is a powerful tool built using Python, Gradio, and the Groq platform. It leverages AI to automatically detect defects, unfinished work, and quality issues in construction site images and videos. This solution aims to enhance quality control and project management by providing real-time insights and expert analysis.
|
6 |
+
|
7 |
+
## Features
|
8 |
+
|
9 |
+
- **Multi-file Support**: Upload multiple images and videos for batch processing.
|
10 |
+
- **Real-time Analysis**: Get immediate results for uploaded files without waiting for long processing times.
|
11 |
+
- **Expert Insights**: Detailed reports generated by an AI assistant specializing in construction site snag detection.
|
12 |
+
- **Interactive Chat**: Engage in real-time discussions with the AI assistant to clarify findings and ask follow-up questions.
|
13 |
+
- **Customizable Reports**: Download comprehensive reports for record-keeping and future reference.
|
14 |
+
|
15 |
+
## Getting Started
|
16 |
|
17 |
+
### Prerequisites
|
|
|
18 |
|
19 |
+
Before you begin, ensure you have the following installed:
|
20 |
|
21 |
+
- Python 3.8 or higher
|
22 |
+
- Required Python packages (`requirements.txt` provided below)
|
|
|
|
|
|
|
23 |
|
24 |
### Installation
|
25 |
|
26 |
+
1. Clone the repository:
|
27 |
+
```bash
|
28 |
+
git clone https://github.com/your-repo/construction-site-snag-detector.git
|
29 |
+
cd construction-site-snag-detector
|
30 |
+
```
|
31 |
+
|
32 |
+
2. Install dependencies:
|
33 |
+
```bash
|
34 |
+
pip install -r requirements.txt
|
35 |
+
```
|
36 |
+
|
37 |
+
3. Set the `GROQ_API_KEY` environment variable:
|
38 |
+
```bash
|
39 |
+
export GROQ_API_KEY=your_groq_api_key_here
|
40 |
+
```
|
41 |
+
|
42 |
+
### Running the Application
|
43 |
+
|
44 |
+
To start the application, simply run the main script:
|
45 |
|
46 |
```bash
|
47 |
+
python app.py
|
48 |
```
|
49 |
|
50 |
+
This will launch a Gradio web interface where you can interact with the Construction Site Snag Detector.
|
51 |
|
52 |
+
## Usage
|
53 |
|
54 |
+
1. **Upload Files**:
|
55 |
+
- Go to the "Upload Files" section and select one or more images or videos of your construction site.
|
56 |
+
|
57 |
+
2. **Detect Snags**:
|
58 |
+
- Click the "Detect Snags" button to initiate the analysis.
|
59 |
+
|
60 |
+
3. **View Results**:
|
61 |
+
- The analysis results will be displayed in the chat area. Each file's results will be shown separately.
|
62 |
+
|
63 |
+
4. **Engage with the AI Assistant**:
|
64 |
+
- Ask questions about the detected snags or request additional information directly within the chat interface.
|
65 |
+
|
66 |
+
5. **Download Report**:
|
67 |
+
- Once you're satisfied with the analysis, click the "Download Report" button to save a comprehensive report for your records.
|
68 |
+
|
69 |
+
## Technical Details
|
70 |
+
|
71 |
+
### Architecture
|
72 |
+
|
73 |
+
- **Frontend**: Built using Gradio for a user-friendly interface.
|
74 |
+
- **Backend**: Utilizes Python for file handling, image processing, and AI analysis.
|
75 |
+
- **AI Integration**: Leverages the Groq platform for AI inference, enabling real-time analysis.
|
76 |
+
|
77 |
+
### Dependencies
|
78 |
+
|
79 |
+
The project relies on several libraries, including:
|
80 |
|
81 |
+
- `gradio`: For creating the interactive web interface.
|
82 |
+
- `PIL`, `opencv-python`, `numpy`: For image processing.
|
83 |
+
- `base64`: For encoding images.
|
84 |
+
- `logging`: For logging errors and debugging information.
|
85 |
+
- `tempfile`: For generating temporary files.
|
86 |
+
- `groq`: For interacting with the Groq platform.
|
87 |
|
88 |
+
These dependencies are managed via `requirements.txt`.
|
89 |
|
90 |
+
## Contributing
|
91 |
|
92 |
+
Contributions are welcome! Feel free to submit pull requests, bug reports, or feature suggestions.
|
93 |
|
94 |
+
## License
|
95 |
|
96 |
+
This project is licensed under the MIT License. See the `LICENSE` file for details.
|
97 |
|
98 |
---
|
99 |
|
100 |
+
**Note:** Ensure you have the necessary permissions and comply with all relevant laws and regulations when using this tool, especially concerning data privacy and security.
|