fix README.md
Browse files
README.md
CHANGED
|
@@ -1,64 +1,77 @@
|
|
| 1 |
---
|
| 2 |
library_name: transformers
|
| 3 |
-
tags: []
|
| 4 |
---
|
| 5 |
|
| 6 |
-
# Model Card for
|
| 7 |
-
|
| 8 |
-
<!-- Provide a quick summary of what the model is/does. -->
|
| 9 |
|
|
|
|
|
|
|
| 10 |
|
|
|
|
| 11 |
|
| 12 |
## Model Details
|
| 13 |
|
| 14 |
### Model Description
|
| 15 |
|
| 16 |
<!-- Provide a longer summary of what this model is. -->
|
|
|
|
|
|
|
| 17 |
|
| 18 |
-
This is the model card of a ๐ค transformers model that has been pushed on the Hub. This model card has been automatically generated.
|
| 19 |
|
| 20 |
-
- **Developed by:**
|
| 21 |
-
- **
|
| 22 |
-
- **
|
| 23 |
-
- **
|
| 24 |
-
- **
|
| 25 |
-
- **
|
| 26 |
-
- **Finetuned from model [optional]:** [More Information Needed]
|
| 27 |
|
| 28 |
### Model Sources [optional]
|
| 29 |
|
| 30 |
<!-- Provide the basic links for the model. -->
|
| 31 |
|
| 32 |
-
- **Repository:** [
|
| 33 |
-
- **Paper [optional]:** [
|
| 34 |
-
- **Demo [optional]:**
|
| 35 |
|
| 36 |
## Uses
|
| 37 |
|
| 38 |
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
| 39 |
|
|
|
|
| 40 |
### Direct Use
|
| 41 |
|
| 42 |
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
|
| 43 |
|
| 44 |
-
|
|
|
|
|
|
|
| 45 |
|
| 46 |
### Downstream Use [optional]
|
| 47 |
|
| 48 |
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
|
| 49 |
|
| 50 |
-
|
|
|
|
| 51 |
|
| 52 |
### Out-of-Scope Use
|
| 53 |
|
| 54 |
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
| 55 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
[More Information Needed]
|
| 57 |
|
| 58 |
## Bias, Risks, and Limitations
|
| 59 |
|
| 60 |
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
| 61 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
[More Information Needed]
|
| 63 |
|
| 64 |
### Recommendations
|
|
@@ -67,10 +80,31 @@ This is the model card of a ๐ค transformers model that has been pushed on the
|
|
| 67 |
|
| 68 |
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
| 69 |
|
|
|
|
|
|
|
|
|
|
| 70 |
## How to Get Started with the Model
|
| 71 |
|
| 72 |
Use the code below to get started with the model.
|
| 73 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 74 |
[More Information Needed]
|
| 75 |
|
| 76 |
## Training Details
|
|
@@ -79,6 +113,9 @@ Use the code below to get started with the model.
|
|
| 79 |
|
| 80 |
<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
|
| 81 |
|
|
|
|
|
|
|
|
|
|
| 82 |
[More Information Needed]
|
| 83 |
|
| 84 |
### Training Procedure
|
|
@@ -87,12 +124,17 @@ Use the code below to get started with the model.
|
|
| 87 |
|
| 88 |
#### Preprocessing [optional]
|
| 89 |
|
|
|
|
|
|
|
|
|
|
| 90 |
[More Information Needed]
|
| 91 |
|
| 92 |
|
| 93 |
#### Training Hyperparameters
|
| 94 |
|
| 95 |
-
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
|
|
|
|
|
|
|
| 96 |
|
| 97 |
#### Speeds, Sizes, Times [optional]
|
| 98 |
|
|
@@ -110,6 +152,9 @@ Use the code below to get started with the model.
|
|
| 110 |
|
| 111 |
<!-- This should link to a Dataset Card if possible. -->
|
| 112 |
|
|
|
|
|
|
|
|
|
|
| 113 |
[More Information Needed]
|
| 114 |
|
| 115 |
#### Factors
|
|
@@ -142,6 +187,9 @@ Use the code below to get started with the model.
|
|
| 142 |
|
| 143 |
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
| 144 |
|
|
|
|
|
|
|
|
|
|
| 145 |
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
|
| 146 |
|
| 147 |
- **Hardware Type:** [More Information Needed]
|
|
@@ -154,6 +202,9 @@ Carbon emissions can be estimated using the [Machine Learning Impact calculator]
|
|
| 154 |
|
| 155 |
### Model Architecture and Objective
|
| 156 |
|
|
|
|
|
|
|
|
|
|
| 157 |
[More Information Needed]
|
| 158 |
|
| 159 |
### Compute Infrastructure
|
|
@@ -162,18 +213,34 @@ Carbon emissions can be estimated using the [Machine Learning Impact calculator]
|
|
| 162 |
|
| 163 |
#### Hardware
|
| 164 |
|
|
|
|
| 165 |
[More Information Needed]
|
| 166 |
|
| 167 |
#### Software
|
| 168 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 169 |
[More Information Needed]
|
| 170 |
|
| 171 |
## Citation [optional]
|
| 172 |
|
| 173 |
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
| 174 |
|
|
|
|
|
|
|
| 175 |
**BibTeX:**
|
| 176 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 177 |
[More Information Needed]
|
| 178 |
|
| 179 |
**APA:**
|
|
@@ -192,8 +259,12 @@ Carbon emissions can be estimated using the [Machine Learning Impact calculator]
|
|
| 192 |
|
| 193 |
## Model Card Authors [optional]
|
| 194 |
|
|
|
|
|
|
|
| 195 |
[More Information Needed]
|
| 196 |
|
| 197 |
## Model Card Contact
|
| 198 |
|
| 199 |
-
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
library_name: transformers
|
| 3 |
+
tags: [transformers, pipeline, vision, image-classification, vit, imagenet-1k]
|
| 4 |
---
|
| 5 |
|
| 6 |
+
# Model Card for tmp-pl-image-classification
|
|
|
|
|
|
|
| 7 |
|
| 8 |
+
์ด ์ ์ฅ์๋ ๐ค Transformers์ `pipeline()` ๋์์ ์ดํดํ๊ณ ์ฐ์ตํ๊ธฐ ์ํ **ํ์ต์ฉ(pipeline practice) ๋ชจ๋ธ repo**์
๋๋ค.
|
| 9 |
+
๋ชจ๋ธ ๊ฐ์ค์น๋ ์๋ณธ ๋ชจ๋ธ **`google/vit-base-patch16-224`**์ ๊ทธ๋๋ก ์ฌ์ฉํ๋ฉฐ, ์ถ๊ฐ์ ์ธ fine-tuning์ ์ํํ์ง ์์์ต๋๋ค.
|
| 10 |
|
| 11 |
+
---
|
| 12 |
|
| 13 |
## Model Details
|
| 14 |
|
| 15 |
### Model Description
|
| 16 |
|
| 17 |
<!-- Provide a longer summary of what this model is. -->
|
| 18 |
+
๋ณธ ๋ชจ๋ธ์ **Vision Transformer(ViT)** ๊ธฐ๋ฐ ์ด๋ฏธ์ง ๋ถ๋ฅ ๋ชจ๋ธ์ `pipeline("image-classification")` ํํ๋ก
|
| 19 |
+
Hub์ ์
๋ก๋ํ๊ณ ๋ค์ ๋ถ๋ฌ์ค๋ ์ ์ฒด ํ๋ฆ์ ์ค์ตํ๊ธฐ ์ํด ๊ตฌ์ฑ๋จ.
|
| 20 |
|
|
|
|
| 21 |
|
| 22 |
+
- **Developed by:** Google Research (์๋ณธ๋ชจ๋ธ)
|
| 23 |
+
- **Shared by [optional]:** dsaint31
|
| 24 |
+
- **Model type:** Image Classification (Vision Transformer)
|
| 25 |
+
- **Language(s) (NLP):** ํด๋น ์์ (์ด๋ฏธ์ง ์
๋ ฅ)
|
| 26 |
+
- **License:** Apache-2.0
|
| 27 |
+
- **Finetuned from model [optional]:** google/vit-base-patch16-224 (๊ฐ์ค์น ๋ณ๊ฒฝ ์์. fine-tuning ๋ฏธ์ํ)
|
|
|
|
| 28 |
|
| 29 |
### Model Sources [optional]
|
| 30 |
|
| 31 |
<!-- Provide the basic links for the model. -->
|
| 32 |
|
| 33 |
+
- **Baee model Repository:** [https://huggingface.co/google/vit-base-patch16-224](https://huggingface.co/google/vit-base-patch16-224)
|
| 34 |
+
- **Paper [optional]:** [Dosovitskiy et al., *An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale*, arXiv:2010.11929](https://arxiv.org/abs/2010.11929)
|
| 35 |
+
- **Demo [optional]:** None
|
| 36 |
|
| 37 |
## Uses
|
| 38 |
|
| 39 |
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
| 40 |
|
| 41 |
+
|
| 42 |
### Direct Use
|
| 43 |
|
| 44 |
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
|
| 45 |
|
| 46 |
+
- `pipeline("image-classification", model=...)` ์ฌ์ฉ๋ฒ ์ค์ต
|
| 47 |
+
- Hugging Face Hub์ pipeline ํํ๋ก ๋ชจ๋ธ์ ์
๋ก๋ / ๋ค์ด๋ก๋ํ๋ ํ๋ฆ ์ดํด
|
| 48 |
+
- Vision ๋ชจ๋ธ๊ณผ pipeline์ ๊ด๊ณ ํ์ต
|
| 49 |
|
| 50 |
### Downstream Use [optional]
|
| 51 |
|
| 52 |
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
|
| 53 |
|
| 54 |
+
- ๋ณธ repo ์์ฒด๋ downstream task๋ฅผ ์ํ fine-tuning์ ๋ชฉ์ ์ผ๋ก ํ์ง ์์ต๋๋ค.
|
| 55 |
+
- ํ์ต ๋๋ ์ฑ๋ฅ ๋น๊ต ๋ชฉ์ ์ด๋ผ๋ฉด **์๋ณธ ๋ชจ๋ธ repo**๋ฅผ ์ง์ ์ฌ์ฉํ๋ ๊ฒ์ด ์ ์ ํฉ๋๋ค.
|
| 56 |
|
| 57 |
### Out-of-Scope Use
|
| 58 |
|
| 59 |
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
| 60 |
|
| 61 |
+
- ๋ชจ๋ธ ์ฑ๋ฅ ํ๊ฐ ๋๋ ๋ฒค์น๋งํฌ
|
| 62 |
+
- ์ค์ ์๋น์ค ํ๊ฒฝ์์์ ๋ชจ๋ธ ๋ฐฐํฌ
|
| 63 |
+
- ํน์ ๋๋ฉ์ธ(์๋ฃ, ์ฐ์
์์ ๋ฑ)์ ๋ํ ์ ๋ขฐ์ฑ ์๋ ์ถ๋ก
|
| 64 |
+
|
| 65 |
[More Information Needed]
|
| 66 |
|
| 67 |
## Bias, Risks, and Limitations
|
| 68 |
|
| 69 |
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
| 70 |
|
| 71 |
+
- ๋ณธ ๋ชจ๋ธ์ ImageNet ๊ธฐ๋ฐ ๋ฐ์ดํฐ๋ก ํ์ต๋ ์ผ๋ฐ ๋ชฉ์ ์ด๋ฏธ์ง ๋ถ๋ฅ ๋ชจ๋ธ์ ํน์ฑ์ ๊ทธ๋๋ก ๊ฐ์ง๋๋ค.
|
| 72 |
+
- ํน์ ๊ฐ์ฒด, ๋ฌธํ์ ๋งฅ๋ฝ, ์ ๋ฌธ ๋๋ฉ์ธ์ ๋ํ ๋ถ๋ฅ ์ฑ๋ฅ์ ๋ณด์ฅ๋์ง ์์ต๋๋ค.
|
| 73 |
+
- ๋ณธ repo๋ **์ฐ์ต์ฉ pipeline ์ ์ฅ์**์ด๋ฏ๋ก ๋ชจ๋ธ์ ์ฌํ์ ์ํฅ์ด๋ ํธํฅ ๋ถ์์ ๋ชฉ์ ์ผ๋ก ํ์ง ์์ต๋๋ค.
|
| 74 |
+
|
| 75 |
[More Information Needed]
|
| 76 |
|
| 77 |
### Recommendations
|
|
|
|
| 80 |
|
| 81 |
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
| 82 |
|
| 83 |
+
- ์ค์ ์ฌ์ฉ ๋ชฉ์ ์ด ์๋ ๊ฒฝ์ฐ, ์๋ณธ ๋ชจ๋ธ ์นด๋(`google/vit-base-patch16-224`)์ ์ ํ ์ฌํญ์ ๋ฐ๋์ ์ฐธ๊ณ ํ์ญ์์ค.
|
| 84 |
+
- ์ด repo๋ ํ์ต ๋ฐ ์ค์ต ๋ชฉ์ ์ ํํด ์ฌ์ฉํ๊ธฐ๋ฅผ ๊ถ์ฅํฉ๋๋ค.
|
| 85 |
+
|
| 86 |
## How to Get Started with the Model
|
| 87 |
|
| 88 |
Use the code below to get started with the model.
|
| 89 |
|
| 90 |
+
์๋ ์์ ๋ Hugging Face `pipeline`์ ์ด์ฉํด ๋ณธ ๋ชจ๋ธ์ ๋ก๋ํ๊ณ ์ด๋ฏธ์ง๋ฅผ ๋ถ๋ฅํ๋ ์ต์ ์์ ์
๋๋ค.
|
| 91 |
+
|
| 92 |
+
```python
|
| 93 |
+
from transformers import pipeline
|
| 94 |
+
from PIL import Image
|
| 95 |
+
import requests
|
| 96 |
+
|
| 97 |
+
img_url = "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/cats.png"
|
| 98 |
+
image = Image.open(requests.get(img_url, stream=True).raw)
|
| 99 |
+
|
| 100 |
+
clf = pipeline(
|
| 101 |
+
task="image-classification",
|
| 102 |
+
model="dsaint31/tmp-pl-image-classification",
|
| 103 |
+
)
|
| 104 |
+
|
| 105 |
+
print(clf(image))
|
| 106 |
+
```
|
| 107 |
+
|
| 108 |
[More Information Needed]
|
| 109 |
|
| 110 |
## Training Details
|
|
|
|
| 113 |
|
| 114 |
<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
|
| 115 |
|
| 116 |
+
* ๋ณธ repo์์๋ **์ถ๊ฐ ํ์ต์ ์ํํ์ง ์์์ต๋๋ค.**
|
| 117 |
+
* ์๋ณธ ๋ชจ๋ธ์ ImageNet-21k๋ก ์ฌ์ ํ์ต(pretraining) ํ ImageNet-1k๋ก fine-tuning๋ ๋ชจ๋ธ์
๋๋ค.
|
| 118 |
+
|
| 119 |
[More Information Needed]
|
| 120 |
|
| 121 |
### Training Procedure
|
|
|
|
| 124 |
|
| 125 |
#### Preprocessing [optional]
|
| 126 |
|
| 127 |
+
* ์๋ณธ ViT ๋ชจ๋ธ์ ๊ธฐ๋ณธ ์ด๋ฏธ์ง ์ ์ฒ๋ฆฌ(Image Processor)๋ฅผ ๊ทธ๋๋ก ์ฌ์ฉํฉ๋๋ค.
|
| 128 |
+
|
| 129 |
+
|
| 130 |
[More Information Needed]
|
| 131 |
|
| 132 |
|
| 133 |
#### Training Hyperparameters
|
| 134 |
|
| 135 |
+
- **Training regime:** ํด๋น ์์(ํ์ต ๋ฏธ์ํ) [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
|
| 136 |
+
|
| 137 |
+
|
| 138 |
|
| 139 |
#### Speeds, Sizes, Times [optional]
|
| 140 |
|
|
|
|
| 152 |
|
| 153 |
<!-- This should link to a Dataset Card if possible. -->
|
| 154 |
|
| 155 |
+
* ๋ณธ repo์์๋ ๋ณ๋์ ํ๊ฐ๋ฅผ ์ํํ์ง ์์์ต๋๋ค.
|
| 156 |
+
* ์ฑ๋ฅ ์งํ๋ ์๋ณธ ๋ชจ๋ธ ์นด๋์ ํ๊ฐ ๊ฒฐ๊ณผ๋ฅผ ์ฐธ๊ณ ํ์ญ์์ค.
|
| 157 |
+
|
| 158 |
[More Information Needed]
|
| 159 |
|
| 160 |
#### Factors
|
|
|
|
| 187 |
|
| 188 |
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
| 189 |
|
| 190 |
+
๋ณธ repo์์๋ ํ์ต์ ์ํํ์ง ์์์ผ๋ฏ๋ก ์ถ๊ฐ์ ์ธ ํ๊ฒฝ์ ์ํฅ์ ์์ต๋๋ค.
|
| 191 |
+
* ์๋ณธ ๋ชจ๋ธ ํ์ต์ ๋ํ ํ๊ฒฝ ์ํฅ์ base model ๋ฌธ์๋ฅผ ์ฐธ๊ณ ํ์ญ์์ค.
|
| 192 |
+
|
| 193 |
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
|
| 194 |
|
| 195 |
- **Hardware Type:** [More Information Needed]
|
|
|
|
| 202 |
|
| 203 |
### Model Architecture and Objective
|
| 204 |
|
| 205 |
+
* Vision Transformer (ViT-Base, patch size 16, input resolution 224x224)
|
| 206 |
+
* Objective: Image classification
|
| 207 |
+
|
| 208 |
[More Information Needed]
|
| 209 |
|
| 210 |
### Compute Infrastructure
|
|
|
|
| 213 |
|
| 214 |
#### Hardware
|
| 215 |
|
| 216 |
+
* ํด๋น์์ (ํ์ต ๋ฏธ์ํ)
|
| 217 |
[More Information Needed]
|
| 218 |
|
| 219 |
#### Software
|
| 220 |
|
| 221 |
+
* Transformers
|
| 222 |
+
* Pillow
|
| 223 |
+
* PyTorch
|
| 224 |
+
|
| 225 |
[More Information Needed]
|
| 226 |
|
| 227 |
## Citation [optional]
|
| 228 |
|
| 229 |
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
| 230 |
|
| 231 |
+
์๋ณธ ๋ชจ๋ธ ์ธ์ฉ ์ ์๋ ๋
ผ๋ฌธ์ ์ฐธ๊ณ ํ์ญ์์ค.
|
| 232 |
+
|
| 233 |
**BibTeX:**
|
| 234 |
|
| 235 |
+
```bibtex
|
| 236 |
+
@article{dosovitskiy2020image,
|
| 237 |
+
title={An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale},
|
| 238 |
+
author={Dosovitskiy, Alexey and others},
|
| 239 |
+
journal={arXiv preprint arXiv:2010.11929},
|
| 240 |
+
year={2020}
|
| 241 |
+
}
|
| 242 |
+
```
|
| 243 |
+
|
| 244 |
[More Information Needed]
|
| 245 |
|
| 246 |
**APA:**
|
|
|
|
| 259 |
|
| 260 |
## Model Card Authors [optional]
|
| 261 |
|
| 262 |
+
* dsaint31 (pipeline practice repository)
|
| 263 |
+
|
| 264 |
[More Information Needed]
|
| 265 |
|
| 266 |
## Model Card Contact
|
| 267 |
|
| 268 |
+
* Hugging Face profile: [https://huggingface.co/dsaint31](https://huggingface.co/dsaint31)
|
| 269 |
+
|
| 270 |
+
[More Information Needed]
|