Inspiration

When you walk into a local flower shop, you can ask the florist if a stem is poisonous, how to care for it, or whether it attracts bees. But when flowers are ordered online, picked up at a grocery store, or received as a gift, they almost never come with warning labels:

  • In real discussions on r/florists and r/whatsthisplant people repeatedly share stories of buying unlabelled flowers while other share stories of interacting with flowers and getting sick or experiencing certain symptoms later on.
  • Working florists in r/florists explain that most shops do not label their flowers and expect customers to do their own research, since not everyone who sells flowers knows much about them.
  • Other cases involves curious children and adults who face hazards from toxic sap, skin irritation, or accidental ingestion of common ornamental blooms like Foxglove, Monkshood, and Thorn Apple.

Right now, trying to check a flower leaves people stuck between two frustrating options:

  1. Googling the flower, which often returns unreliable blogs or mixes up common names (for example, searching "Cape Flower" on Google brings up South Africa's King Protea, rather than Nerine bowdenii, the actual flower also known as Cape Flower).
  2. Digging through verified databases like the NC State Extension Plant Toolbox, which has trustworthy data but requires already knowing the flower's name and reading through long, dense botanical pages just to get a simple answer.

What it does

Florina is a Digital Florist and Botanical Safety Guide that turns a flower photo or filter search into a clean, verified care card.

Core Features

  1. Identify a Flower Photo: Upload a flower photo to identify it across 102 species.
  2. Instant Florist & Safety Card: Displays verified records for:
    • Safety, Toxicity & Edibility ✿ Uses, Pollinators & Season ✿ Origin & Conservation ✿ 1884 Flower Meaning
  3. Ask the Florist (Search & Filter): Filter all 102 flowers by safety, bees/pollinators, uses, color, bloom season, or meaning.
  4. Botanical Directory (A-Z): Browse the full alphabetical catalog of 102 flowers.
  5. Read More Section: Available at the footer of each care card if you want to read more about the flower.

How we built it

  1. Verified Botanical Database (data/flowers_102_verified.json): Built a Python data pipeline (scripts/build_flower_db.py) that cross-references all 102 Oxford flower species against four external sources:
    • GBIF REST API & IUCN Red List (102/102 taxonomy, native regions, and conservation status)
    • NC State University Extension Plant Toolbox (90/102 toxicity, edibility, pollinators, and uses)
    • Project Gutenberg (83/102 historical meanings from Kate Greenaway's 1884 Language of Flowers)
  2. Transfer Learning & Model Comparison (Kaggle T4 GPUs): Trained on 7,169 balanced Oxford 102 images (1,020 held out for unseen testing) with phone-camera augmentation (RandomFlip, RandomRotation, RandomZoom, RandomTranslation, RandomContrast, RandomBrightness):

$$ \begin{array}{|l|c|l|c|c|} \hline \textbf{Model} & \textbf{Resolution} & \textbf{Fine-Tuning Setup} & \textbf{Test Acc (1,020)} & \textbf{Multi-Crop} \cr \hline \text{MobileNetV2} & 224 \times 224 & \text{20 Epochs (lr = 2e-5)} & 87.55\% & - \cr \hline \text{MobileNetV3Large} & 224 \times 224 & \text{35 Epochs (CosineDecay, LS 0.1)} & 93.04\% & - \cr \hline \textbf{MobileNetV3Large (Final)} & \mathbf{320 \times 320} & \textbf{35 Epochs (CosineDecay, LS 0.1)} & \mathbf{95.39\%} & \mathbf{95.78\%} \cr \hline \end{array} $$

  1. Web App & Inference Engine (app.py, model_engine.py, templates/index.html): Built a Flask web app. Because official TensorFlow pip wheels are not yet available for Python 3.14, model_engine.py unpacks the trained .keras model (config.json + model.weights.h5) and runs the 202-layer MobileNetV3Large graph directly in NumPy + PyTables..

Challenges we ran into

  1. Class Imbalance When Merging External Datasets: In an early experiment, we merged ~2,870 extra photos from tf_flowers, which only covered 4 of the 102 species (Rose, Daisy, Dandelion, Sunflower). That skewed predictions toward those 4 classes and dropped accuracy. Returning to the balanced 102-class Oxford dataset with full shuffling (buffer=8000) immediately fixed the bias.
  2. Look-Alike Flowers & Partial/Wide-Angle Photos: Many flowers share similar outer petals and are primarily distinguished by their center stamens or disc. While upgrading from MobileNetV2 (224 × 224) (87.55%) to MobileNetV3Large (320 × 320) (95.78%) and adding EXIF rotation + aspect-preserving center cropping significantly improved recognition, the model still struggles when an uploaded photo only shows outer petals without the flower's center or shows a distant whole bush instead of the bloom.
  3. Cleaning Database Edge Cases: On NC State Extension, 6 toxic species (Sweet Pea, Fire Lily, Poinsettia, Marigold, Thorn Apple, Cyclamen) had warnings like "Toxic if ingested" inside their "Edibility" field, while broad single-word searches in the 1884 dictionary initially matched unrelated flowers. We wrote strict filtering rules so toxic warnings never appear under Edible Uses and every 1884 meaning matches the true species.
  4. Running Keras 3 Models on Python 3.14: Since TensorFlow does not yet ship Python 3.14 wheels, we built a custom NumPy + PyTables forward-pass engine in model_engine.py supporting MobileNetV3Large's hard_silu activations, 5×5 depthwise convolutions, and Squeeze-and-Excite blocks.

LIMITATIONS

  • Limited to 102 Species: The classifier only knows the 102 flower species in the Oxford 102 Flower Dataset (listed in the Botanical Directory). Uploading any flower outside those 102 species will either fall below the confidence cutoff or get matched to the closest-looking species among the 102.
  • Not Perfect on Partial or Distant Photos: The model works best on clear close-ups of 1 or 2 blooms where the whole bloom (including the center stamens or disc) is visible, and can still misclassify photos that only show outer petals or distant whole bushes. Some close ups with blurry or not-so-good angles still struggle to classify correctly.
  • Source Coverage: While all 102/102 species have GBIF and IUCN records, 12 species are not indexed in NC State Extension toxicity records and 19 modern tropical species do not appear in the 1884 Language of Flowers book.
  • Color Varieties & Life Stages: Some flowers look completely different across life stages or color varieties (for example, a Common Dandelion can be a bright yellow bloom or a white fluffy seed head). If the Oxford 102 training set only captured one color or stage, the model can struggle to recognize the others which is why expanding to a larger, more varied dataset is needed.

Accomplishments that we're proud of

  • Reached 95.78% Accuracy Across 102 Species: Improved steadily from 87.55% (MobileNetV2 224×224) to 93.04% (MobileNetV3Large 224×224) to 95.78% (MobileNetV3Large 320×320) through controlled, step-by-step experiments.
  • Built a Clean, Verified 4-Source Botanical Guide: Combined GBIF, IUCN Red List, NC State Extension, and the 1884 Language of Flowers into one readable care card, avoiding unreliable blogs and common-name mix-ups (like Cape Flower vs. King Protea).
  • Real-World Stress Testing: Tested the model on real internet photos beyond the benchmark dataset to uncover actual edge cases (flower life stages like yellow vs. white dandelions, side angles, and multi-bloom shots) instead of relying on lab scores alone.

What we learned

  • MobileNet Architecture & Fine-Tuning: Learned how MobileNetV2 and MobileNetV3Large work under the hood, and how two-phase transfer learning (CosineDecay, label_smoothing=0.1, and frozen BatchNormalization layers) improves accuracy without overfitting.
  • Data Quality Over Raw Volume: Learned that balanced classes, proper shuffling, and higher input resolution (320 × 320) matter far more than adding extra unbalanced images.

What's next for Florina

  • Expand Beyond 102 Species: Train on larger botanical datasets (such as iNaturalist and Pl@ntNet) to cover common bouquet flowers not in Oxford 102.
  • Auto-Crop Flower Detection: Add a lightweight object-detection stage before classification so wide-angle bush or multi-flower bouquet photos automatically zoom onto individual blooms.
  • Complete Toxicity Coverage: Cross-reference unindexed species with other databases.

CREDITS

Python ✿ TensorFlow ✿ Keras ✿ MobileNetV2 ✿ MobileNetV3 ✿ TensorFlow Datasets ✿ Flask ✿ NumPy ✿ Pillow ✿ PyTables ✿ Matplotlib ✿ Oxford 102 Flowers Dataset ✿ GBIF API ✿ IUCN Red List ✿ NC State Extension Plant Toolbox ✿ Project Gutenberg (Language of Flowers, 1884) ✿ Google Fonts ✿ Google Antigravity

Built With

Share this project:

Updates

Submission history