capradeepgujaran commited on
Commit
ca470fe
·
verified ·
1 Parent(s): 9dd6b86

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +79 -39
README.md CHANGED
@@ -1,60 +1,100 @@
1
- ---
2
- license: mit
3
- title: Construction_Snag_Tool_Llama_3.2_Vision
4
- sdk: gradio
5
- emoji:
6
- colorFrom: blue
7
- colorTo: green
8
- short_description: ' AI tool designed to enhance workplace safety and compliance'
9
- sdk_version: 5.1.0
10
- ---
11
- ## Construction Site Safety Analyzer
 
 
 
 
12
 
13
- **Description:**
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
- ### Features
17
 
18
- 1. **Multi-file Upload**: Supports uploading multiple construction site images and videos simultaneously.
19
- 2. **Real-time Analysis**: Instantly analyzes each uploaded file to detect safety issues, categorize them, and provide detailed descriptions.
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
- To run the Construction Site Safety Analyzer, you need to have Python installed on your system. Follow these steps to install the required dependencies:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
 
28
  ```bash
29
- pip install gradio opencv-python-headless pillow numpy groq-sdk
30
  ```
31
 
32
- Additionally, ensure you have a valid `GROQ_API_KEY` set in your environment variables. This key is necessary for interacting with the Groq API.
33
 
34
- ### Usage
35
 
36
- 1. **Launch the Application**: Run the script to start the Gradio interface.
37
- ```bash
38
- python your_script_name.py
39
- ```
40
-
41
- 2. **Upload Files**: Navigate to the web interface and upload one or more construction site images or videos.
42
- 3. **Initiate Analysis**: Click the "🔍 Analyze Safety Hazards" button to start the analysis.
43
- 4. **View Results**: The safety analysis results will be displayed in the chat interface, along with any expert chat responses.
44
- 5. **Download Reports**: After completing your analysis, click the "📥 Download Report" button to save a summary report of all interactions.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
 
46
- ### Customization
 
 
 
 
 
47
 
48
- The application includes custom CSS for enhanced styling. You can modify the `custom_css` variable to customize the appearance according to your preferences.
49
 
50
- ### Error Handling
51
 
52
- The application includes robust error handling mechanisms to log and display errors encountered during file analysis, chat sessions, and report generation. Detailed logs can be found in the application's output console.
53
 
54
- ### Contact
55
 
56
- This Tool is developed by CA Pradeep Gujaran. For further support or inquiries, please contact us at pradeepb@icai.org or through Linkedin https://www.linkedin.com/in/pradeep-gujaran-botguy/
57
 
58
  ---
59
 
60
- This README provides a comprehensive overview of the Construction Site Safety Analyzer, its features, installation instructions, usage guide, customization options, and error handling mechanisms.
 
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.