Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions facebookresearch_pytorchvideo_slowfast.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ demo-model-link: https://huggingface.co/spaces/pytorch/SlowFast

#### Imports

Load the model:
모델 불러오기:

```python
import torch
# Choose the `slowfast_r50` model
model = torch.hub.load('facebookresearch/pytorchvideo', 'slowfast_r50', pretrained=True)
```

Import remaining functions:
모듈 불러오기:

```python
from typing import Dict
Expand All @@ -48,9 +48,10 @@ from pytorchvideo.transforms import (
)
```

#### Setup
#### 설정

Set the model to eval mode and move to desired device.
<!-- Set the model to eval mode and move to desired device. -->
모델을 평가 모드로 설정하고 원하는 장치에 할당합니다.

```python
# Set to GPU or CPU
Expand All @@ -59,7 +60,8 @@ model = model.eval()
model = model.to(device)
```

Download the id to label mapping for the Kinetics 400 dataset on which the torch hub models were trained. This will be used to get the category label names from the predicted class ids.
<!-- Download the id to label mapping for the Kinetics 400 dataset on which the torch hub models were trained. This will be used to get the category label names from the predicted class ids. -->
토치 허브 모델 학습에 사용된 Kinetics 400 데이터셋 ID를 다운로드 합니다. ID는 라벨 매핑에 사용되며, 이는 예측 클래스 ID로부터 카테고리 라벨 이름을 가져오는데 사용됩니다.

```python
json_url = "https://dl.fbaipublicfiles.com/pyslowfast/dataset/class_names/kinetics_classnames.json"
Expand Down