To install Requirements, use
$ pip3 install -r requirements.txt
The model is written and tested on cuda enviroment
Also, you have to download ckpt.pt
from below link and place into ./cat_id/flask_deep/
https://drive.google.com/file/d/1pcQRjzuhWySDOAnumXhN16y5s9jBK1Ni/view?usp=sharing
To launch demos, move to cat_id
directory and execute
$ python3 server.py
Then you can access to the demo by move to the address in your browser,
127.0.0.1:5000
This is the result page you will see after uploading a cat image.
.
|-- data_collect
| |-- crawling.py
| |-- rename.py
| |-- used.txt
| |-- url.txt
|-- cat_id
| |-- server.py
| |-- flask_deep
| |-- static
| | |-- css
| |-- templates
| | |-- result.html
| | |-- upload.html
| |-- init.py
| |-- Classifier.py
|-- Classifier.py
|-- resave.py
|-- test_model.py
|-- 대표이미지
|-- cropped_cat
|-- cropped_cat_2
Python file for crawling cat photos from Instagram accounts in url.txt
crawling.py gets photos from accounts in this texts
contains all accounts used for data collectin
The main Function that preprocess and train model
Utility script to reduce the size of the checkpoint file
Plot train/valid accuracy/loss and show some examples
Directory that include service frontend/backend
-
./server.py
Run the server -
./flask_deep/__init__.py
Script that execute server -
./flask_deep/templates/upload.html
html page for uploading page of 'cat_id' -
./flask_deep/templates/result.html
html page showing uploaded image and predicted images
Directory that include crawler & dataset
rename.py
Utility function to reorganize file structure
Trials to crop the cat face using the pretrained model of pycatfd
Trials to crop the cat face using the pretrained model of Haar Cascade Model in OpenCV
Trials to crop the cat face by handwork using labelImg. This folder is in the branch: crop-images.