|
|
--- |
|
|
library_name: transformers |
|
|
tags: |
|
|
- transformers |
|
|
- pipeline |
|
|
- vision |
|
|
- image-classification |
|
|
- vit |
|
|
- imagenet-1k |
|
|
license: apache-2.0 |
|
|
datasets: |
|
|
- ILSVRC/imagenet-1k |
|
|
base_model: |
|
|
- google/vit-base-patch16-224 |
|
|
pipeline_tag: image-classification |
|
|
--- |
|
|
|
|
|
# Model Card for tmp-pl-image-classification |
|
|
|
|
|
์ด ์ ์ฅ์๋ ๐ค Transformers์ `pipeline()` ๋์์ ์ดํดํ๊ณ ์ฐ์ตํ๊ธฐ ์ํ **ํ์ต์ฉ(pipeline practice) ๋ชจ๋ธ repo** ์
๋๋ค. |
|
|
๋ชจ๋ธ ๊ฐ์ค์น๋ ์๋ณธ ๋ชจ๋ธ **`google/vit-base-patch16-224`** ์ ๊ทธ๋๋ก ์ฌ์ฉํ๋ฉฐ, ์ถ๊ฐ์ ์ธ fine-tuning์ ์ํํ์ง ์์์ต๋๋ค. |
|
|
|
|
|
--- |
|
|
|
|
|
## Model Details |
|
|
|
|
|
### Model Description |
|
|
|
|
|
<!-- Provide a longer summary of what this model is. --> |
|
|
๋ณธ ๋ชจ๋ธ์ **Vision Transformer(ViT)** ๊ธฐ๋ฐ ์ด๋ฏธ์ง ๋ถ๋ฅ ๋ชจ๋ธ์ `pipeline("image-classification")` ํํ๋ก |
|
|
Hub์ ์
๋ก๋ํ๊ณ ๋ค์ ๋ถ๋ฌ์ค๋ ์ ์ฒด ํ๋ฆ์ ์ค์ตํ๊ธฐ ์ํด ๊ตฌ์ฑ๋จ. |
|
|
|
|
|
|
|
|
- **Developed by:** Google Research (์๋ณธ๋ชจ๋ธ) |
|
|
- **Shared by [optional]:** dsaint31 |
|
|
- **Model type:** Image Classification (Vision Transformer) |
|
|
- **Language(s) (NLP):** ํด๋น ์์ (์ด๋ฏธ์ง ์
๋ ฅ) |
|
|
- **License:** Apache-2.0 |
|
|
- **Finetuned from model [optional]:** google/vit-base-patch16-224 (๊ฐ์ค์น ๋ณ๊ฒฝ ์์. fine-tuning ๋ฏธ์ํ) |
|
|
|
|
|
### Model Sources [optional] |
|
|
|
|
|
<!-- Provide the basic links for the model. --> |
|
|
|
|
|
- **Baee model Repository:** [https://huggingface.co/google/vit-base-patch16-224](https://huggingface.co/google/vit-base-patch16-224) |
|
|
- **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) |
|
|
- **Demo [optional]:** None |
|
|
|
|
|
## Uses |
|
|
|
|
|
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. --> |
|
|
|
|
|
|
|
|
### Direct Use |
|
|
|
|
|
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. --> |
|
|
|
|
|
- `pipeline("image-classification", model=...)` ์ฌ์ฉ๋ฒ ์ค์ต |
|
|
- Hugging Face Hub์ pipeline ํํ๋ก ๋ชจ๋ธ์ ์
๋ก๋ / ๋ค์ด๋ก๋ํ๋ ํ๋ฆ ์ดํด |
|
|
- Vision ๋ชจ๋ธ๊ณผ pipeline์ ๊ด๊ณ ํ์ต |
|
|
|
|
|
### Downstream Use [optional] |
|
|
|
|
|
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app --> |
|
|
|
|
|
- ๋ณธ repo ์์ฒด๋ downstream task๋ฅผ ์ํ fine-tuning์ ๋ชฉ์ ์ผ๋ก ํ์ง ์์ต๋๋ค. |
|
|
- ํ์ต ๋๋ ์ฑ๋ฅ ๋น๊ต ๋ชฉ์ ์ด๋ผ๋ฉด **์๋ณธ ๋ชจ๋ธ repo**๋ฅผ ์ง์ ์ฌ์ฉํ๋ ๊ฒ์ด ์ ์ ํฉ๋๋ค. |
|
|
|
|
|
### Out-of-Scope Use |
|
|
|
|
|
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. --> |
|
|
|
|
|
- ๋ชจ๋ธ ์ฑ๋ฅ ํ๊ฐ ๋๋ ๋ฒค์น๋งํฌ |
|
|
- ์ค์ ์๋น์ค ํ๊ฒฝ์์์ ๋ชจ๋ธ ๋ฐฐํฌ |
|
|
- ํน์ ๋๋ฉ์ธ(์๋ฃ, ์ฐ์
์์ ๋ฑ)์ ๋ํ ์ ๋ขฐ์ฑ ์๋ ์ถ๋ก |
|
|
|
|
|
## Bias, Risks, and Limitations |
|
|
|
|
|
<!-- This section is meant to convey both technical and sociotechnical limitations. --> |
|
|
|
|
|
- ๋ณธ ๋ชจ๋ธ์ ImageNet ๊ธฐ๋ฐ ๋ฐ์ดํฐ๋ก ํ์ต๋ ์ผ๋ฐ ๋ชฉ์ ์ด๋ฏธ์ง ๋ถ๋ฅ ๋ชจ๋ธ์ ํน์ฑ์ ๊ทธ๋๋ก ๊ฐ์ง๋๋ค. |
|
|
- ํน์ ๊ฐ์ฒด, ๋ฌธํ์ ๋งฅ๋ฝ, ์ ๋ฌธ ๋๋ฉ์ธ์ ๋ํ ๋ถ๋ฅ ์ฑ๋ฅ์ ๋ณด์ฅ๋์ง ์์ต๋๋ค. |
|
|
- ๋ณธ repo๋ **์ฐ์ต์ฉ pipeline ์ ์ฅ์**์ด๋ฏ๋ก ๋ชจ๋ธ์ ์ฌํ์ ์ํฅ์ด๋ ํธํฅ ๋ถ์์ ๋ชฉ์ ์ผ๋ก ํ์ง ์์ต๋๋ค. |
|
|
|
|
|
### Recommendations |
|
|
|
|
|
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. --> |
|
|
|
|
|
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations. |
|
|
|
|
|
- ์ค์ ์ฌ์ฉ ๋ชฉ์ ์ด ์๋ ๊ฒฝ์ฐ, ์๋ณธ ๋ชจ๋ธ ์นด๋(`google/vit-base-patch16-224`)์ ์ ํ ์ฌํญ์ ๋ฐ๋์ ์ฐธ๊ณ ํ์ญ์์ค. |
|
|
- ์ด repo๋ ํ์ต ๋ฐ ์ค์ต ๋ชฉ์ ์ ํํด ์ฌ์ฉํ๊ธฐ๋ฅผ ๊ถ์ฅํฉ๋๋ค. |
|
|
|
|
|
## How to Get Started with the Model |
|
|
|
|
|
Use the code below to get started with the model. |
|
|
|
|
|
์๋ ์์ ๋ Hugging Face `pipeline`์ ์ด์ฉํด ๋ณธ ๋ชจ๋ธ์ ๋ก๋ํ๊ณ ์ด๋ฏธ์ง๋ฅผ ๋ถ๋ฅํ๋ ์ต์ ์์ ์
๋๋ค. |
|
|
|
|
|
```python |
|
|
from transformers import pipeline |
|
|
from PIL import Image |
|
|
import requests |
|
|
|
|
|
img_url = "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/cats.png" |
|
|
image = Image.open(requests.get(img_url, stream=True).raw) |
|
|
|
|
|
clf = pipeline( |
|
|
task="image-classification", |
|
|
model="dsaint31/tmp-pl-image-classification", |
|
|
) |
|
|
|
|
|
print(clf(image)) |
|
|
``` |
|
|
|
|
|
[More Information Needed] |
|
|
|
|
|
## Training Details |
|
|
|
|
|
### Training Data |
|
|
|
|
|
<!-- 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. --> |
|
|
|
|
|
* ๋ณธ repo์์๋ **์ถ๊ฐ ํ์ต์ ์ํํ์ง ์์์ต๋๋ค.** |
|
|
* ์๋ณธ ๋ชจ๋ธ์ ImageNet-21k๋ก ์ฌ์ ํ์ต(pretraining) ํ ImageNet-1k๋ก fine-tuning๋ ๋ชจ๋ธ์
๋๋ค. |
|
|
|
|
|
|
|
|
### Training Procedure |
|
|
|
|
|
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. --> |
|
|
|
|
|
#### Preprocessing [optional] |
|
|
|
|
|
* ์๋ณธ ViT ๋ชจ๋ธ์ ๊ธฐ๋ณธ ์ด๋ฏธ์ง ์ ์ฒ๋ฆฌ(Image Processor)๋ฅผ ๊ทธ๋๋ก ์ฌ์ฉํฉ๋๋ค. |
|
|
|
|
|
|
|
|
[More Information Needed] |
|
|
|
|
|
|
|
|
#### Training Hyperparameters |
|
|
|
|
|
- **Training regime:** ํด๋น ์์(ํ์ต ๋ฏธ์ํ) [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision --> |
|
|
|
|
|
|
|
|
|
|
|
#### Speeds, Sizes, Times [optional] |
|
|
|
|
|
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. --> |
|
|
|
|
|
|
|
|
## Evaluation |
|
|
|
|
|
<!-- This section describes the evaluation protocols and provides the results. --> |
|
|
|
|
|
### Testing Data, Factors & Metrics |
|
|
|
|
|
#### Testing Data |
|
|
|
|
|
<!-- This should link to a Dataset Card if possible. --> |
|
|
|
|
|
* ๋ณธ repo์์๋ ๋ณ๋์ ํ๊ฐ๋ฅผ ์ํํ์ง ์์์ต๋๋ค. |
|
|
* ์ฑ๋ฅ ์งํ๋ ์๋ณธ ๋ชจ๋ธ ์นด๋์ ํ๊ฐ ๊ฒฐ๊ณผ๋ฅผ ์ฐธ๊ณ ํ์ญ์์ค. |
|
|
|
|
|
[More Information Needed] |
|
|
|
|
|
#### Factors |
|
|
|
|
|
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. --> |
|
|
|
|
|
[More Information Needed] |
|
|
|
|
|
#### Metrics |
|
|
|
|
|
<!-- These are the evaluation metrics being used, ideally with a description of why. --> |
|
|
|
|
|
[More Information Needed] |
|
|
|
|
|
### Results |
|
|
|
|
|
[More Information Needed] |
|
|
|
|
|
#### Summary |
|
|
|
|
|
|
|
|
|
|
|
## Model Examination [optional] |
|
|
|
|
|
<!-- Relevant interpretability work for the model goes here --> |
|
|
|
|
|
[More Information Needed] |
|
|
|
|
|
## Environmental Impact |
|
|
|
|
|
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly --> |
|
|
|
|
|
๋ณธ repo์์๋ ํ์ต์ ์ํํ์ง ์์์ผ๋ฏ๋ก ์ถ๊ฐ์ ์ธ ํ๊ฒฝ์ ์ํฅ์ ์์ต๋๋ค. |
|
|
* ์๋ณธ ๋ชจ๋ธ ํ์ต์ ๋ํ ํ๊ฒฝ ์ํฅ์ base model ๋ฌธ์๋ฅผ ์ฐธ๊ณ ํ์ญ์์ค. |
|
|
|
|
|
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). |
|
|
|
|
|
- **Hardware Type:** [More Information Needed] |
|
|
- **Hours used:** [More Information Needed] |
|
|
- **Cloud Provider:** [More Information Needed] |
|
|
- **Compute Region:** [More Information Needed] |
|
|
- **Carbon Emitted:** [More Information Needed] |
|
|
|
|
|
## Technical Specifications [optional] |
|
|
|
|
|
### Model Architecture and Objective |
|
|
|
|
|
* Vision Transformer (ViT-Base, patch size 16, input resolution 224x224) |
|
|
* Objective: Image classification |
|
|
|
|
|
|
|
|
### Compute Infrastructure |
|
|
|
|
|
[More Information Needed] |
|
|
|
|
|
#### Hardware |
|
|
|
|
|
* ํด๋น์์ (ํ์ต ๋ฏธ์ํ) |
|
|
|
|
|
#### Software |
|
|
|
|
|
* Transformers |
|
|
* Pillow |
|
|
* PyTorch |
|
|
|
|
|
[More Information Needed] |
|
|
|
|
|
## Citation [optional] |
|
|
|
|
|
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. --> |
|
|
|
|
|
์๋ณธ ๋ชจ๋ธ ์ธ์ฉ ์ ์๋ ๋
ผ๋ฌธ์ ์ฐธ๊ณ ํ์ญ์์ค. |
|
|
|
|
|
**BibTeX:** |
|
|
|
|
|
```bibtex |
|
|
@article{dosovitskiy2020image, |
|
|
title={An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale}, |
|
|
author={Dosovitskiy, Alexey and others}, |
|
|
journal={arXiv preprint arXiv:2010.11929}, |
|
|
year={2020} |
|
|
} |
|
|
``` |
|
|
|
|
|
|
|
|
**APA:** |
|
|
|
|
|
[More Information Needed] |
|
|
|
|
|
## Glossary [optional] |
|
|
|
|
|
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. --> |
|
|
|
|
|
[More Information Needed] |
|
|
|
|
|
## More Information [optional] |
|
|
|
|
|
[More Information Needed] |
|
|
|
|
|
## Model Card Authors [optional] |
|
|
|
|
|
* dsaint31 (pipeline practice repository) |
|
|
|
|
|
|
|
|
## Model Card Contact |
|
|
|
|
|
* Hugging Face profile: [https://huggingface.co/dsaint31](https://huggingface.co/dsaint31) |