Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleClas
提交
63cf3ba4
P
PaddleClas
项目概览
PaddlePaddle
/
PaddleClas
大约 1 年 前同步成功
通知
115
Star
4999
Fork
1114
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
19
列表
看板
标记
里程碑
合并请求
6
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleClas
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
19
Issue
19
列表
看板
标记
里程碑
合并请求
6
合并请求
6
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
63cf3ba4
编写于
6月 10, 2021
作者:
L
littletomatodonkey
提交者:
GitHub
6月 10, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix imread (#824)
* fix imread * rm unused decode * rm decode
上级
a59ac4fb
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
134 addition
and
65 deletion
+134
-65
ppcls/configs/Cartoonface/ResNet50_icartoon.yaml
ppcls/configs/Cartoonface/ResNet50_icartoon.yaml
+39
-30
ppcls/configs/ImageNet/MobileNetV3/MobileNetV3_large_x1_0.yaml
.../configs/ImageNet/MobileNetV3/MobileNetV3_large_x1_0.yaml
+6
-0
ppcls/configs/ImageNet/ResNet/ResNet50.yaml
ppcls/configs/ImageNet/ResNet/ResNet50.yaml
+6
-0
ppcls/configs/Logo/ResNet50_ReID.yaml
ppcls/configs/Logo/ResNet50_ReID.yaml
+35
-26
ppcls/configs/Products/ResNet50_vd_Aliproduct.yaml
ppcls/configs/Products/ResNet50_vd_Aliproduct.yaml
+6
-0
ppcls/configs/Products/ResNet50_vd_Inshop.yaml
ppcls/configs/Products/ResNet50_vd_Inshop.yaml
+9
-0
ppcls/configs/Products/ResNet50_vd_SOP.yaml
ppcls/configs/Products/ResNet50_vd_SOP.yaml
+9
-0
ppcls/configs/Vehicle/ResNet50.yaml
ppcls/configs/Vehicle/ResNet50.yaml
+13
-7
ppcls/configs/Vehicle/ResNet50_ReID.yaml
ppcls/configs/Vehicle/ResNet50_ReID.yaml
+9
-0
ppcls/data/dataloader/common_dataset.py
ppcls/data/dataloader/common_dataset.py
+2
-2
未找到文件。
ppcls/configs/Cartoonface/ResNet50_icartoon.yaml
浏览文件 @
63cf3ba4
...
...
@@ -60,19 +60,22 @@ Optimizer:
DataLoader
:
Train
:
dataset
:
name
:
ICartoonDataset
image_root
:
"
./dataset/iCartoonFace"
cls_label_path
:
"
./dataset/iCartoonFace/train_list.txt"
transform_ops
:
-
RandCropImage
:
size
:
224
-
RandFlipImage
:
flip_code
:
1
-
NormalizeImage
:
scale
:
0.00392157
mean
:
[
0.485
,
0.456
,
0.406
]
std
:
[
0.229
,
0.224
,
0.225
]
order
:
'
'
name
:
ICartoonDataset
image_root
:
"
./dataset/iCartoonFace"
cls_label_path
:
"
./dataset/iCartoonFace/train_list.txt"
transform_ops
:
-
DecodeImage
:
to_rgb
:
True
channel_first
:
False
-
RandCropImage
:
size
:
224
-
RandFlipImage
:
flip_code
:
1
-
NormalizeImage
:
scale
:
0.00392157
mean
:
[
0.485
,
0.456
,
0.406
]
std
:
[
0.229
,
0.224
,
0.225
]
order
:
'
'
sampler
:
name
:
DistributedBatchSampler
#num_instances: 2
...
...
@@ -86,27 +89,30 @@ DataLoader:
Eval
:
Query
:
dataset
:
name
:
ICartoonDataset
image_root
:
"
./dataset/iCartoonFace"
cls_label_path
:
"
./dataset/iCartoonFace/query.txt"
transform_ops
:
-
ResizeImage
:
resize_short
:
256
-
CropImage
:
size
:
224
-
NormalizeImage
:
scale
:
0.00392157
mean
:
[
0.485
,
0.456
,
0.406
]
std
:
[
0.229
,
0.224
,
0.225
]
order
:
'
'
name
:
ICartoonDataset
image_root
:
"
./dataset/iCartoonFace"
cls_label_path
:
"
./dataset/iCartoonFace/query.txt"
transform_ops
:
-
DecodeImage
:
to_rgb
:
True
channel_first
:
False
-
ResizeImage
:
resize_short
:
256
-
CropImage
:
size
:
224
-
NormalizeImage
:
scale
:
0.00392157
mean
:
[
0.485
,
0.456
,
0.406
]
std
:
[
0.229
,
0.224
,
0.225
]
order
:
'
'
sampler
:
name
:
DistributedBatchSampler
batch_size
:
64
drop_last
:
False
shuffle
:
False
loader
:
num_workers
:
6
use_shared_memory
:
Fals
e
num_workers
:
8
use_shared_memory
:
Tru
e
Gallery
:
dataset
:
...
...
@@ -114,6 +120,9 @@ DataLoader:
image_root
:
"
./dataset/iCartoonFace"
cls_label_path
:
"
./dataset/iCartoonFace/gallery.txt"
transform_ops
:
-
DecodeImage
:
to_rgb
:
True
channel_first
:
False
-
ResizeImage
:
resize_short
:
256
-
CropImage
:
...
...
@@ -129,8 +138,8 @@ DataLoader:
drop_last
:
False
shuffle
:
False
loader
:
num_workers
:
6
use_shared_memory
:
Fals
e
num_workers
:
8
use_shared_memory
:
Tru
e
Metric
:
Train
:
...
...
ppcls/configs/ImageNet/MobileNetV3/MobileNetV3_large_x1_0.yaml
浏览文件 @
63cf3ba4
...
...
@@ -49,6 +49,9 @@ DataLoader:
image_root
:
./dataset/ILSVRC2012/
cls_label_path
:
./dataset/ILSVRC2012/train_list.txt
transform_ops
:
-
DecodeImage
:
to_rgb
:
True
channel_first
:
False
-
RandCropImage
:
size
:
224
-
RandFlipImage
:
...
...
@@ -76,6 +79,9 @@ DataLoader:
image_root
:
./dataset/ILSVRC2012/
cls_label_path
:
./dataset/ILSVRC2012/val_list.txt
transform_ops
:
-
DecodeImage
:
to_rgb
:
True
channel_first
:
False
-
ResizeImage
:
resize_short
:
256
-
CropImage
:
...
...
ppcls/configs/ImageNet/ResNet/ResNet50.yaml
浏览文件 @
63cf3ba4
...
...
@@ -50,6 +50,9 @@ DataLoader:
image_root
:
./dataset/ILSVRC2012/
cls_label_path
:
./dataset/ILSVRC2012/train_list.txt
transform_ops
:
-
DecodeImage
:
to_rgb
:
True
channel_first
:
False
-
RandCropImage
:
size
:
224
-
RandFlipImage
:
...
...
@@ -76,6 +79,9 @@ DataLoader:
image_root
:
./dataset/ILSVRC2012/
cls_label_path
:
./dataset/ILSVRC2012/val_list.txt
transform_ops
:
-
DecodeImage
:
to_rgb
:
True
channel_first
:
False
-
ResizeImage
:
resize_short
:
256
-
CropImage
:
...
...
ppcls/configs/Logo/ResNet50_ReID.yaml
浏览文件 @
63cf3ba4
...
...
@@ -65,6 +65,9 @@ DataLoader:
image_root
:
"
dataset/LogoDet-3K-crop/train/"
cls_label_path
:
"
dataset/LogoDet-3K-crop/LogoDet-3K+train.txt"
transform_ops
:
-
DecodeImage
:
to_rgb
:
True
channel_first
:
False
-
ResizeImage
:
size
:
224
-
RandFlipImage
:
...
...
@@ -91,25 +94,28 @@ DataLoader:
Query
:
# TOTO: modify to the latest trainer
dataset
:
name
:
LogoDataset
image_root
:
"
dataset/LogoDet-3K-crop/val/"
cls_label_path
:
"
LogoDet-3K-crop/LogoDet-3K+query.txt"
transform_ops
:
-
ResizeImage
:
size
:
224
-
NormalizeImage
:
scale
:
0.00392157
mean
:
[
0.485
,
0.456
,
0.406
]
std
:
[
0.229
,
0.224
,
0.225
]
order
:
'
'
name
:
LogoDataset
image_root
:
"
dataset/LogoDet-3K-crop/val/"
cls_label_path
:
"
LogoDet-3K-crop/LogoDet-3K+query.txt"
transform_ops
:
-
DecodeImage
:
to_rgb
:
True
channel_first
:
False
-
ResizeImage
:
size
:
224
-
NormalizeImage
:
scale
:
0.00392157
mean
:
[
0.485
,
0.456
,
0.406
]
std
:
[
0.229
,
0.224
,
0.225
]
order
:
'
'
sampler
:
name
:
DistributedBatchSampler
batch_size
:
128
drop_last
:
False
shuffle
:
False
loader
:
num_workers
:
10
use_shared_memory
:
Fals
e
num_workers
:
8
use_shared_memory
:
Tru
e
Gallery
:
# TOTO: modify to the latest trainer
...
...
@@ -118,6 +124,9 @@ DataLoader:
image_root
:
"
dataset/LogoDet-3K-crop/train/"
cls_label_path
:
"
dataset/LogoDet-3K-crop/LogoDet-3K+gallery.txt"
transform_ops
:
-
DecodeImage
:
to_rgb
:
True
channel_first
:
False
-
ResizeImage
:
size
:
224
-
NormalizeImage
:
...
...
@@ -131,8 +140,8 @@ DataLoader:
drop_last
:
False
shuffle
:
False
loader
:
num_workers
:
10
use_shared_memory
:
Fals
e
num_workers
:
8
use_shared_memory
:
Tru
e
Metric
:
Eval
:
...
...
@@ -145,14 +154,14 @@ Infer:
infer_imgs
:
"
docs/images/whl/demo.jpg"
batch_size
:
10
transforms
:
-
DecodeImage
:
to_rgb
:
True
channel_first
:
False
-
ResizeImage
:
resize_short
:
224
-
NormalizeImage
:
scale
:
1.0/255.0
mean
:
[
0.485
,
0.456
,
0.406
]
std
:
[
0.229
,
0.224
,
0.225
]
order
:
'
'
-
ToCHWImage
:
-
DecodeImage
:
to_rgb
:
True
channel_first
:
False
-
ResizeImage
:
resize_short
:
224
-
NormalizeImage
:
scale
:
1.0/255.0
mean
:
[
0.485
,
0.456
,
0.406
]
std
:
[
0.229
,
0.224
,
0.225
]
order
:
'
'
-
ToCHWImage
:
ppcls/configs/Products/ResNet50_vd_Aliproduct.yaml
浏览文件 @
63cf3ba4
...
...
@@ -60,6 +60,9 @@ DataLoader:
image_root
:
./dataset/Aliproduct/
cls_label_path
:
./dataset/Aliproduct/train_list.txt
transform_ops
:
-
DecodeImage
:
to_rgb
:
True
channel_first
:
False
-
ResizeImage
:
size
:
224
-
RandFlipImage
:
...
...
@@ -85,6 +88,9 @@ DataLoader:
image_root
:
./dataset/Aliproduct/
cls_label_path
:
./dataset/Aliproduct/val_list.txt
transform_ops
:
-
DecodeImage
:
to_rgb
:
True
channel_first
:
False
-
ResizeImage
:
resize_short
:
256
-
CropImage
:
...
...
ppcls/configs/Products/ResNet50_vd_Inshop.yaml
浏览文件 @
63cf3ba4
...
...
@@ -74,6 +74,9 @@ DataLoader:
image_root
:
./dataset/Inshop/
cls_label_path
:
./dataset/Inshop/train_list.txt
transform_ops
:
-
DecodeImage
:
to_rgb
:
True
channel_first
:
False
-
ResizeImage
:
size
:
224
-
RandFlipImage
:
...
...
@@ -106,6 +109,9 @@ DataLoader:
image_root
:
./dataset/Inshop/
cls_label_path
:
./dataset/Inshop/query_list.txt
transform_ops
:
-
DecodeImage
:
to_rgb
:
True
channel_first
:
False
-
ResizeImage
:
size
:
224
-
NormalizeImage
:
...
...
@@ -128,6 +134,9 @@ DataLoader:
image_root
:
./dataset/Inshop/
cls_label_path
:
./dataset/Inshop/gallery_list.txt
transform_ops
:
-
DecodeImage
:
to_rgb
:
True
channel_first
:
False
-
ResizeImage
:
size
:
224
-
NormalizeImage
:
...
...
ppcls/configs/Products/ResNet50_vd_SOP.yaml
浏览文件 @
63cf3ba4
...
...
@@ -73,6 +73,9 @@ DataLoader:
image_root
:
./dataset/Stanford_Online_Products/
cls_label_path
:
./dataset/Stanford_Online_Products/train_list.txt
transform_ops
:
-
DecodeImage
:
to_rgb
:
True
channel_first
:
False
-
ResizeImage
:
size
:
224
-
RandFlipImage
:
...
...
@@ -105,6 +108,9 @@ DataLoader:
image_root
:
./dataset/Stanford_Online_Products/
cls_label_path
:
./dataset/Stanford_Online_Products/test_list.txt
transform_ops
:
-
DecodeImage
:
to_rgb
:
True
channel_first
:
False
-
ResizeImage
:
size
:
224
-
NormalizeImage
:
...
...
@@ -127,6 +133,9 @@ DataLoader:
image_root
:
./dataset/Stanford_Online_Products/
cls_label_path
:
./dataset/Stanford_Online_Products/test_list.txt
transform_ops
:
-
DecodeImage
:
to_rgb
:
True
channel_first
:
False
-
ResizeImage
:
size
:
224
-
NormalizeImage
:
...
...
ppcls/configs/Vehicle/ResNet50.yaml
浏览文件 @
63cf3ba4
...
...
@@ -71,6 +71,9 @@ DataLoader:
bbox_crop
:
True
cls_label_path
:
"
/work/dataset/CompCars/train_test_split/classification/train_label.txt"
transform_ops
:
-
DecodeImage
:
to_rgb
:
True
channel_first
:
False
-
ResizeImage
:
size
:
224
-
RandFlipImage
:
...
...
@@ -96,18 +99,21 @@ DataLoader:
drop_last
:
False
shuffle
:
True
loader
:
num_workers
:
6
use_shared_memory
:
Fals
e
num_workers
:
8
use_shared_memory
:
Tru
e
Eval
:
# TOTO: modify to the latest trainer
dataset
:
name
:
"
CompCars"
image_root
:
"
/work/
dataset/CompCars/image/"
label_root
:
"
/work
/dataset/CompCars/label/"
cls_label_path
:
"
/work
/dataset/CompCars/train_test_split/classification/test_label.txt"
image_root
:
"
.
dataset/CompCars/image/"
label_root
:
"
.
/dataset/CompCars/label/"
cls_label_path
:
"
.
/dataset/CompCars/train_test_split/classification/test_label.txt"
bbox_crop
:
True
transform_ops
:
-
DecodeImage
:
to_rgb
:
True
channel_first
:
False
-
ResizeImage
:
size
:
224
-
NormalizeImage
:
...
...
@@ -121,8 +127,8 @@ DataLoader:
drop_last
:
False
shuffle
:
False
loader
:
num_workers
:
6
use_shared_memory
:
Fals
e
num_workers
:
8
use_shared_memory
:
Tru
e
Infer
:
infer_imgs
:
"
docs/images/whl/demo.jpg"
...
...
ppcls/configs/Vehicle/ResNet50_ReID.yaml
浏览文件 @
63cf3ba4
...
...
@@ -69,6 +69,9 @@ DataLoader:
image_root
:
"
/work/dataset/VeRI-Wild/images/"
cls_label_path
:
"
/work/dataset/VeRI-Wild/train_test_split/train_list_start0.txt"
transform_ops
:
-
DecodeImage
:
to_rgb
:
True
channel_first
:
False
-
ResizeImage
:
size
:
224
-
RandFlipImage
:
...
...
@@ -104,6 +107,9 @@ DataLoader:
image_root
:
"
/work/dataset/VeRI-Wild/images"
cls_label_path
:
"
/work/dataset/VeRI-Wild/train_test_split/test_3000_id_query.txt"
transform_ops
:
-
DecodeImage
:
to_rgb
:
True
channel_first
:
False
-
ResizeImage
:
size
:
224
-
NormalizeImage
:
...
...
@@ -127,6 +133,9 @@ DataLoader:
image_root
:
"
/work/dataset/VeRI-Wild/images"
cls_label_path
:
"
/work/dataset/VeRI-Wild/train_test_split/test_3000_id.txt"
transform_ops
:
-
DecodeImage
:
to_rgb
:
True
channel_first
:
False
-
ResizeImage
:
size
:
224
-
NormalizeImage
:
...
...
ppcls/data/dataloader/common_dataset.py
浏览文件 @
63cf3ba4
...
...
@@ -63,8 +63,8 @@ class CommonDataset(Dataset):
def
__getitem__
(
self
,
idx
):
try
:
img
=
cv2
.
imread
(
self
.
images
[
idx
])
img
=
cv2
.
cvtColor
(
img
,
cv2
.
COLOR_BGR2RGB
)
with
open
(
self
.
images
[
idx
],
'rb'
)
as
f
:
img
=
f
.
read
(
)
if
self
.
_transform_ops
:
img
=
transform
(
img
,
self
.
_transform_ops
)
img
=
img
.
transpose
((
2
,
0
,
1
))
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录