Skip to content

Commit cae6039

Browse files
authored
prepare for 3.0b2 (#2432)
* prepare for 3.0b2 * precommit all files
1 parent 58a6f48 commit cae6039

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+464
-393
lines changed

.github/ISSUE_TEMPLATE/1_data.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ assignees: ''
99

1010
## Checklist:
1111

12-
1. 查找[历史相关issue](https://github.com/PaddlePaddle/PaddleX/issues)寻求解答
13-
2. 翻阅[FAQ常见问题汇总和答疑](https://github.com/PaddlePaddle/PaddleX/blob/develop/docs/FAQ/FAQ.md)
14-
3. 确认bug是否在新版本里还未修复
15-
4. 翻阅[PaddleX数据准备文档](https://github.com/PaddlePaddle/PaddleX/tree/develop#2-%E6%95%B0%E6%8D%AE%E5%87%86%E5%A4%87)
12+
- [ ] 查找[历史相关issue](https://github.com/PaddlePaddle/PaddleX/issues)寻求解答
13+
- [ ] 翻阅[FAQ](https://paddlepaddle.github.io/PaddleX/main/FAQ.html)
14+
- [ ] 翻阅[PaddleX 文档](https://paddlepaddle.github.io/PaddleX/main/index.html)
15+
- [ ] 确认bug是否在新版本里还未修复
1616

1717
## 描述问题
1818

.github/ISSUE_TEMPLATE/2--paddlex-api----.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ assignees: ''
99

1010
## Checklist:
1111

12-
1. 查找[历史相关issue](https://github.com/PaddlePaddle/PaddleX/issues)寻求解答
13-
2. 翻阅[FAQ常见问题汇总和答疑](https://github.com/PaddlePaddle/PaddleX/blob/develop/docs/FAQ/FAQ.md)
14-
3. 确认bug是否在新版本里还未修复
15-
4. 翻阅[PaddleX API文档说明](https://github.com/PaddlePaddle/PaddleX/tree/develop#paddlex-%E4%BD%BF%E7%94%A8%E6%96%87%E6%A1%A3)
12+
- [ ] 查找[历史相关issue](https://github.com/PaddlePaddle/PaddleX/issues)寻求解答
13+
- [ ] 翻阅[FAQ](https://paddlepaddle.github.io/PaddleX/main/FAQ.html)
14+
- [ ] 翻阅[PaddleX 文档](https://paddlepaddle.github.io/PaddleX/main/index.html)
15+
- [ ] 确认bug是否在新版本里还未修复
1616

1717
## 描述问题
1818

1919
## 复现
2020

21-
1. 您是否已经正常运行我们提供的[教程](https://github.com/PaddlePaddle/PaddleX/tree/develop/tutorials)
21+
1. 您是否已经正常运行我们提供的[教程](https://paddlepaddle.github.io/PaddleX/main/index.html)
2222

2323
2. 您是否在教程的基础上修改代码内容?还请您提供运行的代码
2424

.github/ISSUE_TEMPLATE/3_deploy.md

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: 3. 模型部署
3-
about: 模型部署相关问题,包括C++、Python、C#部署等
3+
about: 模型部署相关问题,包括高性能推理、服务化部署、端侧部署等
44
title: ''
55
labels: ''
66
assignees: ''
@@ -9,38 +9,42 @@ assignees: ''
99

1010
## Checklist:
1111

12-
1. 查找[历史相关issue](https://github.com/PaddlePaddle/PaddleX/issues)寻求解答
13-
2. 翻阅[FAQ常见问题汇总和答疑](https://github.com/PaddlePaddle/PaddleX/blob/develop/docs/FAQ/FAQ.md)
14-
3. 确认bug是否在新版本里还未修复
15-
4. 翻阅[PaddleX 部署文档说明](https://github.com/PaddlePaddle/PaddleX/tree/develop#5-%E6%A8%A1%E5%9E%8B%E9%83%A8%E7%BD%B2)
12+
- [ ] 查找[历史相关issue](https://github.com/PaddlePaddle/PaddleX/issues)寻求解答
13+
- [ ] 翻阅[FAQ](https://paddlepaddle.github.io/PaddleX/main/FAQ.html)
14+
- [ ] 翻阅[PaddleX 文档](https://paddlepaddle.github.io/PaddleX/main/index.html)
15+
- [ ] 确认bug是否在新版本里还未修复
1616

1717
## 描述问题
1818

1919
## 复现
2020

21-
1. c++部署方式
21+
1. 高性能推理
2222

23-
* 您是否按照文档教程已经正常运行我们提供的[demo](https://github.com/PaddlePaddle/PaddleX/tree/develop/deploy/cpp/demo)
23+
* 您是否完全按照[高性能推理文档教程](https://paddlepaddle.github.io/PaddleX/main/pipeline_deploy/high_performance_inference.html)跑通了流程
2424

25-
* 您是否在demo基础上修改代码内容?还请您提供运行的代码
25+
* 您使用的是离线激活方式还是在线激活方式?
2626

27-
2. c#部署方式
27+
2. 服务化部署
2828

29-
* 您是否按照文档教程已经正常运行我们提供的[demo](https://github.com/PaddlePaddle/PaddleX/tree/develop/examples/C%23_deploy)
29+
* 您是否完全按照[服务化部署文档教程](https://paddlepaddle.github.io/PaddleX/main/pipeline_deploy/service_deploy.html)跑通了流程
3030

31-
* 您是否在demo基础上修改代码内容?还请您提供运行的代码
31+
* 您在服务化部署中是否有使用高性能推理插件,如果是,您使用的是离线激活方式还是在线激活方式?
32+
33+
* 如果是多语言调用的问题,请给出调用示例子。
34+
35+
3. 端侧部署
36+
* 您是否完全按照[端侧部署文档教程](https://paddlepaddle.github.io/PaddleX/main/pipeline_deploy/edge_deploy.html)跑通了流程?
37+
38+
* 您使用的端侧设备是?对应的PaddlePaddle版本和PaddleLite版本分别是什么?
3239

33-
* 如果c# demo无法正常运行,c++ [demo](https://github.com/PaddlePaddle/PaddleX/tree/develop/deploy/cpp/demo)是否已经正常运行?
3440

3541
3. 您使用的**模型****数据集**是?
3642

3743
4. 请提供您出现的报错信息及相关log
3844

3945
## 环境
4046

41-
1. 如果您使用的是python部署方式,请提供您使用的PaddlePaddle、PaddleX版本号、Python版本号
42-
43-
2. 如果您使用的是c++或c#部署方式,请提供您使用的PaddleX分支、推理引擎(例如PaddleInference)版本号
47+
1. 请提供您使用的PaddlePaddle、PaddleX版本号、Python版本号
4448

4549
3. 请提供您使用的操作系统信息,如Linux/Windows/MacOS
4650

.github/ISSUE_TEMPLATE/4_gui.md

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
name: 4. PaddleX可视化客户端使用问题
3-
about: PaddleX可视化客户端使用问题
2+
name: 4. 星河零代码产线使用问题
3+
about: 星河零代码产线使用问题
44
title: ''
55
labels: ''
66
assignees: ''
@@ -9,19 +9,15 @@ assignees: ''
99

1010
## Checklist:
1111

12-
1. 查找[历史相关issue](https://github.com/PaddlePaddle/PaddleX/issues)寻求解答
13-
2. 翻阅[FAQ常见问题汇总和答疑](https://github.com/PaddlePaddle/PaddleX/blob/develop/docs/FAQ/FAQ.md)
14-
3. 确认bug是否在新版本里还未修复
15-
4. 如果bug是由PaddleX API 2.0导致,且该bug在develop分支里已修复,参考[FAQ Q4](https://github.com/PaddlePaddle/PaddleX/blob/develop/docs/FAQ/FAQ.md#gui%E7%9B%B8%E5%85%B3%E9%97%AE%E9%A2%98)替换内置PaddleX API
12+
- [ ] 查找[历史相关issue](https://github.com/PaddlePaddle/PaddleX/issues)寻求解答
13+
- [ ] 翻阅[FAQ](https://paddlepaddle.github.io/PaddleX/main/FAQ.html)
14+
- [ ] 翻阅[PaddleX 文档](https://paddlepaddle.github.io/PaddleX/main/index.html)
15+
- [ ] 如果是数据校验问题,请确保在开源PaddleX中可以通过数据校验
1616

1717
## 描述问题
1818

1919
## 复现
2020

21-
1. 请提供您出现的报错信息及相关log(log的查找见 [FAQ Q2](https://github.com/PaddlePaddle/PaddleX/blob/develop/docs/FAQ/FAQ.md#gui%E7%9B%B8%E5%85%B3%E9%97%AE%E9%A2%98)
21+
1. 请提供您出现的报错信息及相关log
2222

23-
2. 请提供您使用的GUI版本号
24-
25-
3. 请提供您使用的操作系统信息,如Linux/Windows/MacOS
26-
27-
4. 请问您使用的CUDA/cuDNN的版本号是?
23+
2. 请提供您的星河uid和产线id

.github/ISSUE_TEMPLATE/5_other.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ assignees: ''
99

1010
## Checklist:
1111

12-
1. 查找[历史相关issue](https://github.com/PaddlePaddle/PaddleX/issues)寻求解答
13-
2. 翻阅[FAQ常见问题汇总和答疑](https://github.com/PaddlePaddle/PaddleX/blob/develop/docs/FAQ/FAQ.md)
14-
3. 确认bug是否在新版本里还未修复
15-
4. 翻阅[PaddleX 使用文档](https://github.com/PaddlePaddle/PaddleX/tree/develop#paddlex-%E4%BD%BF%E7%94%A8%E6%96%87%E6%A1%A3)
12+
- [ ] 查找[历史相关issue](https://github.com/PaddlePaddle/PaddleX/issues)寻求解答
13+
- [ ] 翻阅[FAQ](https://paddlepaddle.github.io/PaddleX/main/FAQ.html)
14+
- [ ] 翻阅[PaddleX 文档](https://paddlepaddle.github.io/PaddleX/main/index.html)
15+
- [ ] 确认bug是否在新版本里还未修复
1616

1717
## 描述问题
1818

1919
## 复现
2020

21-
1. 您是否已经正常运行我们提供的[教程](https://github.com/PaddlePaddle/PaddleX/tree/develop/tutorials)
21+
1. 您是否已经正常运行我们提供的[教程](https://paddlepaddle.github.io/PaddleX/main/index.html)
2222

2323
2. 您是否在教程的基础上修改代码内容?还请您提供运行的代码
2424

.github/ISSUE_TEMPLATE/6_hardware_contribute.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
1-
# 说明
1+
---
2+
name: 6. 新硬件贡献
3+
about: 请描述您准备贡献的模型与芯片信息
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
## Checklist:
11+
12+
- [ ] 查找[历史相关issue](https://github.com/PaddlePaddle/PaddleX/issues)寻求解答
13+
- [ ] 翻阅[FAQ](https://paddlepaddle.github.io/PaddleX/main/FAQ.html)
14+
- [ ] 翻阅[PaddleX 文档](https://paddlepaddle.github.io/PaddleX/main/index.html)
215

3-
1. 请描述您准备贡献的模型与芯片信息
416

517
# 环境
618

.github/pull_request_template.md

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +0,0 @@
1-
## 此为PR说明模版
2-
3-
如提交的为部署C++代码,请确认以下自测点是否完成(完成勾选即可),并保留以下的自测点列表,便于Reviewer知晓。
4-
5-
- [ ] Linux下测试通过
6-
- - [ ] batch = 1 预测
7-
- - [ ] batch > 1预测
8-
- - [ ] 多GPU卡预测
9-
- - [ ] TensorRT预测
10-
- - [ ] Triton预测
11-
- [ ] Windows下测试通过
12-
- - [ ] batch = 1预测
13-
- - [ ] batch > 1预测

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ PaddleX的各个产线均支持本地**快速推理**,部分模型支持在[AI
358358

359359
### 🛠️ 安装
360360

361-
> ❗安装 PaddleX 前请先确保您有基础的 **Python 运行环境**(注:当前支持Python 3.8 ~ Python 3.10下运行,更多Python版本适配中)。
361+
> ❗安装 PaddleX 前请先确保您有基础的 **Python 运行环境**(注:当前支持Python 3.8 ~ Python 3.10下运行,更多Python版本适配中)。PaddleX 3.0-beta2 版本依赖的 PaddlePaddle 版本为 3.0.0b2。
362362
363363
* **安装 PaddlePaddle**
364364
```bash
@@ -377,7 +377,7 @@ python -m pip install paddlepaddle-gpu==3.0.0b2 -i https://www.paddlepaddle.org.
377377
* **安装PaddleX**
378378

379379
```bash
380-
pip install https://paddle-model-ecology.bj.bcebos.com/paddlex/whl/paddlex-3.0.0b1-py3-none-any.whl
380+
pip install https://paddle-model-ecology.bj.bcebos.com/paddlex/whl/paddlex-3.0.0b2-py3-none-any.whl
381381
```
382382

383383
> ❗ 更多安装方式参考 [PaddleX 安装教程](https://paddlepaddle.github.io/PaddleX/latest/installation/installation.html)

README_en.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ In addition, PaddleX provides developers with a full-process efficient model tra
355355

356356
### 🛠️ Installation
357357

358-
> ❗Before installing PaddleX, please ensure you have a basic **Python environment** (Note: Currently supports Python 3.8 to Python 3.10, with more Python versions being adapted).
358+
> ❗Before installing PaddleX, please ensure you have a basic **Python environment** (Note: Currently supports Python 3.8 to Python 3.10, with more Python versions being adapted). The PaddleX 3.0-beta2 version depends on PaddlePaddle version 3.0.0b2.
359359
360360
* **Installing PaddlePaddle**
361361

docs/installation/installation.en.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ After installing PaddlePaddle (refer to the [PaddlePaddle Local Installation Tut
1717
> ❗ <b>Note</b>: Please ensure that PaddlePaddle is successfully installed before proceeding to the next step.
1818
1919
```bash
20-
pip install https://paddle-model-ecology.bj.bcebos.com/paddlex/whl/paddlex-3.0.0b1-py3-none-any.whl
20+
pip install https://paddle-model-ecology.bj.bcebos.com/paddlex/whl/paddlex-3.0.0b2-py3-none-any.whl
2121
```
2222

2323
### 1.2 Plugin Installation Mode

docs/installation/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ PaddleX为您提供了两种安装模式:<b>Wheel包安装</b>和<b>插件安
1919
> ❗ 注:请务必保证 PaddlePaddle 安装成功,安装成功后,方可进行下一步。
2020
2121
```bash
22-
pip install https://paddle-model-ecology.bj.bcebos.com/paddlex/whl/paddlex-3.0.0b1-py3-none-any.whl
22+
pip install https://paddle-model-ecology.bj.bcebos.com/paddlex/whl/paddlex-3.0.0b2-py3-none-any.whl
2323
```
2424
### 1.2 插件安装模式
2525
若您使用PaddleX的应用场景为<b>二次开发</b> (例如重新训练模型、微调模型、自定义模型结构、自定义推理代码等),那么推荐您使用<b>功能更加强大</b>的插件安装模式。

paddlex/.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.0.0.beta1
1+
3.0.0.beta2

paddlex/__main__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env python
2-
31
# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
42
#
53
# Licensed under the Apache License, Version 2.0 (the "License");

paddlex/inference/models/object_detection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def _build_components(self):
6060
"img_size": "img_size",
6161
}
6262
)
63-
63+
6464
self._add_component(
6565
[
6666
predictor,

paddlex/inference/pipelines/ppchatocrv3/ppchatocrv3.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,8 +331,13 @@ def get_visual_result(
331331
if isinstance(all_curve_res, dict):
332332
all_curve_res = [all_curve_res]
333333
for sub, curve_res in zip(curve_subs, all_curve_res):
334-
dt_polys_list = [list(map(list, sublist)) for sublist in curve_res["dt_polys"]]
335-
sorted_items = sorted(zip(dt_polys_list, curve_res["rec_text"]), key=lambda x: (x[0][0][1], x[0][0][0]))
334+
dt_polys_list = [
335+
list(map(list, sublist)) for sublist in curve_res["dt_polys"]
336+
]
337+
sorted_items = sorted(
338+
zip(dt_polys_list, curve_res["rec_text"]),
339+
key=lambda x: (x[0][0][1], x[0][0][0]),
340+
)
336341
_, sorted_text = zip(*sorted_items)
337342
structure_res.append(
338343
{

paddlex/inference/utils/official_models.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,11 +261,11 @@
261261
"RT-DETR-H_layout_3cls": "https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0b1_v2/RT-DETR-H_layout_3cls_infer.tar",
262262
"RT-DETR-H_layout_17cls": "https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0b1_v2/RT-DETR-H_layout_17cls_infer.tar",
263263
"PicoDet_LCNet_x2_5_face": "https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0b1_v2/PicoDet_LCNet_x2_5_face_infer.tar",
264-
"BlazeFace": "https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0b1_v2/BlazeFace_infer.tar",
265-
"BlazeFace-FPN-SSH": "https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0b1_v2/BlazeFace-FPN-SSH_infer.tar",
264+
"BlazeFace": "https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0b1_v2/BlazeFace_infer.tar",
265+
"BlazeFace-FPN-SSH": "https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0b1_v2/BlazeFace-FPN-SSH_infer.tar",
266266
"PP-YOLOE_plus-S_face": "https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0b1_v2/PP-YOLOE_plus-S_face_infer.tar",
267267
"MobileFaceNet": "https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0b1_v2/MobileFaceNet_infer.tar",
268-
"ResNet50_face": "https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0b1_v2/ResNet50_face_infer.tar"
268+
"ResNet50_face": "https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0b1_v2/ResNet50_face_infer.tar",
269269
}
270270

271271

paddlex/modules/anomaly_detection/dataset_checker/dataset_src/check_dataset.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ def check_dataset(dataset_dir, output, sample_num=10):
4141
mapping_file = osp.join(dataset_dir, f"{tag}.txt")
4242
if not osp.exists(mapping_file):
4343
info(f"The mapping file ({mapping_file}) doesn't exist, ignored.")
44-
info("If you are using MVTec_AD dataset, add args below in your training commands:")
44+
info(
45+
"If you are using MVTec_AD dataset, add args below in your training commands:"
46+
)
4547
info("-o CheckDataset.convert.enable=True")
4648
info("-o CheckDataset.convert.src_dataset_type=MVTec_AD")
4749
continue

paddlex/modules/anomaly_detection/dataset_checker/dataset_src/convert_dataset.py

Lines changed: 34 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
from .....utils import logging
2828
from .....utils.logging import info
2929

30+
3031
def convert_dataset(dataset_type, input_dir):
3132
"""convert to paddlex official format"""
3233
if dataset_type == "LabelMe":
@@ -166,7 +167,7 @@ def polygon2mask(img_size, points):
166167

167168
def save_item_to_txt(items, file_path):
168169
try:
169-
with open(file_path, 'a') as file:
170+
with open(file_path, "a") as file:
170171
file.write(items)
171172
file.close()
172173
except Exception as e:
@@ -177,34 +178,53 @@ def save_training_txt(cls_root, mode, cat):
177178
imgs = os.listdir(os.path.join(cls_root, mode, cat))
178179
imgs.sort()
179180
for img in imgs:
180-
if mode == 'train':
181+
if mode == "train":
181182
item = os.path.join(cls_root, mode, cat, img)
182-
items = item + ' ' + item + '\n'
183-
save_item_to_txt(items, os.path.join(cls_root, 'train.txt'))
184-
elif mode == 'test' and cat != 'good':
183+
items = item + " " + item + "\n"
184+
save_item_to_txt(items, os.path.join(cls_root, "train.txt"))
185+
elif mode == "test" and cat != "good":
185186
item1 = os.path.join(cls_root, mode, cat, img)
186-
item2 = os.path.join(cls_root, 'ground_truth', cat, img.split('.')[0]+'_mask.png')
187-
items = item1 + ' ' + item2 + '\n'
188-
save_item_to_txt(items, os.path.join(cls_root, 'val.txt'))
187+
item2 = os.path.join(
188+
cls_root, "ground_truth", cat, img.split(".")[0] + "_mask.png"
189+
)
190+
items = item1 + " " + item2 + "\n"
191+
save_item_to_txt(items, os.path.join(cls_root, "val.txt"))
189192

190193

191194
def check_old_txt(cls_pth, mode):
192-
set_name = 'train.txt' if mode == 'train' else 'val.txt'
195+
set_name = "train.txt" if mode == "train" else "val.txt"
193196
pth = os.path.join(cls_pth, set_name)
194197
if os.path.exists(pth):
195198
os.remove(pth)
196199

197200

198201
def convert_mvtec_dataset(input_dir):
199-
classes = ['bottle', 'cable', 'capsule', 'hazelnut', 'metal_nut', 'pill', 'screw',
200-
'toothbrush', 'transistor', 'zipper', 'carpet', 'grid', 'leather', 'tile', 'wood']
202+
classes = [
203+
"bottle",
204+
"cable",
205+
"capsule",
206+
"hazelnut",
207+
"metal_nut",
208+
"pill",
209+
"screw",
210+
"toothbrush",
211+
"transistor",
212+
"zipper",
213+
"carpet",
214+
"grid",
215+
"leather",
216+
"tile",
217+
"wood",
218+
]
201219
clas = os.path.split(input_dir)[-1]
202-
assert clas in classes, info(f"Make sure your class: '{clas}' in your dataset root in\n {classes}")
203-
modes = ['train', 'test']
220+
assert clas in classes, info(
221+
f"Make sure your class: '{clas}' in your dataset root in\n {classes}"
222+
)
223+
modes = ["train", "test"]
204224
cls_root = input_dir
205225
for mode in modes:
206226
check_old_txt(cls_root, mode)
207227
cats = os.listdir(os.path.join(cls_root, mode))
208228
for cat in cats:
209229
save_training_txt(cls_root, mode, cat)
210-
info(f"Add train.txt/val.txt successfully for {input_dir}")
230+
info(f"Add train.txt/val.txt successfully for {input_dir}")

paddlex/modules/anomaly_detection/model_list.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,4 @@
1313
# limitations under the License.
1414

1515

16-
MODELS = [
17-
"STFPM"
18-
]
16+
MODELS = ["STFPM"]

paddlex/modules/face_recognition/dataset_checker/dataset_src/check_dataset.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ def check_train(dataset_dir, output, sample_num=10):
9999
attrs["train_sample_paths"] = sample_paths
100100
return attrs
101101

102+
102103
def check_val(dataset_dir, output, sample_num=10):
103104
"""check dataset"""
104105
dataset_dir = osp.abspath(dataset_dir)

0 commit comments

Comments
 (0)