# 2.2 Jumpstart with on a few click

SageMaker JumpStart는 다양한 문제 유형에 대해 사전 학습된 오픈 소스 모델을 제공하므로 기계 학습 여정을 쉽게 이용할 수 있습니다. 이러한 모델은 배포 전에 Increment Training(점진적 학습)과 Fine-tuning(미세 조정)을 할 수 있습니다. JumpStart는 또한 일반적인 사용 사례를 위한 인프라를 설정하는 솔루션 템플릿과 SageMaker를 사용한 기계 학습을 위한 실행 가능한 예제 노트북을 제공합니다.

시작을 위해 [Sagemaker Studio Console](https://us-east-1.console.aws.amazon.com/sagemaker/home?region=us-east-1#/studio-landing) 이동하여, 기존 사용자에 있는 Open Studio 버튼을 클릭하십시오.

## Image Classification model 배포하기

1. 왼쪽의 SageMaker Jumpstart 버튼을 누른 후 아래로 스크롤을 하여 Image Classfication 항목에서 아래의 모델을 선택합니다.&#x20;

`Vision`\
`Dataset : Imagenet`\
`Fine-tunable : Yes`\
`Source : PyTorch Hub`

<figure><img src="/files/bElEw3RAwWHCD65NaaMT" alt=""><figcaption></figcaption></figure>

2. 모델 배포를 위해 Deploy 버튼을 클릭합니다.

<figure><img src="/files/fm4038Id0H8xI9tsPd82" alt=""><figcaption></figcaption></figure>

3. Deploy 버튼을 누르면 사전에 학습된 모델을 기반으로 추론을 위한 Endpoint가 배포됩니다. \
   해당 작업은 약 5\~15분이 소요됩니다.

<figure><img src="/files/CAYPmi0hFT9szWi9x47T" alt=""><figcaption></figcaption></figure>

4. 엔드포인트의 상태가 In Service로 바뀌게 되면, 아래 Open notebook버튼을 누릅니다.

<figure><img src="/files/lM5akdjJyC0U2qPz2hq6" alt=""><figcaption></figcaption></figure>

5. 해당 노트북 환경에서 차례대로 각 셀에서  "Shift + Enter" 또는 Play버튼을 눌러 해당 셀을 실행시킵니다.&#x20;

<figure><img src="/files/l2ZFObea9HzMPcfgYFQM" alt=""><figcaption></figcaption></figure>

6. 기본 이미지인 고양이와 강아지의 분류로 Egyptian cat과 Labrador Retriever가 나오는 것을 확인할 수 있습니다.

<figure><img src="/files/waFFTTMnNy5lrOWB6E3E" alt=""><figcaption></figcaption></figure>

7. 다른 이미지를 넣었을때도 동일하게 분류가 잘 되는지 확인하기 위해, 닭과 거위의 이미지를 통해 해당 부분들을 수정해 보겠습니다. 아래 이미지를 다운로드 받습니다.

{% file src="/files/lyGGOZ05Sc0xko1T2BJj" %}

{% file src="/files/iXeuufaZcc28DSC2gnlu" %}

8. 왼쪽의 폴더 버튼을 눌러 파일창을 활성화 시킨 후, 파일을 Drag\&Drop 또는 업로드를 통해 파일을 추가합니다.

<figure><img src="/files/OhSRswxhAzwjsLQWuEHF" alt="" width="361"><figcaption></figcaption></figure>

8. 첫번째 셀과 두번째 셀의 내용을 각각 바꾸어 넣습니다.

<pre class="language-python"><code class="lang-python">import boto3
from IPython.core.display import HTML

region = boto3.Session().region_name
s3_bucket = f"jumpstart-cache-prod-{region}"
key_prefix = "inference-notebook-assets"
s3 = boto3.client("s3")

def download_from_s3(key_filenames):
    for key_filename in key_filenames:
        s3.download_file(s3_bucket, f"{key_prefix}/{key_filename}", key_filename)

<a data-footnote-ref href="#user-content-fn-1">goose_jpg, cock_jpg = "goose.jpeg", "cock.jpeg"</a>
#download_from_s3(key_filenames=[cat_jpg, dog_jpg])

HTML('&#x3C;table>&#x3C;tr>&#x3C;td> &#x3C;img src="goose.jpeg" alt="cat" style="height: 250px;"/> &#x3C;figcaption>goose.jpeg&#x3C;/figcaption>'
     '&#x3C;/td>&#x3C;td> &#x3C;img src="cock.jpeg" alt="dog" style="height: 250px;"/> &#x3C;figcaption>cock.jpeg&#x3C;/figcaption>'
     '&#x3C;/td>&#x3C;/tr>&#x3C;/table>')
</code></pre>

```python
images = {}
with open(goose_jpg, 'rb') as file: images[goose_jpg] = file.read()
with open(cock_jpg, 'rb') as file: images[cock_jpg] = file.read()
```

10. 1\~3번째 셀을 다시 실행하여 실행 결과를 확인합니다.

<figure><img src="/files/8YmYuXRxbpY6JRAMczJN" alt="" width="375"><figcaption></figcaption></figure>

실행하게 되면 다음과 같은 결과를 확인 해 볼 수 있습니다.

11. 기존의 모델 페이지로 돌아가 엔드포인트를 삭제한 뒤, 다른 데이터를 넣어 학습을 진행해보겠습니다.<br>

<figure><img src="/files/S4uRL3mEpmhfEqrxf17U" alt=""><figcaption></figcaption></figure>

[^1]:


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://cheolmin-ki.gitbook.io/sagemaker-image-workshop/lab2.-image-classification-with-no-code/2.2-jumpstart-with-on-a-few-click.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
