How maihan88/anthea works
Anthea is a Flask website for identifying images as one of five flower classes and exploring flower information and classification history. A user submits an image through the website; the API validates it, asks the CNN service for ranked predictions, stores the image and prediction, and exposes results and history to the browser. A separate data-preparation branch collects, cleans, screens, splits, and imports training-image metadata. The README documents the browser/API arrangement and optional Cloudinary storage; some individual page-to-endpoint mappings are not shown in the excerpts.
Main entry points: app.py Flask API · common.py Dataset utilities · config.py App configuration · database.py Flower and prediction models
Components 19
Website
- Browser pages
app/pages - Page scripts
app/static/js - Flask API
app/app.py
Classification and storage
- CNN inference
app/model_service.py - Trained flower CNN
models/flower_cnn.keras - Uploaded image storage
app/storage.py
Dataset preparation
- Dataset utilities
data_tool/common.py - Image collection
data_tool/crawl.py - Image cleaning
data_tool/clean.py - CLIP screening
data_tool/screen.py - Dataset splitting
data_tool/split.py - Manifest import
data_tool/import_manifest.py
Database setup
- App configuration
app/config.py - Flower and prediction models
app/database.py - Flower catalog seeding
app/seed.py
Other components
- Website user
- MySQL database
- Cloudinary
- iNaturalist
Connections 20
- Website user → Browser pages: uses
README.md - Browser pages → Flask API: requests JSON
README.md - Page scripts → Flask API: calls endpoints
README.md - Flask API → App configuration: loads settings
app/app.py - Flask API → Flower and prediction models: queries and stores
app/app.py - Flask API → CNN inference: requests predictions
app/app.py - CNN inference → Trained flower CNN: loads model
app/model_service.py - Flask API → Uploaded image storage: saves and deletes images
app/app.py - Uploaded image storage → Cloudinary: uploads optionally
app/storage.py - Flask API → MySQL database: persists records
README.md - Flower catalog seeding → Flower and prediction models: creates catalog
app/seed.py - Flower catalog seeding → App configuration: loads settings
app/seed.py - Image collection → iNaturalist: fetches observations
data_tool/crawl.py - Image collection → Dataset utilities: uses utilities
data_tool/crawl.py - Image cleaning → Dataset utilities: uses utilities
data_tool/clean.py - Image cleaning → CLIP screening: precedes screening
data_tool/screen.py - CLIP screening → Dataset splitting: precedes splitting
data_tool/split.py - Dataset splitting → Dataset utilities: uses utilities
data_tool/split.py - Manifest import → Flower and prediction models: imports metadata
data_tool/import_manifest.py - Manifest import → App configuration: loads settings
data_tool/import_manifest.py