-
Notifications
You must be signed in to change notification settings - Fork 17
Test: nvidia_deeplearningexamples_ssd 번역 #1
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
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -22,7 +22,7 @@ demo-model-link: https://huggingface.co/spaces/pytorch/SSD | |||||||||
|
||||||||||
SSD300 모델은 "단일 심층 신경망을 사용하여 이미지에서 물체를 감지하는 방법"으로 설명 하는 [SSD: Single Shot MultiBox Detector](https://arxiv.org/abs/1512.02325) 논문을 기반으로 합니다. 입력 크기는 300x300으로 고정되어 있습니다. | ||||||||||
|
||||||||||
이 모델과 논문에 설명된 모델의 큰 차이점은 백본에 있습니다. 논문에서 사용한 VGG 모델은 더 이상 사용되지 않으며 ResNet-50 모델로 대체되었습니다. | ||||||||||
이 모델과 논문에 설명된 모델의 큰 차이점은 백본(backbone)에 있습니다. 논문에서 사용한 VGG 모델은 더 이상 사용되지 않으며 ResNet-50 모델로 대체되었습니다. | ||||||||||
|
||||||||||
[Speed/accuracy trade-offs for modern convolutional object detectors](https://arxiv.org/abs/1611.10012) 논문에서 , 백본에 대해 다음과 같은 개선이 이루어졌습니다.: | ||||||||||
|
||||||||||
|
@@ -39,28 +39,28 @@ Detector heads는 논문에서 언급된 것과 유사하지만, 각각의 컨 | |||||||||
|
||||||||||
### Example | ||||||||||
|
||||||||||
In the example below we will use the pretrained SSD model to detect objects in sample images and visualize the result. | ||||||||||
아래 예에서는 사전에 학습된 SSD 모델을 사용하여 샘플 이미지에서 객체를 탐지하고 결과를 시각화합니다. | ||||||||||
|
||||||||||
To run the example you need some extra python packages installed. These are needed for preprocessing images and visualization. | ||||||||||
예제를 실행하려면 몇 가지 추가적인 파이썬 패키지가 설치되어 있어야 합니다. 이는 이미지 전처리 및 시각화에 필요합니다. | ||||||||||
```bash | ||||||||||
pip install numpy scipy scikit-image matplotlib | ||||||||||
``` | ||||||||||
|
||||||||||
Load an SSD model pretrained on COCO dataset, as well as a set of utility methods for convenient and comprehensive formatting of input and output of the model. | ||||||||||
COCO 데이터 세트에 대해 사전에 학습된 SSD 모델과, 모델의 입력 및 출력에 대한 편리하고 포괄적인 형식 지정을 위한 유틸리티를 불러옵니다. | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
내용적인 문제는 아니지만 번역 문서를 참고했을 때 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 수정하겠습니다. |
||||||||||
```python | ||||||||||
import torch | ||||||||||
ssd_model = torch.hub.load('NVIDIA/DeepLearningExamples:torchhub', 'nvidia_ssd') | ||||||||||
utils = torch.hub.load('NVIDIA/DeepLearningExamples:torchhub', 'nvidia_ssd_processing_utils') | ||||||||||
``` | ||||||||||
|
||||||||||
Now, prepare the loaded model for inference | ||||||||||
추론을 위해 불러온 모델을 준비합니다. | ||||||||||
```python | ||||||||||
ssd_model.to('cuda') | ||||||||||
ssd_model.eval() | ||||||||||
``` | ||||||||||
|
||||||||||
Prepare input images for object detection. | ||||||||||
(Example links below correspond to first few test images from the COCO dataset, but you can also specify paths to your local images here) | ||||||||||
객체 탐지를 위한 입력 이미지를 준비합니다. | ||||||||||
(아래 예제 링크는 COCO 데이터 세트의 처음 몇 개의 테스트 이미지에 해당하지만, 로컬 이미지에 대한 경로를 지정할 수도 있습니다.) | ||||||||||
```python | ||||||||||
uris = [ | ||||||||||
'http://images.cocodataset.org/val2017/000000397133.jpg', | ||||||||||
|
@@ -69,33 +69,32 @@ uris = [ | |||||||||
] | ||||||||||
``` | ||||||||||
|
||||||||||
Format the images to comply with the network input and convert them to tensor. | ||||||||||
네트워크 입력에 맞게 이미지를 포맷하고 텐서로 변환합니다. | ||||||||||
```python | ||||||||||
inputs = [utils.prepare_input(uri) for uri in uris] | ||||||||||
tensor = utils.prepare_tensor(inputs) | ||||||||||
``` | ||||||||||
|
||||||||||
Run the SSD network to perform object detection. | ||||||||||
객체를 탐지하기 위해 SSD 네트워크를 실행합니다. | ||||||||||
```python | ||||||||||
with torch.no_grad(): | ||||||||||
detections_batch = ssd_model(tensor) | ||||||||||
``` | ||||||||||
|
||||||||||
By default, raw output from SSD network per input image contains | ||||||||||
8732 boxes with localization and class probability distribution. | ||||||||||
Let's filter this output to only get reasonable detections (confidence>40%) in a more comprehensive format. | ||||||||||
기본적으로 입력 이미지당 SSD 네트워크의 원시 출력에는 국소화 및 클래스 확률 분포가 있는 8732개의 상자가 포함됩니다. | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 'raw'를 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 저도 저부분에 대해서 같이 이야기 하려고 했습니다!! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 감사합니다~ |
||||||||||
보다 포괄적인 형식으로 합리적인 탐지(신뢰도>40%)만 얻도록 이 출력을 필터링해 보겠습니다. | ||||||||||
```python | ||||||||||
results_per_input = utils.decode_results(detections_batch) | ||||||||||
best_results_per_input = [utils.pick_best(results, 0.40) for results in results_per_input] | ||||||||||
``` | ||||||||||
|
||||||||||
The model was trained on COCO dataset, which we need to access in order to translate class IDs into object names. | ||||||||||
For the first time, downloading annotations may take a while. | ||||||||||
이 모델은 COCO 데이터 세트에 대해 학습되었고, 클래스 ID를 객체 이름으로 번역하기 위해 유틸리티에 접근합니다. | ||||||||||
처음에 다운로드할 때는 시간이 걸릴 수 있습니다. | ||||||||||
```python | ||||||||||
classes_to_labels = utils.get_coco_object_dictionary() | ||||||||||
``` | ||||||||||
|
||||||||||
Finally, let's visualize our detections | ||||||||||
끝으로, 탐지한 결과를 시각화해 보겠습니다. | ||||||||||
```python | ||||||||||
from matplotlib import pyplot as plt | ||||||||||
import matplotlib.patches as patches | ||||||||||
|
@@ -117,10 +116,7 @@ plt.show() | |||||||||
``` | ||||||||||
|
||||||||||
### Details | ||||||||||
For detailed information on model input and output, | ||||||||||
training recipies, inference and performance visit: | ||||||||||
[github](https://github.com/NVIDIA/DeepLearningExamples/tree/master/PyTorch/Detection/SSD) | ||||||||||
and/or [NGC](https://ngc.nvidia.com/catalog/resources/nvidia:ssd_for_pytorch) | ||||||||||
모델 입력 및 출력, 학습 방법, 추론 및 성능 등에 대한 더 자세한 정보는 [github](https://github.com/NVIDIA/DeepLearningExamples/tree/master/PyTorch/Detection/SSD) 및 [NGC](https://ngc.nvidia.com/catalog/resources/nvidia:ssd_for_pytorch)에서 볼 수 있습니다. | ||||||||||
|
||||||||||
### References | ||||||||||
|
||||||||||
|
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.
SSD300은 "단일 심층 신경망을 사용하여 이미지에서 물체를 감지하는 방법"인 [SSD: Single Shot MultiBox Detector](https://arxiv.org/abs/1512.02325)에 기반한 모델입니다.
라고 번역하면 어떨까요??!
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.
오. 읽기 편해졌네요!! 감사합니다 👍