๐Ÿฆ‹ Welcome: Butterfly CNN Image Classification App

Identify 75 Butterfly Species From Photo.

Requirement Statement: (From the client) We aim to boost butterfly numbers by creating and maintaining suitable habitats, promoting biodiversity, and implementing conservation measures that protect them from threats such as habitat loss, climate change, and pesticides.

Problem Facing: Butterfly populations are decreasing due to habitat loss, climate change, and pesticides. This issue endangers their diversity and risks essential pollination services, impacting food production and natural environments. We need the butterfly population count from around the world to assess the damage.

This real-world CNN app is from the "AI Solution Architect," by ELVTR and Duc Haba.


๐ŸŒด Helpful Instruction:

  1. Take a picture or upload a picture.

  2. Click the "Submit" button.

  3. View the result on the Donut plot.

  4. (Optional) Rate the correctness of the identification.


๐ŸŒด Author Note:

  • The final UI is a sophisticated iOS, Android, and web app developed by the UI team. It may or may not include the donut graph, but they all utilize the same REST input-output JSON API.

  • I hope you enjoy this as much as I enjoyed making it.

  • For Fun: Upload your face picture and see what kind of butterfly you are.



๐ŸŒป About:

  • Develop by Duc Haba (human) and GenAI partners (2024).

    • AI Codey (for help in coding)
    • AI GPT-4o (for help in coding)
    • AI Copilot (for help in coding)
  • Python Jupyter Notebook on Google Colab Pro.

    • Python 3.10
    • 8 CPU Cores (Intel Xeon)
    • 60 GB RAM
    • 1 GPU (Tesla T4)
    • 15 GB GPU RAM
    • 254 GB Disk Space
  • Primary Lib:

    • Fastai (2.7.17)
  • Standard Lib:

    • PyTorch
    • Gradio
    • PIL
    • Matplotlib
    • Numpy
    • Pandas
  • Dataset (labled butterfly images)

    • Kaggle website
    • The University of Florida's McGuire Center for Lepidoptera and Biodiversity (United States)
  • Deployment Model and Hardware:

    • Butterfly CNN model (inference engine)
    • 2 CPU Cores (Intel Xeon)
    • 16 GB RAM
    • No GPU
    • 16 GB Disk Space
    • Virtual container (for scaleability in server-cluster)
    • No Data and no other ML or LLM
    • Own 100% Intellectual Property

๐Ÿค” Accuracy and Benchmark

Task: Indentify 75 type of butterfly species from user taking photo with their iPhone.

  • 94.1% Accurate: This Butterfly CNN Image Classification developed by Duc Haba and GenAI friends (Deep Learning, CNN)

  • Average 87.5% Accurate: Lepidopterist (human)

  • Less than 50% Accurate: Generative AI, like Genini or Claude 3.5 (AI)

(NOTE: Lepidopterist and GenAI estimate are from online sources and GenAI.)


๐Ÿฆ‹ KPIs (Key Performance Indicator by Client)

  1. AI-Powered Identification: The app leverages an advanced CNN model to achieve identification accuracy on par with or surpassing that of expert lepidopterists. It quickly and precisely recognizes butterfly species from user-uploaded images, making it an invaluable tool for butterfly enthusiasts, citizen scientists, and researchers.
  • Complied. Detail on seperate document.
  1. Accessible API for Integration: We'll expose an API to integrate the AI with mobile and web apps. It will encourage open-source developers to build hooks into existing or new apps.
  • Complied. Detail on seperate document.
  1. Universal Access: The Butterfly app is for everyone, from citizens to experts. We want to create a community that cares about conservation.
  • Complied. Detail on seperate document.
  1. Shared Database for Research: Our solution includes a shared database that will hold all collected data. It will be a valuable resource for researchers studying butterfly populations, their distribution, and habitat changes. The database will consolidate real-world data to support scientific research and comprehensive conservation planning.
  • Complied. Detail on seperate document.
  1. Budget and Schedule: Withheld.
  • Complied ...mostly :-)

๐Ÿค– The First Law of AI Collaboration:


๐ŸŒŸ "AI Solution Architect" Course by ELVTR

Welcome to the fascinating world of AI and Convolutional Neural Network (CNN) Image Classification. This CNN model is a part of one of three hands-on application. In our journey together, we will explore the AI Solution Architect course, meticulously crafted by ELVTR in collaboration with Duc Haba. This course is intended to serve as your gateway into the dynamic and constantly evolving field of AI Solution Architect, providing you with a comprehensive understanding of its complexities and applications.

An AI Solution Architect (AISA) is a mastermind who possesses a deep understanding of the complex technicalities of AI and knows how to creatively integrate them into real-world solutions. They bridge the gap between theoretical AI models and practical, effective applications. AISA works as a strategist to design AI systems that align with business objectives and technical requirements. They delve into algorithms, data structures, and computational theories to translate them into tangible, impactful AI solutions that have the potential to revolutionize industries.

๐ŸŽ Sign up for the course today, and I will see you in class.

  • An article about the Butterfly CNN Image Classification will be coming soon.

๐Ÿ™ˆ Legal:

  • The intent is to share with Duc's friends and students in the AI Solution Architect course by ELVTR, but for those with nefarious intent, this Butterfly CNN Image Classification is governed by the GNU 3.0 License: https://www.gnu.org/licenses/gpl-3.0.en.html
  • Author: Copyright (C), 2024 Duc Haba