Skip to content

Commit

Permalink
Updated specific model descriptions when packages are missing
Browse files Browse the repository at this point in the history
  • Loading branch information
HydrogenSulfate committed Feb 28, 2022
1 parent efef3c3 commit 8739c94
Show file tree
Hide file tree
Showing 34 changed files with 61 additions and 37 deletions.
2 changes: 1 addition & 1 deletion applications/EIVideo/EIVideo/README.MD
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 交互式视频智能标注工具 - CLI(Command Line Interface)

在开始使用之前,您可能需要按照以下命令安装额外的依赖包
在开始使用之前,您需要按照以下命令安装额外的依赖包
```bash
python -m pip install scikit-image
```
Expand Down
2 changes: 1 addition & 1 deletion applications/EIVideo/EIVideo/docs/en/manet.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

- [Inference](#Inference)

Before getting started, you may need to install additional dependencies as follows:
Before getting started, you need to install additional dependencies as follows:
```bash
python -m pip install scikit-image
```
Expand Down
2 changes: 1 addition & 1 deletion applications/EIVideo/EIVideo/docs/zh-CN/manet.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

- [模型推理](#模型推理)

在开始使用之前,您可能需要按照以下命令安装额外的依赖包
在开始使用之前,您需要按照以下命令安装额外的依赖包
```bash
python -m pip install scikit-image
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@
try:
from skimage import morphology, transform
except ImportError as e:
print(f"{e}, [scikit-image] package and it's dependencies may needed.")
print(
f"{e}, [scikit-image] package and it's dependencies is required for EIVideo."
)
import paddle
import cv2
import random
Expand Down
4 changes: 3 additions & 1 deletion applications/Ma-Net/utils/mask_damaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
try:
from skimage import morphology, transform
except ImportError as e:
print(f"{e}, [scikit-image] package and it's dependencies may needed.")
print(
f"{e}, [scikit-image] package and it's dependencies is required for MA-Net."
)
import paddle
import cv2
import random
Expand Down
2 changes: 1 addition & 1 deletion applications/PP-Care/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
- [实现细节](#实现细节)
- [参考论文](#参考论文)

在开始使用之前,您可能需要按照以下命令安装额外的依赖包
在开始使用之前,您需要按照以下命令安装额外的依赖包
```bash
python -m pip install SimpleITK
```
Expand Down
2 changes: 1 addition & 1 deletion applications/T2VLAD/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
- [模型测试](#模型测试)
- [参考论文](#参考论文)

在开始使用之前,您可能需要按照以下命令安装额外的依赖包
在开始使用之前,您需要按照以下命令安装额外的依赖包
```bash
python -m pip install paddlenlp
```
Expand Down
2 changes: 1 addition & 1 deletion applications/T2VLAD/README_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
- [Test](#Test)
- [Reference](#Reference)

Before getting started, you may need to install additional dependencies as follows:
Before getting started, you need to install additional dependencies as follows:
```bash
python -m pip install paddlenlp
```
Expand Down
4 changes: 3 additions & 1 deletion applications/T2VLAD/base/base_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@
try:
from paddlenlp.transformers import BertTokenizer
except ImportError as e:
print(e)
print(
f"{e}, [paddlenlp] package and it's dependencies is required for T2VLAD."
)
from utils import ensure_tensor, expert_tensor_storage

# For SLURM usage, buffering makes it difficult to see events as they happen, so we set
Expand Down
4 changes: 3 additions & 1 deletion applications/T2VLAD/model/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@
try:
from paddlenlp.transformers import BertModel
except ImportError as e:
print(e)
print(
f"{e}, [paddlenlp] package and it's dependencies is required for T2VLAD."
)


class Mish(nn.Layer):
Expand Down
2 changes: 1 addition & 1 deletion applications/TableTennis/ActionRecognition/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
- [模型部署](#模型部署)
- [参考论文](#参考论文)

在开始使用之前,您可能需要按照以下命令安装额外的依赖包
在开始使用之前,您需要按照以下命令安装额外的依赖包
```bash
python -m pip install imageio
```
Expand Down
2 changes: 1 addition & 1 deletion deploy/cpp_infer/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
C++在性能计算上优于python,因此,在大多数CPU、GPU部署场景,多采用C++的部署方式,本节将介绍如何在Linux(CPU/GPU)环境下配置C++环境并完成
PaddleVideo模型部署。

在开始使用之前,您可能需要按照以下命令安装额外的依赖包
在开始使用之前,您需要按照以下命令安装额外的依赖包
```bash
python -m pip install git+https://github.com/LDOUBLEV/AutoLog
```
Expand Down
2 changes: 1 addition & 1 deletion deploy/cpp_infer/readme_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This chapter introduces the C++ deployment method of the PaddleVideo model. For
C++ is better than python in terms of performance calculation. Therefore, in most CPU and GPU deployment scenarios, C++ deployment methods are mostly used. This section will introduce how to configure the C++ environment in the Linux (CPU/GPU) environment and complete it.
PaddleVideo model deployment.

Before getting started, you may need to install additional dependencies as follows:
Before getting started, you need to install additional dependencies as follows:
```bash
python -m pip install [paddledet](git+https://github.com/LDOUBLEV/AutoLog)
```
Expand Down
2 changes: 1 addition & 1 deletion docs/en/model_zoo/detection/SlowFast_FasterRCNN_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
- [Test](#Test)
- [Inference](#Inference)

Before getting started, you may need to install additional dependencies as follows:
Before getting started, you need to install additional dependencies as follows:
```bash
python -m pip install moviepy
python -m pip install et_xmlfile
Expand Down
2 changes: 1 addition & 1 deletion docs/en/model_zoo/estimation/adds.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
- [Inference](#Inference)
- [Reference](#Reference)

Before getting started, you may need to install additional dependencies as follows:
Before getting started, you need to install additional dependencies as follows:
```bash
python -m pip install scikit-image
python -m pip install matplotlib
Expand Down
2 changes: 1 addition & 1 deletion docs/en/model_zoo/multimodal/actbert.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
- [Test](#Test)
- [Reference](#Reference)

Before getting started, you may need to install additional dependencies as follows:
Before getting started, you need to install additional dependencies as follows:
```bash
python -m pip install paddlenlp
python -m pip install lmdb
Expand Down
2 changes: 1 addition & 1 deletion docs/en/model_zoo/partition/transnetv2.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
- [Details](#Details)
- [Reference](#Reference)

Before getting started, you may need to install additional dependencies as follows:
Before getting started, you need to install additional dependencies as follows:
```bash
python -m pip install ffmpeg-python==0.2.0
```
Expand Down
2 changes: 1 addition & 1 deletion docs/zh-CN/model_zoo/detection/SlowFast_FasterRCNN.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
- [模型测试](#模型测试)
- [模型推理](#模型推理)

在开始使用之前,您可能需要按照以下命令安装额外的依赖包
在开始使用之前,您需要按照以下命令安装额外的依赖包
```bash
python -m pip install moviepy
python -m pip install et_xmlfile
Expand Down
2 changes: 1 addition & 1 deletion docs/zh-CN/model_zoo/estimation/adds.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
- [模型推理](#模型推理)
- [参考论文](#参考论文)

在开始使用之前,您可能需要按照以下命令安装额外的依赖包
在开始使用之前,您需要按照以下命令安装额外的依赖包
```bash
python -m pip install scikit-image
python -m pip install matplotlib
Expand Down
2 changes: 1 addition & 1 deletion docs/zh-CN/model_zoo/multimodal/actbert.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
- [模型测试](#模型测试)
- [参考论文](#参考论文)

在开始使用之前,您可能需要按照以下命令安装额外的依赖包
在开始使用之前,您需要按照以下命令安装额外的依赖包
```bash
python -m pip install paddlenlp
python -m pip install lmdb
Expand Down
2 changes: 1 addition & 1 deletion docs/zh-CN/model_zoo/partition/transnetv2.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
- [模型推理](#模型推理)
- [参考论文](#参考论文)

在开始使用之前,您可能需要按照以下命令安装额外的依赖包
在开始使用之前,您需要按照以下命令安装额外的依赖包
```bash
python -m pip install ffmpeg-python==0.2.0
```
Expand Down
2 changes: 1 addition & 1 deletion docs/zh-CN/model_zoo/recognition/movinet.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
- [模型测试](#模型测试)
- [参考论文](#参考论文)

在开始使用之前,您可能需要按照以下命令安装额外的依赖包
在开始使用之前,您需要按照以下命令安装额外的依赖包
```bash
python -m pip install fvcore==0.1.5.post20210630
```
Expand Down
6 changes: 4 additions & 2 deletions paddlevideo/loader/dataset/actbert_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@
try:
import lmdb
except ImportError as e:
print(e)
print(f"{e}, [lmdb] package and it's dependencies is required for ActBERT.")
import pickle
import json
try:
from paddlenlp.transformers import BertTokenizer
except ImportError as e:
print(e)
print(
f"{e}, [paddlenlp] package and it's dependencies is required for ActBERT."
)
from ..registry import DATASETS
from .base import BaseDataset
from ...utils import get_logger
Expand Down
6 changes: 4 additions & 2 deletions paddlevideo/loader/dataset/msrvtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@
try:
import lmdb
except ImportError as e:
print(e)
print(f"{e}, [lmdb] package and it's dependencies is required for ActBERT.")
import pickle
try:
from paddlenlp.transformers import BertTokenizer
except ImportError as e:
print(e)
print(
f"{e}, [paddlenlp] package and it's dependencies is required for ActBERT."
)
from ..registry import DATASETS
from .base import BaseDataset
from ...utils import get_logger
Expand Down
4 changes: 3 additions & 1 deletion paddlevideo/loader/pipelines/decode_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
try:
import skimage.transform
except ImportError as e:
print(f"{e}, [scikit-image] package and it's dependencies may needed.")
print(
f"{e}, [scikit-image] package and it's dependencies is required for ADDS."
)
from PIL import Image

from ..registry import PIPELINES
Expand Down
4 changes: 3 additions & 1 deletion paddlevideo/loader/pipelines/decode_sampler_MRI.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
try:
import SimpleITK as sitk
except ImportError as e:
print(f"{e}, [SimpleITK] package and it's dependencies may needed.")
print(
f"{e}, [SimpleITK] package and it's dependencies is required for PP-Care."
)
import cv2

from ..registry import PIPELINES
Expand Down
4 changes: 3 additions & 1 deletion paddlevideo/loader/pipelines/multimodal.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
try:
from paddlenlp.transformers import BertTokenizer
except ImportError as e:
print(e)
print(
f"{e}, [paddlenlp] package and it's dependencies is required for ActBERT."
)


@PIPELINES.register()
Expand Down
4 changes: 3 additions & 1 deletion paddlevideo/loader/pipelines/sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
try:
import SimpleITK as sitk
except ImportError as e:
print(f"{e}, [SimpleITK] package and it's dependencies may needed.")
print(
f"{e}, [SimpleITK] package and it's dependencies is required for PP-Care."
)
import cv2

from ..registry import PIPELINES
Expand Down
3 changes: 2 additions & 1 deletion paddlevideo/modeling/backbones/movinet.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
try:
from einops import rearrange
except ImportError as e:
print(e)
print(
f"{e}, [einops] package and it's dependencies is required for MoViNet.")
container_abcs = collections.abc
from ..registry import BACKBONES
from collections import OrderedDict
Expand Down
3 changes: 2 additions & 1 deletion paddlevideo/modeling/backbones/movinets_cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
try:
from fvcore.common.config import CfgNode as CN
except ImportError as e:
print(e)
print(
f"{e}, [fvcore] package and it's dependencies is required for MoViNet.")


def fill_SE_config(
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ opencv-python==4.2.0.32
decord==0.4.2
av==8.0.3
scipy==1.6.3
scikit-image
3 changes: 2 additions & 1 deletion tools/ava_predict.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
try:
import ppdet
except ImportError as e:
print(f"{e}, [paddledet] package and it's dependencies may needed.")
print(
f"{e}, [paddledet] package and it's dependencies is required for AVA.")

__dir__ = os.path.dirname(os.path.abspath(__file__))
sys.path.append(os.path.abspath(os.path.join(__dir__, '../')))
Expand Down
6 changes: 3 additions & 3 deletions tools/predict.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,9 @@ def main():
try:
import auto_log
except ImportError as e:
print(
f"{e}, [git+https://github.com/LDOUBLEV/AutoLog] package and it's dependencies may needed."
)
print(f"{e}, [git+https://github.com/LDOUBLEV/AutoLog] "
f"package and it's dependencies is required for "
f"python-inference when enable_benchmark=True.")
pid = os.getpid()
autolog = auto_log.AutoLogger(model_name=cfg.model_name,
model_precision=args.precision,
Expand Down
2 changes: 1 addition & 1 deletion tools/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -951,7 +951,7 @@ def preprocess(self, input_file):
import ffmpeg
except ImportError as e:
print(
f"{e}, [ffmpeg-python] package and it's dependencies may needed."
f"{e}, [ffmpeg-python] package and it's dependencies is required for TransNetV2."
)
assert os.path.isfile(input_file) is not None, "{0} not exists".format(
input_file)
Expand Down

0 comments on commit 8739c94

Please sign in to comment.