Spaces:
Runtime error
Runtime error
Thang DT
commited on
Commit
·
5c4b23e
1
Parent(s):
3e24f8f
Add bird classification files first time
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- .ipynb_checkpoints/Research-checkpoint.ipynb +6 -0
- .ipynb_checkpoints/Untitled-checkpoint.ipynb +6 -0
- .ipynb_checkpoints/app-checkpoint.ipynb +0 -0
- .ipynb_checkpoints/train-checkpoint.ipynb +0 -0
- Gold fish.jpg +0 -0
- Research.ipynb +0 -0
- app.ipynb +0 -0
- app.py +27 -0
- data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/001.jpg +0 -0
- data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/002.jpg +0 -0
- data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/003.jpg +0 -0
- data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/004.jpg +0 -0
- data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/005.jpg +0 -0
- data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/006.jpg +0 -0
- data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/007.jpg +0 -0
- data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/008.jpg +0 -0
- data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/009.jpg +0 -0
- data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/010.jpg +0 -0
- data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/011.jpg +0 -0
- data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/012.jpg +0 -0
- data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/013.jpg +0 -0
- data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/014.jpg +0 -0
- data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/015.jpg +0 -0
- data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/016.jpg +0 -0
- data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/017.jpg +0 -0
- data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/018.jpg +0 -0
- data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/019.jpg +0 -0
- data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/020.jpg +0 -0
- data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/021.jpg +0 -0
- data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/022.jpg +0 -0
- data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/023.jpg +0 -0
- data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/024.jpg +0 -0
- data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/025.jpg +0 -0
- data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/026.jpg +0 -0
- data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/027.jpg +0 -0
- data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/028.jpg +0 -0
- data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/029.jpg +0 -0
- data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/030.jpg +0 -0
- data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/031.jpg +0 -0
- data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/032.jpg +0 -0
- data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/033.jpg +0 -0
- data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/034.jpg +0 -0
- data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/035.jpg +0 -0
- data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/036.jpg +0 -0
- data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/037.jpg +0 -0
- data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/038.jpg +0 -0
- data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/039.jpg +0 -0
- data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/040.jpg +0 -0
- data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/041.jpg +0 -0
- data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/042.jpg +0 -0
.ipynb_checkpoints/Research-checkpoint.ipynb
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"cells": [],
|
| 3 |
+
"metadata": {},
|
| 4 |
+
"nbformat": 4,
|
| 5 |
+
"nbformat_minor": 5
|
| 6 |
+
}
|
.ipynb_checkpoints/Untitled-checkpoint.ipynb
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"cells": [],
|
| 3 |
+
"metadata": {},
|
| 4 |
+
"nbformat": 4,
|
| 5 |
+
"nbformat_minor": 5
|
| 6 |
+
}
|
.ipynb_checkpoints/app-checkpoint.ipynb
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
.ipynb_checkpoints/train-checkpoint.ipynb
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
Gold fish.jpg
ADDED
|
Research.ipynb
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
app.ipynb
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
app.py
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# AUTOGENERATED! DO NOT EDIT! File to edit: . (unless otherwise specified).
|
| 2 |
+
|
| 3 |
+
__all__ = ['learn', 'classify_image', 'categories', 'image', 'label', 'examples', 'intf']
|
| 4 |
+
|
| 5 |
+
# Cell
|
| 6 |
+
from fastai.vision.all import *
|
| 7 |
+
import gradio as gr
|
| 8 |
+
import timm
|
| 9 |
+
|
| 10 |
+
# Cell
|
| 11 |
+
learn = load_learner('model.pkl')
|
| 12 |
+
|
| 13 |
+
# Cell
|
| 14 |
+
categories = learn.dls.vocab
|
| 15 |
+
|
| 16 |
+
def classify_image(img):
|
| 17 |
+
pred,idx,probs = learn.predict(img)
|
| 18 |
+
return dict(zip(categories, map(float,probs)))
|
| 19 |
+
|
| 20 |
+
# Cell
|
| 21 |
+
image = gr.inputs.Image(shape=(192, 192))
|
| 22 |
+
label = gr.outputs.Label()
|
| 23 |
+
examples = ['Gold fish.jpg']
|
| 24 |
+
|
| 25 |
+
# Cell
|
| 26 |
+
intf = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples=examples)
|
| 27 |
+
intf.launch()
|
data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/001.jpg
ADDED
|
data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/002.jpg
ADDED
|
data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/003.jpg
ADDED
|
data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/004.jpg
ADDED
|
data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/005.jpg
ADDED
|
data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/006.jpg
ADDED
|
data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/007.jpg
ADDED
|
data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/008.jpg
ADDED
|
data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/009.jpg
ADDED
|
data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/010.jpg
ADDED
|
data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/011.jpg
ADDED
|
data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/012.jpg
ADDED
|
data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/013.jpg
ADDED
|
data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/014.jpg
ADDED
|
data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/015.jpg
ADDED
|
data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/016.jpg
ADDED
|
data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/017.jpg
ADDED
|
data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/018.jpg
ADDED
|
data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/019.jpg
ADDED
|
data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/020.jpg
ADDED
|
data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/021.jpg
ADDED
|
data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/022.jpg
ADDED
|
data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/023.jpg
ADDED
|
data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/024.jpg
ADDED
|
data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/025.jpg
ADDED
|
data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/026.jpg
ADDED
|
data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/027.jpg
ADDED
|
data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/028.jpg
ADDED
|
data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/029.jpg
ADDED
|
data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/030.jpg
ADDED
|
data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/031.jpg
ADDED
|
data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/032.jpg
ADDED
|
data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/033.jpg
ADDED
|
data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/034.jpg
ADDED
|
data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/035.jpg
ADDED
|
data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/036.jpg
ADDED
|
data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/037.jpg
ADDED
|
data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/038.jpg
ADDED
|
data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/039.jpg
ADDED
|
data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/040.jpg
ADDED
|
data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/041.jpg
ADDED
|
data/Bird_Speciees_Dataset/AMERICAN GOLDFINCH/042.jpg
ADDED
|