Inspiration

The inspiration for Tree Bank Guardian came from observing the gap between Thailand's innovative Tree Bank initiative - which treats trees as measurable environmental assets - and the practical challenges of monitoring thousands of trees across diverse locations. We saw farmers and community leaders struggling with manual record-keeping, inconsistent health assessments, and difficulty quantifying environmental value.

Our "aha moment" arrived when we realized that Google's Gemini multimodal AI could potentially revolutionize this process. What if a smartphone camera paired with advanced vision recognition could instantly identify tree species, assess health, and calculate environmental benefits? This convergence of environmental need and cutting-edge AI capability sparked our project.

We were particularly inspired by the potential to democratize environmental stewardship - making sophisticated tree monitoring accessible to anyone with a smartphone, not just botanical experts or well-funded organizations.

What it does

Tree Bank Guardian is a web-based platform that transforms tree monitoring through AI. At its core, the system:

  • Analyzes tree images using Gemini's vision capabilities to identify species, estimate size/age, and detect health issues
  • Calculates environmental value including carbon sequestration, oxygen production, and estimated monetary value.
  • Maintains digital tree profiles with growth tracking and health history
  • Provides AI-powered care recommendations through conversational interface
  • Generates shareable certificates that validate environmental contributions For a Tree Bank member, the workflow is simple: snap a photo → get instant analysis → track progress over time. The system bridges individual tree care with broader environmental impact measurement.

How we built it

I built Tree Bank Guardian in a 4-day sprint using a streamlined, AI-first approach: Technical Stack:

  • Frontend/Backend: Streamlit (for rapid prototyping and deployment)
  • AI Engine: Google Gemini 1.5 Pro & Flash APIs
  • Database: SQLite with JSON fields for flexible data storage
  • Deployment: Streamlit Community Cloud
  • Version Control: GitHub

Development Process: Day 1: Foundation

  • Set up Streamlit application with file upload capabilities
  • Integrated Gemini API with specialized prompts for botanical analysis
  • Created basic image processing pipeline Day 2: Core Features
  • Implemented multimodal analysis: image → Gemini Vision → structured JSON
  • Built conversational interface for care advice
  • Added environmental value calculations Day 3: Polish & Integration
  • Created dashboard visualization with growth tracking
  • Implemented data persistence for tree profiles
  • Added export functionality for reports Day 4: Deployment & Documentation
  • Deployed to Streamlit Cloud
  • Created demonstration video and documentation
  • Prepared submission materials

Key Technical Components:

  1. Vision Analysis Pipeline: Custom prompts that transform Gemini into a botanical expert
  2. Conversational Memory: Session-based chat maintaining tree context
  3. Progressive Enhancement: Graceful degradation when API limits are reached
  4. Mobile-First Design: Streamlit's responsive components for smartphone access

Challenges we ran into

Technical Challenges:

  1. API Latency & Costs: Gemini's vision processing, while accurate, introduced latency. We implemented caching and used gemini-1.5-flash for non-vision tasks to balance speed and cost.
  2. Structured Output Consistency: Getting consistent JSON from Gemini's free-form responses required sophisticated prompt engineering and fallback parsing logic.
  3. Development Time Crunch: With only 4 days from concept to submission, we had to make ruthless prioritization decisions, focusing on core functionality over polish.
  4. Deployment Constraints: Streamlit Cloud's resource limits required optimizing image sizes and implementing lazy loading. Domain-Specific Challenges:
  5. Botanical Accuracy: Ensuring reliable identification of Thai-native species required creating detailed prompt context with local names and characteristics.
  6. Value Calculation Simplification: Complex environmental economics had to be distilled into understandable metrics without oversimplifying.
  7. User Experience Balance: Creating an interface simple enough for rural users while powerful enough for serious environmental tracking. ## Accomplishments that we're proud of Despite the time constraints, we're particularly proud of:
  8. Creating a Complete Working Prototype in just 4 days that demonstrates the core value proposition end-to-end.
  9. Effective Gemini Integration: Successfully leveraging multiple Gemini capabilities (vision, reasoning, conversation) in a cohesive application.
  10. Practical Environmental Impact: Developing calculations that, while simplified, provide meaningful insights into tree value.
  11. Rural Accessibility Focus: Designing for users with potentially limited connectivity and technical experience.
  12. Hackathon Success Factors: Meeting all submission requirements including working demo, video presentation, and clear documentation.

What we learned

Technical Learnings:

  1. Gemini's Strengths: Exceptional at multimodal understanding when provided with clear context and structured prompts
  2. Streamlit for Rapid Prototyping: Surprisingly capable for full-stack applications with AI integration
  3. AI System Design: The importance of designing for API failures, rate limits, and cost constraints from day one Domain Learnings:
  4. Environmental Economics: How carbon markets work and how to translate ecological benefits into economic metrics
  5. Thai Arboriculture: Specific challenges and opportunities in Thailand's tree cultivation ecosystem
  6. User Behavior: How different stakeholders (farmers, NGOs, government) approach tree monitoring Process Learnings:
  7. Extreme Timeboxing: How to prioritize "demo-able" features over completeness
  8. AI Prompt Evolution: The iterative process of refining prompts based on output quality
  9. Minimal Viable Documentation: Creating just enough documentation to support the hackathon submission without over-engineering

What's next for Tree Bank Guardian

Short-term Enhancements (Next 3 Months):

  1. Community Features: Allow users to share successful care strategies and form local tree care groups
  2. Offline Capability: Basic functionality without internet connectivity
  3. Multi-language Support: Expand beyond English to Thai and other regional languages
  4. Enhanced Species Database: Partner with botanical gardens to improve identification accuracy Medium-term Vision (6-12 Months):
  5. Blockchain Integration: Immutable tree ownership records and transparent carbon credit tracking
  6. Satellite Data Correlation: Combine ground-level observations with satellite imagery for large-scale monitoring
  7. Government/NGO Dashboard: Aggregate analytics for policymakers and environmental organizations
  8. Mobile App Development: Native iOS/Android applications for better field usability Long-term Impact (1-3 Years):
  9. Carbon Market Integration: Direct connection to carbon credit marketplaces
  10. International Expansion: Adapt the platform for different ecosystems and regulatory environments
  11. Educational Platform*: Teaching materials and certification for sustainable agroforestry
  12. Research Collaboration: Partnering with universities for longitudinal environmental impact studies

Technical Roadmap:

  1. Migration to more scalable backend (FastAPI + React)
  2. Implementation of fine-tuned models for regional species
  3. Integration with IoT sensors for automated health monitoring
  4. Development of API for third-party applications

Tree Bank Guardian represents just the first step toward democratizing environmental asset management. We believe that by making tree monitoring accessible, quantifiable, and rewarding, we can accelerate global reforestation efforts and create new economic opportunities for rural communities.

Built With

Share this project:

Updates