-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[번역] YOLOv5 #51
Open
yh00214
wants to merge
2
commits into
PyTorchKorea:master
Choose a base branch
from
yh00214:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[번역] YOLOv5 #51
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,9 +18,10 @@ demo-model-link: https://huggingface.co/spaces/pytorch/YOLOv5 | |
|
||
## Before You Start | ||
|
||
Start from a **Python>=3.8** environment with **PyTorch>=1.7** installed. To install PyTorch see [https://pytorch.org/get-started/locally/](https://pytorch.org/get-started/locally/). To install YOLOv5 dependencies: | ||
**Python>=3.8**과 **PyTorch>=1.7** 환경을 갖춘 상태에서 시작해주세요. PyTorch를 설치해야 한다면 [https://pytorch.org/get-started/locally/](https://pytorch.org/get-started/locally/) 를 참고하세요. YOLOv5 dependency를 설치하려면: | ||
|
||
```bash | ||
pip install -qr https://raw.githubusercontent.com/ultralytics/yolov5/master/requirements.txt # install dependencies | ||
pip install -qr https://raw.githubusercontent.com/ultralytics/yolov5/master/requirements.txt # 필요한 모듈 설치 | ||
``` | ||
|
||
|
||
|
@@ -29,9 +30,9 @@ pip install -qr https://raw.githubusercontent.com/ultralytics/yolov5/master/requ | |
<img width="800" alt="YOLOv5 Model Comparison" src="https://github.com/ultralytics/yolov5/releases/download/v1.0/model_comparison.png"> | ||
| ||
|
||
[YOLOv5](https://ultralytics.com/yolov5) 🚀 is a family of compound-scaled object detection models trained on the COCO dataset, and includes simple functionality for Test Time Augmentation (TTA), model ensembling, hyperparameter evolution, and export to ONNX, CoreML and TFLite. | ||
[YOLOv5](https://ultralytics.com/yolov5) 🚀는 compound-scaling을 사용하고 COCO dataset으로 학습한 Object detection 모델들 중 하나이며, Test Time Augmentation (TTA), 모델 앙상블(model ensembling), 하이퍼파라미터 평가(hyperparameter evolution), 그리고 ONNX, CoreML과 TFLite로 변환(export)을 간단하게 해주는 기능이 포함되어 있습니다. | ||
|
||
|Model |size<br><sup>(pixels) |mAP<sup>val<br>0.5:0.95 |mAP<sup>test<br>0.5:0.95 |mAP<sup>val<br>0.5 |Speed<br><sup>V100 (ms) | |params<br><sup>(M) |FLOPS<br><sup>640 (B) | ||
|모델 |크기<br><sup>(pixels) |mAP<sup>val<br>0.5:0.95 |mAP<sup>test<br>0.5:0.95 |mAP<sup>val<br>0.5 |속도<br><sup>V100 (ms) | |파라미터 수<br><sup>(M) |FLOPS<br><sup>640 (B) | ||
|--- |--- |--- |--- |--- |--- |---|--- |--- | ||
|[YOLOv5s6](https://github.com/ultralytics/yolov5/releases) |1280 |43.3 |43.3 |61.9 |**4.3** | |12.7 |17.4 | ||
|[YOLOv5m6](https://github.com/ultralytics/yolov5/releases) |1280 |50.5 |50.5 |68.7 |8.4 | |35.9 |52.4 | ||
|
@@ -40,51 +41,51 @@ pip install -qr https://raw.githubusercontent.com/ultralytics/yolov5/master/requ | |
|[YOLOv5x6](https://github.com/ultralytics/yolov5/releases) TTA |1280 |**55.0** |**55.0** |**72.0** |70.8 | |- |- | ||
|
||
<details> | ||
<summary>Table Notes (click to expand)</summary> | ||
<summary>표에 대한 설명 (확장하려면 클릭)</summary> | ||
|
||
* AP<sup>test</sup> denotes COCO [test-dev2017](http://cocodataset.org/#upload) server results, all other AP results denote val2017 accuracy. | ||
* AP values are for single-model single-scale unless otherwise noted. **Reproduce mAP** by `python test.py --data coco.yaml --img 640 --conf 0.001 --iou 0.65` | ||
* Speed<sub>GPU</sub> averaged over 5000 COCO val2017 images using a GCP [n1-standard-16](https://cloud.google.com/compute/docs/machine-types#n1_standard_machine_types) V100 instance, and includes FP16 inference, postprocessing and NMS. **Reproduce speed** by `python test.py --data coco.yaml --img 640 --conf 0.25 --iou 0.45` | ||
* All checkpoints are trained to 300 epochs with default settings and hyperparameters (no autoaugmentation). | ||
* Test Time Augmentation ([TTA](https://github.com/ultralytics/yolov5/issues/303)) includes reflection and scale augmentation. **Reproduce TTA** by `python test.py --data coco.yaml --img 1536 --iou 0.7 --augment` | ||
* AP<sup>test</sup> 는 COCO [test-dev2017](http://cocodataset.org/#upload) 서버에서 평가한 결과이고, 나머지 AP 결과들은 val2017 데이터셋에 대한 결과를 의미합니다. | ||
* 달리 명시되지 않은 한, AP 값들은 단일 모델, 단일 규모(scale)로부터 얻은 값입니다. **mAP 재현**은 `python test.py --data coco.yaml --img 640 --conf 0.001 --iou 0.65` 을 실행하면 가능합니다. | ||
* 속도<sub>GPU</sub>는 GCP의 [n1-standard-16](https://cloud.google.com/compute/docs/machine-types#n1_standard_machine_types) V100 인스턴스를 사용하여 총 5000장의 COCO val2017 이미지 각각에 대한 추론 속도를 평균 내어 구하였으며, FP16 추론과 후처리, NMS 시간이 포함되어 있습니다. **속도 재현**은 `python test.py --data coco.yaml --img 640 --conf 0.25 --iou 0.45` 을 실행하면 가능합니다. | ||
* 모든 체크포인트는 기본 세팅과 하이퍼파라미터(자동증강 없음)로 300 에폭까지 학습한 결과입니다. | ||
* Test Time Augmentation ([TTA](https://github.com/ultralytics/yolov5/issues/303)) 은 반사(reflection)와 규모(scale) 증강을 포함합니다. **TTA 재현**은 `python test.py --data coco.yaml --img 1536 --iou 0.7 --augment` 을 실행하면 가능합니다. | ||
|
||
</details> | ||
|
||
<p align="left"><img width="800" src="https://github.com/ultralytics/yolov5/releases/download/v1.0/model_plot.png"></p> | ||
|
||
<details> | ||
<summary>Figure Notes (click to expand)</summary> | ||
<summary>그림에 대한 설명 (확장하려면 클릭)</summary> | ||
|
||
* GPU Speed measures end-to-end time per image averaged over 5000 COCO val2017 images using a V100 GPU with batch size 32, and includes image preprocessing, PyTorch FP16 inference, postprocessing and NMS. | ||
* EfficientDet data from [google/automl](https://github.com/google/automl) at batch size 8. | ||
* **Reproduce** by `python test.py --task study --data coco.yaml --iou 0.7 --weights yolov5s6.pt yolov5m6.pt yolov5l6.pt yolov5x6.pt` | ||
* GPU 속도는 V100 GPU에서 배치 크기를 32로 설정한 환경에서 총 5000장의 COCO val2017 이미지 각각에 대한 end-to-end 연산 시간을 평균 내어 구하였으며, 속도 측정 구간은 이미지 전처리와 Pytorch FP16 추론, 후처리와 NMS 과정을 포함합니다. | ||
* EfficientDet 데이터는 [google/automl](https://github.com/google/automl) 의 배치 크기 8인 모델에 대한 데이터입니다. | ||
* **재현** 하려면 `python test.py --task study --data coco.yaml --iou 0.7 --weights yolov5s6.pt yolov5m6.pt yolov5l6.pt yolov5x6.pt` 을 실행하면 가능합니다. | ||
|
||
</details> | ||
|
||
## Load From PyTorch Hub | ||
|
||
|
||
This example loads a pretrained **YOLOv5s** model and passes an image for inference. YOLOv5 accepts **URL**, **Filename**, **PIL**, **OpenCV**, **Numpy** and **PyTorch** inputs, and returns detections in **torch**, **pandas**, and **JSON** output formats. See our [YOLOv5 PyTorch Hub Tutorial](https://github.com/ultralytics/yolov5/issues/36) for details. | ||
이 예제에서는 사전 훈련된(pretrained) **YOLOv5s** 모델을 불러와 이미지에 대해 추론을 진행합니다. YOLOv5s는 **URL**, **파일 이름**, **PIL**, **OpenCV**, **Numpy**와 **PyTorch** 형식의 입력을 받고, **torch**, **pandas**, **JSON** 출력 형태로 탐지 결과를 반환합니다. 자세한 정보는 [YOLOv5 파이토치 허브 튜토리얼](https://github.com/ultralytics/yolov5/issues/36) 을 참고하세요. | ||
|
||
|
||
```python | ||
import torch | ||
|
||
# Model | ||
# 모델 | ||
model = torch.hub.load('ultralytics/yolov5', 'yolov5s', pretrained=True) | ||
|
||
# Images | ||
# 이미지 | ||
imgs = ['https://ultralytics.com/images/zidane.jpg'] # batch of images | ||
|
||
# Inference | ||
# 추론 | ||
results = model(imgs) | ||
|
||
# Results | ||
# 결과 | ||
results.print() | ||
results.save() # or .show() | ||
results.save() # 혹은 .show() | ||
|
||
results.xyxy[0] # img1 predictions (tensor) | ||
results.pandas().xyxy[0] # img1 predictions (pandas) | ||
results.xyxy[0] # img1에 대한 예측 (tensor) | ||
results.pandas().xyxy[0] # img1에 대한 예측 (pandas) | ||
# xmin ymin xmax ymax confidence class name | ||
# 0 749.50 43.50 1148.0 704.5 0.874023 0 person | ||
# 1 433.50 433.50 517.5 714.5 0.687988 27 tie | ||
|
@@ -101,7 +102,7 @@ results.pandas().xyxy[0] # img1 predictions (pandas) | |
## Contact | ||
|
||
|
||
**Issues should be raised directly in https://github.com/ultralytics/yolov5.** For business inquiries or professional support requests please visit [https://ultralytics.com](https://ultralytics.com) or email Glenn Jocher at [[email protected]](mailto:[email protected]). | ||
**이슈가 생기면 https://github.com/ultralytics/yolov5 에 직접 알려주세요.** 비즈니스 상의 문의나 전문적인 지원 요청은 [https://ultralytics.com](https://ultralytics.com) 을 방문하거나 Glenn Jocher의 이메일인 [[email protected]](mailto:[email protected]) 으로 영문으로 연락 주세요. | ||
|
||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
YOLOv5 dependency를 설치하려면 아래 명령어를 수행해주세요:
와 같이 말을 맺는 것은 어떤지 의견남겨봅니다!