--- title: Cat Breed Classifier emoji: 🐱 colorFrom: green colorTo: red sdk: gradio sdk_version: 3.16.1 app_file: app.py pinned: false license: openrail --- # \[EN\] Cat Breed Classifier This is an app that can classify the breed of a cat based on a photo. It uses a EfficientNetB0 ImageNet model finetuned on images of cats of various breeds. The model is able to recognize 18 breeds. See list [here](https://github.com/DenkingOfficial/cat_breed_classifier/tree/main/models). ## Requirements - Python 3.8 or higher - Gradio 3.15.0 - Tensorflow 2.10 - Numpy 1.23.3 - Requests 2.25.1 - Pillow 9.0.1 - FastApi 0.88.0 - Uvicorn 0.20.0 or higher - Smartcrop.py ## How to use 1. Clone this repository using `git clone https://github.com/DenkingOfficial/cat_breed_classifier.git` 2. Enter the cloned directory `cd cat_breed_classifier` 3. Install requirements by running `pip install -r requirements.txt` 4. Download a model from [here](https://www.dropbox.com/s/jqzwew182acdohn/cats_18_EfficientNetB0.h5) and place it into `models` folder 5. Run app using `uvicorn app:app` ## Demonstration ![App demonstration](https://user-images.githubusercontent.com/38957619/212042151-8cded892-4153-48d2-b98b-7430e0149bba.gif) ## Authors This app was developed by students of Ural Federal University (UrFU): - Shershnev Andrey, RIM-120907 - Model Training, App Development - Ivanov Sergey, RIM-120906 - API Development, Dataset collection - Shalaeva Irina, RIM-120906 - UI Styling, Dataset collection - Ilyin Semen, RIM-120907 - App Development, Dataset collection --- # \[RU\] ΠšΠ»Π°ΡΡΠΈΡ„ΠΈΠΊΠ°Ρ‚ΠΎΡ€ ΠΏΠΎΡ€ΠΎΠ΄ кошСк Π­Ρ‚ΠΎ Π²Π΅Π±-ΠΏΡ€ΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅, ΠΊΠΎΡ‚ΠΎΡ€ΠΎΠ΅ позволяСт ΠΎΠΏΡ€Π΅Π΄Π΅Π»ΡΡ‚ΡŒ ΠΏΠΎΡ€ΠΎΠ΄Ρƒ кошки ΠΏΠΎ Ρ„ΠΎΡ‚ΠΎΠ³Ρ€Π°Ρ„ΠΈΠΈ. Оно ΠΈΡΠΏΠΎΠ»ΡŒΠ·ΡƒΠ΅Ρ‚ модСль EfficientNetB0 ImageNet Ρ‚ΠΎΠ½ΠΊΠΎ Π½Π°ΡΡ‚Ρ€ΠΎΠ΅Π½Π½ΡƒΡŽ Π½Π° изобраТСниях кошСк Ρ€Π°Π·Π½Ρ‹Ρ… ΠΏΠΎΡ€ΠΎΠ΄. Данная модСль позволяСт ΠΎΠΏΡ€Π΅Π΄Π΅Π»ΡΡ‚ΡŒ 18 ΠΏΠΎΡ€ΠΎΠ΄. ΠŸΠΎΡΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ список ΠΌΠΎΠΆΠ½ΠΎ [здСсь](https://github.com/DenkingOfficial/cat_breed_classifier/tree/main/models). ## Зависимости - Python 3.8 ΠΈΠ»ΠΈ Π½ΠΎΠ²Π΅Π΅ - Gradio 3.15.0 - Tensorflow 2.10 - Numpy 1.23.3 - Requests 2.25.1 - Pillow 9.0.1 - FastApi 0.88.0 - Uvicorn 0.20.0 ΠΈΠ»ΠΈ Π½ΠΎΠ²Π΅Π΅ - Smartcrop.py ## Как ΠΈΡΠΏΠΎΠ»ΡŒΠ·ΠΎΠ²Π°Ρ‚ΡŒ 1. Π—Π°Π³Ρ€ΡƒΠ·ΠΈΡ‚ΡŒ Π΄Π°Π½Π½Ρ‹ΠΉ Ρ€Π΅ΠΏΠΎΠ·ΠΈΡ‚ΠΎΡ€ΠΈΠΉ ΠΈΡΠΏΠΎΠ»ΡŒΠ·ΡƒΡ ΠΊΠΎΠΌΠ°Π½Π΄Ρƒ `git clone https://github.com/DenkingOfficial/cat_breed_classifier.git` 2. ΠŸΠ΅Ρ€Π΅ΠΉΡ‚ΠΈ Π² Π΄ΠΈΡ€Π΅ΠΊΡ‚ΠΎΡ€ΠΈΡŽ рСпозитория `cd cat_breed_classifier` 3. Π£ΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ зависимости ΠΈΡΠΏΠΎΠ»ΡŒΠ·ΡƒΡ ΠΊΠΎΠΌΠ°Π½Π΄Ρƒ `pip install -r requirements.txt` 4. Π‘ΠΊΠ°Ρ‡Π°Ρ‚ΡŒ модСль [ΠΎΡ‚ΡΡŽΠ΄Π°](https://www.dropbox.com/s/jqzwew182acdohn/cats_18_EfficientNetB0.h5) ΠΈ ΡΠΊΠΎΠΏΠΈΡ€ΠΎΠ²Π°Ρ‚ΡŒ Π΅Π΅ Π² ΠΏΠ°ΠΏΠΊΡƒ `models` 5. Π—Π°ΠΏΡƒΡΡ‚ΠΈΡ‚ΡŒ ΠΏΡ€ΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅ ΠΈΡΠΏΠΎΠ»ΡŒΠ·ΡƒΡ ΠΊΠΎΠΌΠ°Π½Π΄Ρƒ `uvicorn app:app` ## Авторы Π­Ρ‚ΠΎ ΠΏΡ€ΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅ Π±Ρ‹Π»ΠΎ Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚Π°Π½ΠΎ студСнтами Π£Ρ€Π°Π»ΡŒΡΠΊΠΎΠ³ΠΎ Π€Π΅Π΄Π΅Ρ€Π°Π»ΡŒΠ½ΠΎΠ³ΠΎ унивСрситСта (Π£Ρ€Π€Π£): - Π¨Π΅Ρ€ΡˆΠ½Π΅Π² АндрСй, РИМ-120907 - Ρ‚Ρ€Π΅Π½ΠΈΡ€ΠΎΠ²ΠΊΠ° ΠΌΠΎΠ΄Π΅Π»ΠΈ, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° прилоТСния - Иванов Π‘Π΅Ρ€Π³Π΅ΠΉ, РИМ-120906 - Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° API, сбор датасСта - Π¨Π°Π»Π°Π΅Π²Π° Π˜Ρ€ΠΈΠ½Π°, РИМ-120906 - стилизация интСрфСйса, сбор датасСта - Ильин Π‘Π΅ΠΌΠ΅Π½, РИМ-120907 - Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° прилоТСния, сбор датасСта