Natsu-Error commited on
Commit
ef47d5f
·
verified ·
1 Parent(s): c6330b4

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +191 -12
README.md CHANGED
@@ -1,19 +1,198 @@
1
  ---
2
  title: Solar Rooftop Analyzer
3
- emoji: 🚀
4
- colorFrom: red
5
- colorTo: red
6
- sdk: docker
7
- app_port: 8501
8
- tags:
9
- - streamlit
10
  pinned: false
11
- short_description: ' AI-powered solar assessment tool designed for the India'
12
  ---
13
 
14
- # Welcome to Streamlit!
15
 
16
- Edit `/src/streamlit_app.py` to customize this app to your heart's desire. :heart:
17
 
18
- If you have any questions, checkout our [documentation](https://docs.streamlit.io) and [community
19
- forums](https://discuss.streamlit.io).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  title: Solar Rooftop Analyzer
3
+ emoji: ☀️
4
+ colorFrom: indigo
5
+ colorTo: green
6
+ sdk: streamlit
7
+ sdk_version: 1.28.0
8
+ app_file: app.py
 
9
  pinned: false
10
+ license: mit
11
  ---
12
 
13
+ # Advanced Solar Rooftop Analyzer - India Edition
14
 
15
+ AI-powered solar assessment tool designed for the Indian market with computer vision analysis and comprehensive financial projections.
16
 
17
+ ## 🚀 Live Demo
18
+
19
+ **Deployed Application**: [https://huggingface.co/spaces/Natsu-Error/Solar-Rooftop-Analyzer](https://huggingface.co/spaces/Natsu-Error/Solar-Rooftop-Analyzer)
20
+
21
+ ## 🎯 Project Overview
22
+
23
+ This tool combines computer vision and AI to analyze rooftop images for solar panel installation potential, providing detailed financial analysis optimized for Indian market conditions including government subsidies, local electricity rates, and climate data.
24
+
25
+ ## ⚡ Quick Start
26
+
27
+ ### Prerequisites
28
+ - Python 3.8 or higher
29
+ - OpenRouter API account (free tier available)
30
+
31
+ ### Installation
32
+
33
+ 1. **Clone the repository**
34
+ ```
35
+ git remote add origin https://github.com/SyntaxError-Natsu/Solar-Rooftop-Analyzer.git
36
+ cd solar-rooftop-analyzer
37
+ ```
38
+
39
+ 2. **Install dependencies**
40
+ ```
41
+ pip install -r requirements.txt
42
+ ```
43
+
44
+ 3. **Configure environment**
45
+ ```
46
+ cp .env.example .env
47
+ ```
48
+ Edit .env and add your OpenRouter API key
49
+
50
+ 4. **Run the application**
51
+ ```
52
+ streamlit run app.py
53
+ ```
54
+
55
+ 5. **Access the app**
56
+ - Open your browser to `http://localhost:8501`
57
+
58
+ ### Environment Variables
59
+ OPENROUTER_API_KEY=your_api_key_here
60
+
61
+ ## 🛠️ Technology Stack
62
+
63
+ - **Frontend**: Streamlit web application
64
+ - **AI/ML**: OpenRouter API (Qwen 2.5 VL models)
65
+ - **Computer Vision**: OpenCV for roof detection
66
+ - **Deployment**: Hugging Face Spaces
67
+ - **Language**: Python 3.8+
68
+
69
+ ## 🇮🇳 Indian Market Optimization
70
+
71
+ ### Financial Parameters
72
+ - **Currency**: Indian Rupees (₹) with Lakh notation
73
+ - **System Cost**: ₹200 per watt (Indian market pricing)
74
+ - **Electricity Rate**: ₹8 per kWh (average Indian rate)
75
+ - **Government Subsidy**: 30% (Central Government Solar Subsidy)
76
+ - **Climate Data**: 1800 sun hours/year (Indian climate optimized)
77
+
78
+ ### Smart Display Features
79
+ - **Lakh Notation**: ₹21L instead of ₹21,00,000
80
+ - **Thousand Format**: ₹173k instead of ₹1,73,000
81
+ - **Familiar Formats**: Uses Indian numbering conventions
82
+
83
+ ## 🔬 Advanced Analysis Features
84
+
85
+ ### Computer Vision Engine
86
+ - **Real Roof Detection**: OpenCV-based area estimation
87
+ - **Condition Assessment**: Image quality analysis (sharpness, brightness, contrast)
88
+ - **Dynamic Sizing**: System size calculated from actual roof area
89
+ - **Confidence Scoring**: Reliability metrics for each analysis
90
+
91
+ ### AI Enhancement Layer
92
+ - **Vision Models**: Qwen 2.5 VL series (72B/32B/3B variants)
93
+ - **Enhanced Interpretation**: AI analysis of computer vision results
94
+ - **Shading Assessment**: Detailed shading condition evaluation
95
+ - **Fallback System**: Graceful degradation to CV-only if AI fails
96
+
97
+ ## 📊 Analysis Methods
98
+
99
+ 1. **Computer Vision Only**
100
+ - Fast analysis (1-3 seconds)
101
+ - Works without internet connection
102
+ - Reliable baseline results
103
+
104
+ 2. **CV + AI Enhancement**
105
+ - Comprehensive analysis (5-10 seconds)
106
+ - Enhanced accuracy and insights
107
+ - Detailed shading and orientation assessment
108
+
109
+ 3. **Robust Fallback**
110
+ - Always provides results
111
+ - Handles API failures gracefully
112
+ - Multiple model options
113
+
114
+ ## 🎯 Key Features
115
+
116
+ - **Dynamic Results**: Each image produces unique analysis
117
+ - **Professional Reports**: Downloadable JSON analysis reports
118
+ - **Performance Metrics**: Real-time analysis speed and confidence tracking
119
+ - **Multiple AI Models**: Choose from 3 free vision models
120
+ - **Indian Context**: Localized pricing, subsidies, and climate data
121
+
122
+ ## 📱 Usage Instructions
123
+
124
+ 1. **Upload Image**: Choose clear aerial/satellite rooftop image
125
+ 2. **Configure Settings**: Select AI model and maximum system size
126
+ 3. **Choose Method**: CV-only or CV + AI enhancement
127
+ 4. **Analyze**: Click "Analyze with Computer Vision"
128
+ 5. **Review Results**: Comprehensive technical and financial analysis
129
+ 6. **Download Report**: Export detailed JSON report
130
+
131
+ ## 📊 Performance Specifications
132
+
133
+ - **Analysis Time**: 3-13 seconds total
134
+ - **Accuracy**: 75-90% roof area estimation
135
+ - **Success Rate**: 95%+ with fallback systems
136
+ - **Daily Limit**: 50 free AI requests
137
+ - **Supported Formats**: PNG, JPG, JPEG
138
+ - **Image Size**: Up to 10MB recommended
139
+
140
+ ## 📁 Project Structure
141
+ ```
142
+ solar-rooftop-analyzer/
143
+ ├── app.py # Main Streamlit application script
144
+ ├── requirements.txt # Python dependencies
145
+ ├── .env.example # Template for environment variables (e.g., API keys)
146
+ ├── README.md # Project documentation (overview, setup, usage)
147
+ ├── docs/ # Technical documentation folder
148
+ │ ├── implementation.md # Detailed implementation notes
149
+ │ └── examples.md # Example analysis use cases
150
+ └── examples/ # Folder with example inputs and outputs
151
+ ├── rooftop_.jpg # Sample rooftop image (input for analysis)
152
+ └── analysis_.json # Sample analysis result (output from analyzer)
153
+ ```
154
+
155
+ ## 🌱 Environmental Impact
156
+
157
+ This tool supports India's ambitious renewable energy goals:
158
+ - **Net Zero by 2070**: Contributing to India's climate commitments
159
+ - **Renewable Energy Targets**: Supporting solar capacity expansion
160
+ - **CO₂ Offset Calculations**: Environmental impact quantification
161
+
162
+ ## 🚨 Troubleshooting
163
+
164
+ | Issue | Solution |
165
+ |-------|----------|
166
+ | **API Error: 404** | Try different AI model from dropdown |
167
+ | **API Error: 402** | Daily limit exceeded, wait 24 hours or add credits |
168
+ | **Image analysis failed** | Ensure clear rooftop image, check supported formats |
169
+ | **CV works without API** | Computer vision functions independently of API |
170
+
171
+
172
+ ## 📄 License
173
+
174
+ Educational project developed for Solar Industry AI Assistant internship assessment.
175
+ This project is licensed under the MIT License. See the [`LICENSE`](LICENSE) file for details.
176
+
177
+ ## 👨‍💻 Author
178
+
179
+ **[Priyanshu Kumar](https://github.com/SyntaxError-Natsu)** - Solar Industry AI Assistant Candidate
180
+ - **Email**: Priyanshu.pp8@gmail.com
181
+
182
+ ## 🔗 Links
183
+
184
+ - **🌐 Live Demo**: [Hugging Face Spaces](https://huggingface.co/spaces/Natsu-Error/Solar-Rooftop-Analyzer)
185
+ - **📚 Documentation**: [GitHub Repository](https://github.com/SyntaxError-Natsu/Solar-Rooftop-Analyzer)
186
+ - **📊 Technical Details**: [Implementation Guide](docs/implementation.md)
187
+ - **💡 Examples**: [Analysis Examples](docs/examples.md)
188
+
189
+ ## 🤝 Contributing
190
+
191
+ This project is part of an internship assessment. For questions or suggestions:
192
+ 1. Check the troubleshooting section
193
+ 2. Review the technical documentation
194
+ 3. Contact the author via email
195
+
196
+ ---
197
+
198
+ *Built with ❤️ for India's renewable energy future*