Skip to content

Commit 499cb0c

Browse files
committed
fix npy empty
1 parent ff64086 commit 499cb0c

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

CHANGELOG.MD

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#版本更改记录
2+
## fix: npy empty
3+
增加npy文件验证机制
24
## amend: amend file format
35
数据过滤输入由npy路径修订为图片路径
46
## V1.0.1.1版本 2021.12.14

filter_func.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ def filter_opt(base_list_file, ext_list_file, extend_thresh):
2626
flat_pca_aray = np.array(pca_array).flatten().tolist()
2727
base_features.append(flat_pca_aray)
2828

29+
if len(base_features) == 0:
30+
print('base_features is empty!')
31+
return [], []
32+
2933
np_base_features = np.array(base_features)
3034
for index_ext, ext_file in tqdm(enumerate(ext_npy_list), total=len(ext_npy_list)):
3135
if not os.path.exists(ext_file):

0 commit comments

Comments
 (0)