Commit
·
519a2bc
1
Parent(s):
0d18b5a
Initial model
Browse files- README.md +39 -3
- config.json +200 -0
- preprocessor_config.json +22 -0
- pytorch_model.bin +3 -0
README.md
CHANGED
|
@@ -1,3 +1,39 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Species Classification in Furry Art
|
| 2 |
+
|
| 3 |
+
This model was trained on ~16k images (filtered from ~40k).
|
| 4 |
+
I may train it on a larger dataset in the future.
|
| 5 |
+
|
| 6 |
+
The model is capable of classifying about 86 species,
|
| 7 |
+
including a few more common Pokemon, as well as some
|
| 8 |
+
mythological and fictional species. The results may
|
| 9 |
+
differ depending on the species, though the model is
|
| 10 |
+
quite good with common ones such as foxes and wolves.
|
| 11 |
+
|
| 12 |
+
## How to Use
|
| 13 |
+
**Example using Pipelines (recommended):**
|
| 14 |
+
```py
|
| 15 |
+
from transformers import pipeline
|
| 16 |
+
|
| 17 |
+
classify = pipeline('image-classification', model='ashduino101/furry-species-classification')
|
| 18 |
+
|
| 19 |
+
scores = classify('your-image.png')
|
| 20 |
+
# Do something with the scores
|
| 21 |
+
```
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
**Example using AutoModelForImageClassification:**
|
| 25 |
+
```py
|
| 26 |
+
import torch
|
| 27 |
+
from PIL import Image
|
| 28 |
+
from transformers import AutoImageProcessor, AutoModelForImageClassification
|
| 29 |
+
|
| 30 |
+
image_processor = AutoImageProcessor.from_pretrained('ashduino101/furry-species-classification')
|
| 31 |
+
inputs = image_processor(Image.open('your-image.png'), return_tensors='pt')
|
| 32 |
+
|
| 33 |
+
model = AutoModelForImageClassification.from_pretrained("ashduino101/furry-species-classification")
|
| 34 |
+
with torch.no_grad():
|
| 35 |
+
result = model(**inputs)
|
| 36 |
+
|
| 37 |
+
# Do something with the result
|
| 38 |
+
```
|
| 39 |
+
|
config.json
ADDED
|
@@ -0,0 +1,200 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "google/vit-base-patch16-224-in21k",
|
| 3 |
+
"architectures": [
|
| 4 |
+
"ViTForImageClassification"
|
| 5 |
+
],
|
| 6 |
+
"attention_probs_dropout_prob": 0.0,
|
| 7 |
+
"encoder_stride": 16,
|
| 8 |
+
"hidden_act": "gelu",
|
| 9 |
+
"hidden_dropout_prob": 0.0,
|
| 10 |
+
"hidden_size": 768,
|
| 11 |
+
"id2label": {
|
| 12 |
+
"0": "alien",
|
| 13 |
+
"1": "angel",
|
| 14 |
+
"10": "centaur",
|
| 15 |
+
"11": "chicken",
|
| 16 |
+
"12": "chipmunk",
|
| 17 |
+
"13": "coyote",
|
| 18 |
+
"14": "cyborg",
|
| 19 |
+
"15": "cyclops",
|
| 20 |
+
"16": "deer",
|
| 21 |
+
"17": "demon",
|
| 22 |
+
"18": "dinosaur",
|
| 23 |
+
"19": "dolphin",
|
| 24 |
+
"2": "antelope",
|
| 25 |
+
"20": "donkey",
|
| 26 |
+
"21": "dragon",
|
| 27 |
+
"22": "eevee",
|
| 28 |
+
"23": "elf",
|
| 29 |
+
"24": "fairy",
|
| 30 |
+
"25": "feline",
|
| 31 |
+
"26": "fish",
|
| 32 |
+
"27": "flareon",
|
| 33 |
+
"28": "fox",
|
| 34 |
+
"29": "frog",
|
| 35 |
+
"3": "ape",
|
| 36 |
+
"30": "gazelle",
|
| 37 |
+
"31": "ghost",
|
| 38 |
+
"32": "giraffe",
|
| 39 |
+
"33": "glaceon",
|
| 40 |
+
"34": "goat",
|
| 41 |
+
"35": "gryphon",
|
| 42 |
+
"36": "hamster",
|
| 43 |
+
"37": "hedgehog",
|
| 44 |
+
"38": "horse",
|
| 45 |
+
"39": "human",
|
| 46 |
+
"4": "badger",
|
| 47 |
+
"40": "husky",
|
| 48 |
+
"41": "hyena",
|
| 49 |
+
"42": "imp",
|
| 50 |
+
"43": "jackal",
|
| 51 |
+
"44": "jaguar",
|
| 52 |
+
"45": "jolteon",
|
| 53 |
+
"46": "kangaroo",
|
| 54 |
+
"47": "kobold",
|
| 55 |
+
"48": "lemur",
|
| 56 |
+
"49": "lion",
|
| 57 |
+
"5": "bat_pony",
|
| 58 |
+
"50": "lizard",
|
| 59 |
+
"51": "lucario",
|
| 60 |
+
"52": "meerkat",
|
| 61 |
+
"53": "mollusk",
|
| 62 |
+
"54": "monkey",
|
| 63 |
+
"55": "monster",
|
| 64 |
+
"56": "mouse",
|
| 65 |
+
"57": "otter",
|
| 66 |
+
"58": "pegasus",
|
| 67 |
+
"59": "pikachu",
|
| 68 |
+
"6": "bear",
|
| 69 |
+
"60": "pony",
|
| 70 |
+
"61": "rabbit",
|
| 71 |
+
"62": "raccoon",
|
| 72 |
+
"63": "rat",
|
| 73 |
+
"64": "reindeer",
|
| 74 |
+
"65": "renamon",
|
| 75 |
+
"66": "robot",
|
| 76 |
+
"67": "rodent",
|
| 77 |
+
"68": "satyr",
|
| 78 |
+
"69": "sergal",
|
| 79 |
+
"7": "bird",
|
| 80 |
+
"70": "shark",
|
| 81 |
+
"71": "sheep",
|
| 82 |
+
"72": "sheepdog",
|
| 83 |
+
"73": "skunk",
|
| 84 |
+
"74": "snake",
|
| 85 |
+
"75": "sylveon",
|
| 86 |
+
"76": "tiger",
|
| 87 |
+
"77": "troll",
|
| 88 |
+
"78": "turtle",
|
| 89 |
+
"79": "umbreon",
|
| 90 |
+
"8": "braixen",
|
| 91 |
+
"80": "unicorn",
|
| 92 |
+
"81": "vaporeon",
|
| 93 |
+
"82": "weasel",
|
| 94 |
+
"83": "werewolf",
|
| 95 |
+
"84": "wolf",
|
| 96 |
+
"85": "yoshi",
|
| 97 |
+
"9": "cattle"
|
| 98 |
+
},
|
| 99 |
+
"image_size": 224,
|
| 100 |
+
"initializer_range": 0.02,
|
| 101 |
+
"intermediate_size": 3072,
|
| 102 |
+
"label2id": {
|
| 103 |
+
"alien": "0",
|
| 104 |
+
"angel": "1",
|
| 105 |
+
"antelope": "2",
|
| 106 |
+
"ape": "3",
|
| 107 |
+
"badger": "4",
|
| 108 |
+
"bat_pony": "5",
|
| 109 |
+
"bear": "6",
|
| 110 |
+
"bird": "7",
|
| 111 |
+
"braixen": "8",
|
| 112 |
+
"cattle": "9",
|
| 113 |
+
"centaur": "10",
|
| 114 |
+
"chicken": "11",
|
| 115 |
+
"chipmunk": "12",
|
| 116 |
+
"coyote": "13",
|
| 117 |
+
"cyborg": "14",
|
| 118 |
+
"cyclops": "15",
|
| 119 |
+
"deer": "16",
|
| 120 |
+
"demon": "17",
|
| 121 |
+
"dinosaur": "18",
|
| 122 |
+
"dolphin": "19",
|
| 123 |
+
"donkey": "20",
|
| 124 |
+
"dragon": "21",
|
| 125 |
+
"eevee": "22",
|
| 126 |
+
"elf": "23",
|
| 127 |
+
"fairy": "24",
|
| 128 |
+
"feline": "25",
|
| 129 |
+
"fish": "26",
|
| 130 |
+
"flareon": "27",
|
| 131 |
+
"fox": "28",
|
| 132 |
+
"frog": "29",
|
| 133 |
+
"gazelle": "30",
|
| 134 |
+
"ghost": "31",
|
| 135 |
+
"giraffe": "32",
|
| 136 |
+
"glaceon": "33",
|
| 137 |
+
"goat": "34",
|
| 138 |
+
"gryphon": "35",
|
| 139 |
+
"hamster": "36",
|
| 140 |
+
"hedgehog": "37",
|
| 141 |
+
"horse": "38",
|
| 142 |
+
"human": "39",
|
| 143 |
+
"husky": "40",
|
| 144 |
+
"hyena": "41",
|
| 145 |
+
"imp": "42",
|
| 146 |
+
"jackal": "43",
|
| 147 |
+
"jaguar": "44",
|
| 148 |
+
"jolteon": "45",
|
| 149 |
+
"kangaroo": "46",
|
| 150 |
+
"kobold": "47",
|
| 151 |
+
"lemur": "48",
|
| 152 |
+
"lion": "49",
|
| 153 |
+
"lizard": "50",
|
| 154 |
+
"lucario": "51",
|
| 155 |
+
"meerkat": "52",
|
| 156 |
+
"mollusk": "53",
|
| 157 |
+
"monkey": "54",
|
| 158 |
+
"monster": "55",
|
| 159 |
+
"mouse": "56",
|
| 160 |
+
"otter": "57",
|
| 161 |
+
"pegasus": "58",
|
| 162 |
+
"pikachu": "59",
|
| 163 |
+
"pony": "60",
|
| 164 |
+
"rabbit": "61",
|
| 165 |
+
"raccoon": "62",
|
| 166 |
+
"rat": "63",
|
| 167 |
+
"reindeer": "64",
|
| 168 |
+
"renamon": "65",
|
| 169 |
+
"robot": "66",
|
| 170 |
+
"rodent": "67",
|
| 171 |
+
"satyr": "68",
|
| 172 |
+
"sergal": "69",
|
| 173 |
+
"shark": "70",
|
| 174 |
+
"sheep": "71",
|
| 175 |
+
"sheepdog": "72",
|
| 176 |
+
"skunk": "73",
|
| 177 |
+
"snake": "74",
|
| 178 |
+
"sylveon": "75",
|
| 179 |
+
"tiger": "76",
|
| 180 |
+
"troll": "77",
|
| 181 |
+
"turtle": "78",
|
| 182 |
+
"umbreon": "79",
|
| 183 |
+
"unicorn": "80",
|
| 184 |
+
"vaporeon": "81",
|
| 185 |
+
"weasel": "82",
|
| 186 |
+
"werewolf": "83",
|
| 187 |
+
"wolf": "84",
|
| 188 |
+
"yoshi": "85"
|
| 189 |
+
},
|
| 190 |
+
"layer_norm_eps": 1e-12,
|
| 191 |
+
"model_type": "vit",
|
| 192 |
+
"num_attention_heads": 12,
|
| 193 |
+
"num_channels": 3,
|
| 194 |
+
"num_hidden_layers": 12,
|
| 195 |
+
"patch_size": 16,
|
| 196 |
+
"problem_type": "single_label_classification",
|
| 197 |
+
"qkv_bias": true,
|
| 198 |
+
"torch_dtype": "float32",
|
| 199 |
+
"transformers_version": "4.28.1"
|
| 200 |
+
}
|
preprocessor_config.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"do_normalize": true,
|
| 3 |
+
"do_rescale": true,
|
| 4 |
+
"do_resize": true,
|
| 5 |
+
"image_mean": [
|
| 6 |
+
0.5,
|
| 7 |
+
0.5,
|
| 8 |
+
0.5
|
| 9 |
+
],
|
| 10 |
+
"image_processor_type": "ViTFeatureExtractor",
|
| 11 |
+
"image_std": [
|
| 12 |
+
0.5,
|
| 13 |
+
0.5,
|
| 14 |
+
0.5
|
| 15 |
+
],
|
| 16 |
+
"resample": 2,
|
| 17 |
+
"rescale_factor": 0.00392156862745098,
|
| 18 |
+
"size": {
|
| 19 |
+
"height": 224,
|
| 20 |
+
"width": 224
|
| 21 |
+
}
|
| 22 |
+
}
|
pytorch_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6bacc005304ba85b579c4643f4ac3c3413cdc7b01fc7fe74f76c7b1f9a42afd4
|
| 3 |
+
size 343524333
|