- Introduction
- Backend Overview
- Frontend Overview
- EXIF Metadata Extraction
- Prompt options- Identifying Wetland Organisms
- Lookup Tables vs ENUM
- React Frontend Setup
- How to Start the Frontend
- Recommended Photo Sites
- Diagnosing Performance Issues
This repository contains the Wetlands Prototype MVP, a project designed to analyze wetland images, extract metadata, and provide insights using AI models. The project includes a FastAPI backend, a React frontend, and PostgreSQL for data storage.
- API Layer: Handles HTTP requests and routes them to appropriate services.
- Service Layer: Contains business logic and interacts with the database and AI models.
- Database: Stores structured data for the application.
- AI Model Integration: Embeds AI models for inference tasks, such as image recognition and data analysis.
- Frameworks: Built using FastAPI for lightweight and efficient API handling.
- Database: Utilizes PostgreSQL for relational data storage.
- AI Models: Integrated using pre-trained models for specific tasks.
- Environment Configuration: Managed through
.envfiles for secure and flexible deployment.
- Responsive Design: Ensures compatibility across devices of various screen sizes.
- React with Vite: Provides a fast development environment and optimized builds.
- Widespread Support: Embedded in most modern image formats (e.g., JPEG, TIFF).
- Rich Metadata: Includes date-time, camera settings, GPS coordinates, and more.
- Ease of Use: Libraries like Pillow make it straightforward to extract EXIF data.
- Read-Only: EXIF metadata is primarily read-only.
- Not Universal: Some images (e.g., screenshots) may lack EXIF metadata.
- Multiple Choice: Provides 1-3 possible identifications with a fact about the organism.
- Most Likely Identification: Suggests the most likely organism visible in the image.
- Hidden Inhabitant: Suggests an organism likely present but not visible based on habitat and metadata.
- Scalability: Add new categories without schema changes.
- Flexibility: Supports regional variations and external GIS integration.
- Analytics: Easier to analyze evolving categories.
- Start with JavaScript and React Compiler for simplicity and modern tooling.
- Transition to TypeScript in later phases if needed.
- Install Dependencies:
npm install
- Start the Development Server:
npm start
- Open in Browser:
Navigate to the URL displayed in the terminal (e.g.,
http://localhost:3000). #Options through development:
- Wolf River Greenway: Explore the Greenway
- Wolf River Interactive Map: View Map
- Bridges over culverts
- High response times during large image uploads.
- Increased failure rates on metadata extraction endpoints.
- Fluctuating request rates causing slowdowns.
- Identify Log Patterns:
- Use Azure Monitor and Application Insights to analyze logs.
- Example KQL Query:
requests | where timestamp > ago(1h) | summarize count() by resultCode, bin(timestamp, 5m)
- Set Alerts:
- Define alert rules for high CPU usage, response times, and failure rates.
- Propose Corrective Actions:
- Short-term: Scale out resources.
- Long-term: Optimize database queries and improve AI model efficiency.