{"id":20885747,"url":"https://github.com/nripstein/what-bird-is-that","last_synced_at":"2025-05-12T19:31:30.422Z","repository":{"id":176529705,"uuid":"657436052","full_name":"nripstein/What-Bird-is-That","owner":"nripstein","description":"Computer vision website which recognizes and provides information about birds in user-uploaded photos.","archived":false,"fork":false,"pushed_at":"2023-12-05T19:57:13.000Z","size":91944,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2023-12-05T20:41:06.503Z","etag":null,"topics":["bird-species-classification","birding","computer-vision","image-classification","tensorflow"],"latest_commit_sha":null,"homepage":"https://what-bird-is-that.streamlit.app/","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nripstein.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-06-23T04:04:53.000Z","updated_at":"2023-10-18T17:43:11.000Z","dependencies_parsed_at":"2023-12-05T20:48:36.242Z","dependency_job_id":null,"html_url":"https://github.com/nripstein/What-Bird-is-That","commit_stats":null,"previous_names":["nripstein/what-bird-is-that"],"tags_count":1,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nripstein%2FWhat-Bird-is-That","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nripstein%2FWhat-Bird-is-That/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nripstein%2FWhat-Bird-is-That/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nripstein%2FWhat-Bird-is-That/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nripstein","download_url":"https://codeload.github.com/nripstein/What-Bird-is-That/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225148852,"owners_count":17428430,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bird-species-classification","birding","computer-vision","image-classification","tensorflow"],"created_at":"2024-11-18T08:14:33.519Z","updated_at":"2024-11-18T08:14:34.238Z","avatar_url":"https://github.com/nripstein.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# What Bird is That? 🦜 📸  \n# [Try the website at this link](https://what-bird-is-that.streamlit.app/) \n\n\n# Sample Usage\n\nhttps://github.com/nripstein/What-Bird-is-That/assets/98430636/d81f35ee-5861-441e-92ea-70b1de88bbda\n\n# Summary\nThis project aims to classify bird species using deep learning techniques. It can identify over 500 species of bird with 97+% accuracy.\n                The Bird Classifier leverages feature extraction and fine-tuning of the \u003ca href=\"https://arxiv.org/pdf/1905.11946.pdf\"\u003eEfficientNetB4\u003c/a\u003e model, \n                pre-trained on the \u003ca href=\"https://www.image-net.org/\"\u003eImageNet dataset\u003c/a\u003e, to accurately identify and provide information about various bird species.\n              \u003c/p\u003e\n\n# Deep learning model design\n\n1.  **Data augmentation:** Data augmentation is a powerful technique employed to increase the diversity and variability of the training dataset. The augmentation techniques employed include random horizontal flipping, random height and width shifting, random zooming, random rotation, and random contrast adjustment. By randomly applying these operations to each image during training, the model becomes more resilient to variations in bird pose, lighting conditions, and other factors. This augmentation process enhances the model's ability to generalize well and accurately classify bird species under different circumstances.\n2.  **Feature extraction with EfficientNet**: Transfer learning is employed to leverage the knowledge gained from the extensive training on the large-scale ImageNet dataset. The EfficientNet architecture, renowned for its excellent performance and low training time in image classification tasks, serves as the backbone of the model.  Feature extraction uses the backbone model architecture and weights, but adds a few layers which are trained on the bird image dataset.\n    \n3.  **Fine-tuning the model**: After training the new layers during feature extraction, the weights of the last 10 layers of the EfficientNet model are unfrozen and trained on the bird images for an additional 5 epochs (with a reduced learning rate). This keeps most of learned features within those layers the same, but slightly adjusts them to be better at classifying birds specifically.\n\n# Performance on unseen test data:\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eAccuracy\u003c/td\u003e\n    \u003ctd\u003e97.83%\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003ePrecision\u003c/td\u003e\n    \u003ctd\u003e98.19%\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eRecall\u003c/td\u003e\n    \u003ctd\u003e97.82%\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eF1 Score\u003c/td\u003e\n    \u003ctd\u003e97.79%\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\n\n\n\n# Streamlit Website\n\nTo provide a user-friendly interface for bird classification, I developed a Streamlit web application. Users can easily upload their bird photos and obtain predictions from the trained Bird Classifier model.  The website presents a bar plot of the probability of the top 3 species (with their labels serving as Wikipedia links). After identifying the top prediction the website presents a photo of the bird from the test data set, and provides details about the recognized species (from the Wikipedia API).\n\n### Example of Post-Classification Description\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/nripstein/What-Bird-is-That/assets/98430636/eadecb26-e345-472f-87e3-975d8f7bae49\" alt=\"classified bird demo\" style=\"width: 75%;\"\u003e\n\u003c/div\u003e\n\n\n# Data\nThe bird [dataset](https://www.kaggle.com/datasets/gpiosenka/100-bird-species) used in this project comprises a wide range of bird species, offering a comprehensive coverage of avian biodiversity. It includes 525 different species, enabling the model to accurately identify and classify a diverse range of birds.\n\n### Sample images from data set\n\n\u003cdiv align=\"center\"\u003e\n\n| ![scarlet macaw](https://github.com/nripstein/What-Bird-is-That/assets/98430636/1b852732-b90f-4003-8ad2-aa0a101bfcce) | ![bald eagle](https://github.com/nripstein/What-Bird-is-That/assets/98430636/7d78b96d-4819-416c-ae54-206e1773b930) | ![blue dacnis](https://github.com/nripstein/What-Bird-is-That/assets/98430636/2c1742a1-b135-4cf1-a0d3-270bdca57750) |\n|:---:|:---:|:---:|\n| Scarlet Macaw | Bald Eagle | Blue Dacnis |\n\n\u003c/div\u003e\n\n\u003c!---\n\n\n\n# This project is an ongoing work in progress\n\n# todo:\n- [X] Deploy streamlit app\n- [X] Make links to the wikipedia page of the top 3 predicted classes\n- [ ] Finish training correct model\n- [ ] Add model training notebook to repo\n- [ ] Add video demonstration to repo\n- [ ] Add accuracy metric to app\n- [ ] Add github logo with link to my github to app\n\n# future plans\n- [ ] make script for scraping other types of birds so it can classify more (no white swan or flamingo included in dataset)\n- [ ] Ideally scrape habitat location images from wikipedia (seems very hard after a few hours of trying because there's no consistent naming convention)\n- [ ] if length of wikipedia summary section is too short, use the description [Wood Duck is good example of very short summary page and longer description](https://en.wikipedia.org/wiki/Wood_duck)\n\n\n# version 2:\n1. introduce autocrop option using YOLOv5 object detection\n\nAdd options for secondary models (like b0-b4)\n\n# ideas for better computer vision models:\n1. try data augmentation using tf.ImageDataGenerator instead of a sequential augmentation layer built into the model itself\n2. get equal number of images for each class using data augmentation\n\n---\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnripstein%2Fwhat-bird-is-that","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnripstein%2Fwhat-bird-is-that","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnripstein%2Fwhat-bird-is-that/lists"}