Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
magicwindyyd
mindspore
提交
53714427
M
mindspore
项目概览
magicwindyyd
/
mindspore
与 Fork 源项目一致
Fork自
MindSpore / mindspore
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
mindspore
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
53714427
编写于
9月 08, 2020
作者:
E
Eric
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fixes model_zoo with minddata API change
上级
963c5c28
变更
23
隐藏空白更改
内联
并排
Showing
23 changed file
with
29 addition
and
29 deletion
+29
-29
mindspore/dataset/vision/c_transforms.py
mindspore/dataset/vision/c_transforms.py
+1
-1
model_zoo/official/cv/alexnet/src/dataset.py
model_zoo/official/cv/alexnet/src/dataset.py
+1
-1
model_zoo/official/cv/faster_rcnn/src/dataset.py
model_zoo/official/cv/faster_rcnn/src/dataset.py
+1
-1
model_zoo/official/cv/googlenet/src/dataset.py
model_zoo/official/cv/googlenet/src/dataset.py
+1
-1
model_zoo/official/cv/inceptionv3/src/dataset.py
model_zoo/official/cv/inceptionv3/src/dataset.py
+1
-1
model_zoo/official/cv/lenet/src/dataset.py
model_zoo/official/cv/lenet/src/dataset.py
+2
-2
model_zoo/official/cv/lenet_quant/src/dataset.py
model_zoo/official/cv/lenet_quant/src/dataset.py
+2
-2
model_zoo/official/cv/maskrcnn/src/dataset.py
model_zoo/official/cv/maskrcnn/src/dataset.py
+1
-1
model_zoo/official/cv/mobilenetv2/src/dataset.py
model_zoo/official/cv/mobilenetv2/src/dataset.py
+1
-1
model_zoo/official/cv/mobilenetv2_quant/src/dataset.py
model_zoo/official/cv/mobilenetv2_quant/src/dataset.py
+3
-3
model_zoo/official/cv/mobilenetv3/src/dataset.py
model_zoo/official/cv/mobilenetv3/src/dataset.py
+1
-1
model_zoo/official/cv/nasnet/src/dataset.py
model_zoo/official/cv/nasnet/src/dataset.py
+1
-1
model_zoo/official/cv/resnet/src/dataset.py
model_zoo/official/cv/resnet/src/dataset.py
+1
-1
model_zoo/official/cv/resnet50_quant/src/dataset.py
model_zoo/official/cv/resnet50_quant/src/dataset.py
+3
-3
model_zoo/official/cv/resnet_thor/src/dataset.py
model_zoo/official/cv/resnet_thor/src/dataset.py
+1
-1
model_zoo/official/cv/resnext50/src/dataset.py
model_zoo/official/cv/resnext50/src/dataset.py
+1
-1
model_zoo/official/cv/shufflenetv2/src/dataset.py
model_zoo/official/cv/shufflenetv2/src/dataset.py
+1
-1
model_zoo/official/cv/ssd/src/dataset.py
model_zoo/official/cv/ssd/src/dataset.py
+1
-1
model_zoo/official/cv/vgg16/src/dataset.py
model_zoo/official/cv/vgg16/src/dataset.py
+1
-1
model_zoo/official/cv/warpctc/src/dataset.py
model_zoo/official/cv/warpctc/src/dataset.py
+1
-1
model_zoo/official/cv/yolov3_darknet53/src/yolo_dataset.py
model_zoo/official/cv/yolov3_darknet53/src/yolo_dataset.py
+1
-1
model_zoo/official/cv/yolov3_darknet53_quant/src/yolo_dataset.py
...oo/official/cv/yolov3_darknet53_quant/src/yolo_dataset.py
+1
-1
model_zoo/official/cv/yolov3_resnet18/src/dataset.py
model_zoo/official/cv/yolov3_resnet18/src/dataset.py
+1
-1
未找到文件。
mindspore/dataset/vision/c_transforms.py
浏览文件 @
53714427
...
...
@@ -26,7 +26,7 @@ to improve their training models.
>>> import mindspore.dataset as ds
>>> import mindspore.dataset.transforms.c_transforms as c_transforms
>>> import mindspore.dataset.vision.c_transforms as c_vision
>>> from mindspore.dataset.
transforms.
vision.utils import Border, ImageBatchFormat, Inter
>>> from mindspore.dataset.vision.utils import Border, ImageBatchFormat, Inter
>>> dataset_dir = "path/to/imagefolder_directory"
>>> # create a dataset that reads all files in dataset_dir with 8 threads
...
...
model_zoo/official/cv/alexnet/src/dataset.py
浏览文件 @
53714427
...
...
@@ -18,7 +18,7 @@ Produce the dataset
import
mindspore.dataset
as
ds
import
mindspore.dataset.transforms.c_transforms
as
C
import
mindspore.dataset.
transforms.
vision.c_transforms
as
CV
import
mindspore.dataset.vision.c_transforms
as
CV
from
mindspore.common
import
dtype
as
mstype
from
.config
import
alexnet_cfg
as
cfg
...
...
model_zoo/official/cv/faster_rcnn/src/dataset.py
浏览文件 @
53714427
...
...
@@ -22,7 +22,7 @@ from numpy import random
import
mmcv
import
mindspore.dataset
as
de
import
mindspore.dataset.
transforms.
vision.c_transforms
as
C
import
mindspore.dataset.vision.c_transforms
as
C
import
mindspore.dataset.transforms.c_transforms
as
CC
import
mindspore.common.dtype
as
mstype
from
mindspore.mindrecord
import
FileWriter
...
...
model_zoo/official/cv/googlenet/src/dataset.py
浏览文件 @
53714427
...
...
@@ -20,7 +20,7 @@ import os
import
mindspore.common.dtype
as
mstype
import
mindspore.dataset
as
ds
import
mindspore.dataset.transforms.c_transforms
as
C
import
mindspore.dataset.
transforms.
vision.c_transforms
as
vision
import
mindspore.dataset.vision.c_transforms
as
vision
from
src.config
import
cifar_cfg
as
cfg
...
...
model_zoo/official/cv/inceptionv3/src/dataset.py
浏览文件 @
53714427
...
...
@@ -18,7 +18,7 @@ Data operations, will be used in train.py and eval.py
import
mindspore.common.dtype
as
mstype
import
mindspore.dataset.engine
as
de
import
mindspore.dataset.transforms.c_transforms
as
C2
import
mindspore.dataset.
transforms.
vision.c_transforms
as
C
import
mindspore.dataset.vision.c_transforms
as
C
from
src.config
import
config_gpu
as
cfg
...
...
model_zoo/official/cv/lenet/src/dataset.py
浏览文件 @
53714427
...
...
@@ -17,9 +17,9 @@ Produce the dataset
"""
import
mindspore.dataset
as
ds
import
mindspore.dataset.
transforms.
vision.c_transforms
as
CV
import
mindspore.dataset.vision.c_transforms
as
CV
import
mindspore.dataset.transforms.c_transforms
as
C
from
mindspore.dataset.
transforms.
vision
import
Inter
from
mindspore.dataset.vision
import
Inter
from
mindspore.common
import
dtype
as
mstype
...
...
model_zoo/official/cv/lenet_quant/src/dataset.py
浏览文件 @
53714427
...
...
@@ -17,9 +17,9 @@ Produce the dataset
"""
import
mindspore.dataset
as
ds
import
mindspore.dataset.
transforms.
vision.c_transforms
as
CV
import
mindspore.dataset.vision.c_transforms
as
CV
import
mindspore.dataset.transforms.c_transforms
as
C
from
mindspore.dataset.
transforms.
vision
import
Inter
from
mindspore.dataset.vision
import
Inter
from
mindspore.common
import
dtype
as
mstype
...
...
model_zoo/official/cv/maskrcnn/src/dataset.py
浏览文件 @
53714427
...
...
@@ -22,7 +22,7 @@ from numpy import random
import
mmcv
import
mindspore.dataset
as
de
import
mindspore.dataset.
transforms.
vision.c_transforms
as
C
import
mindspore.dataset.vision.c_transforms
as
C
from
mindspore.mindrecord
import
FileWriter
from
src.config
import
config
import
cv2
...
...
model_zoo/official/cv/mobilenetv2/src/dataset.py
浏览文件 @
53714427
...
...
@@ -23,7 +23,7 @@ from mindspore import Tensor
from
mindspore.train.model
import
Model
import
mindspore.common.dtype
as
mstype
import
mindspore.dataset.engine
as
de
import
mindspore.dataset.
transforms.
vision.c_transforms
as
C
import
mindspore.dataset.vision.c_transforms
as
C
import
mindspore.dataset.transforms.c_transforms
as
C2
...
...
model_zoo/official/cv/mobilenetv2_quant/src/dataset.py
浏览文件 @
53714427
...
...
@@ -19,9 +19,9 @@ import os
from
functools
import
partial
import
mindspore.common.dtype
as
mstype
import
mindspore.dataset.engine
as
de
import
mindspore.dataset.
transforms.
vision.c_transforms
as
C
import
mindspore.dataset.vision.c_transforms
as
C
import
mindspore.dataset.transforms.c_transforms
as
C2
import
mindspore.dataset.transforms.py_transforms
import
mindspore.dataset.transforms.py_transforms
as
P2
import
mindspore.dataset.vision.py_transforms
as
P
...
...
@@ -150,7 +150,7 @@ def create_dataset_py(dataset_path, do_train, config, device_target, repeat_num=
else
:
trans
=
[
decode_op
,
resize_op
,
center_crop
,
to_tensor
,
normalize_op
]
compose
=
mindspore
.
dataset
.
transforms
.
py_transforms
.
Compose
(
trans
)
compose
=
P2
.
Compose
(
trans
)
ds
=
ds
.
map
(
input_columns
=
"image"
,
operations
=
compose
,
num_parallel_workers
=
8
,
python_multiprocessing
=
True
)
...
...
model_zoo/official/cv/mobilenetv3/src/dataset.py
浏览文件 @
53714427
...
...
@@ -17,7 +17,7 @@ create train or eval dataset.
"""
import
mindspore.common.dtype
as
mstype
import
mindspore.dataset.engine
as
de
import
mindspore.dataset.
transforms.
vision.c_transforms
as
C
import
mindspore.dataset.vision.c_transforms
as
C
import
mindspore.dataset.transforms.c_transforms
as
C2
...
...
model_zoo/official/cv/nasnet/src/dataset.py
浏览文件 @
53714427
...
...
@@ -18,7 +18,7 @@ Data operations, will be used in train.py and eval.py
import
mindspore.common.dtype
as
mstype
import
mindspore.dataset.engine
as
de
import
mindspore.dataset.transforms.c_transforms
as
C2
import
mindspore.dataset.
transforms.
vision.c_transforms
as
C
import
mindspore.dataset.vision.c_transforms
as
C
def
create_dataset
(
dataset_path
,
config
,
do_train
,
repeat_num
=
1
):
...
...
model_zoo/official/cv/resnet/src/dataset.py
浏览文件 @
53714427
...
...
@@ -18,7 +18,7 @@ create train or eval dataset.
import
os
import
mindspore.common.dtype
as
mstype
import
mindspore.dataset.engine
as
de
import
mindspore.dataset.
transforms.
vision.c_transforms
as
C
import
mindspore.dataset.vision.c_transforms
as
C
import
mindspore.dataset.transforms.c_transforms
as
C2
from
mindspore.communication.management
import
init
,
get_rank
,
get_group_size
...
...
model_zoo/official/cv/resnet50_quant/src/dataset.py
浏览文件 @
53714427
...
...
@@ -19,9 +19,9 @@ import os
from
functools
import
partial
import
mindspore.common.dtype
as
mstype
import
mindspore.dataset.engine
as
de
import
mindspore.dataset.transforms.vision.c_transforms
as
C
import
mindspore.dataset.transforms.c_transforms
as
C2
import
mindspore.dataset.transforms.py_transforms
import
mindspore.dataset.vision.c_transforms
as
C
import
mindspore.dataset.transforms.py_transforms
as
P2
import
mindspore.dataset.vision.py_transforms
as
P
from
mindspore.communication.management
import
init
,
get_rank
,
get_group_size
from
src.config
import
config_quant
...
...
@@ -146,7 +146,7 @@ def create_dataset_py(dataset_path, do_train, repeat_num=1, batch_size=32, targe
else
:
trans
=
[
decode_op
,
resize_op
,
center_crop
,
to_tensor
,
normalize_op
]
compose
=
mindspore
.
dataset
.
transforms
.
py_transforms
.
Compose
(
trans
)
compose
=
P2
.
Compose
(
trans
)
ds
=
ds
.
map
(
input_columns
=
"image"
,
operations
=
compose
,
num_parallel_workers
=
8
,
python_multiprocessing
=
True
)
# apply batch operations
...
...
model_zoo/official/cv/resnet_thor/src/dataset.py
浏览文件 @
53714427
...
...
@@ -18,7 +18,7 @@ create train or eval dataset.
import
os
import
mindspore.common.dtype
as
mstype
import
mindspore.dataset.engine
as
de
import
mindspore.dataset.
transforms.
vision.c_transforms
as
C
import
mindspore.dataset.vision.c_transforms
as
C
import
mindspore.dataset.transforms.c_transforms
as
C2
from
mindspore.communication.management
import
init
,
get_rank
,
get_group_size
...
...
model_zoo/official/cv/resnext50/src/dataset.py
浏览文件 @
53714427
...
...
@@ -19,7 +19,7 @@ import os
from
mindspore.common
import
dtype
as
mstype
import
mindspore.dataset
as
de
import
mindspore.dataset.transforms.c_transforms
as
C
import
mindspore.dataset.
transforms.
vision.c_transforms
as
V_C
import
mindspore.dataset.vision.c_transforms
as
V_C
from
PIL
import
Image
,
ImageFile
from
src.utils.sampler
import
DistributedSampler
...
...
model_zoo/official/cv/shufflenetv2/src/dataset.py
浏览文件 @
53714427
...
...
@@ -21,7 +21,7 @@ from src.config import config_gpu as cfg
import
mindspore.common.dtype
as
mstype
import
mindspore.dataset.engine
as
de
import
mindspore.dataset.transforms.c_transforms
as
C2
import
mindspore.dataset.
transforms.
vision.c_transforms
as
C
import
mindspore.dataset.vision.c_transforms
as
C
class
toBGR
():
...
...
model_zoo/official/cv/ssd/src/dataset.py
浏览文件 @
53714427
...
...
@@ -24,7 +24,7 @@ import numpy as np
import
cv2
import
mindspore.dataset
as
de
import
mindspore.dataset.
transforms.
vision.c_transforms
as
C
import
mindspore.dataset.vision.c_transforms
as
C
from
mindspore.mindrecord
import
FileWriter
from
.config
import
config
from
.box_utils
import
jaccard_numpy
,
ssd_bboxes_encode
...
...
model_zoo/official/cv/vgg16/src/dataset.py
浏览文件 @
53714427
...
...
@@ -19,7 +19,7 @@ import os
from
mindspore.common
import
dtype
as
mstype
import
mindspore.dataset
as
de
import
mindspore.dataset.transforms.c_transforms
as
C
import
mindspore.dataset.
transforms.
vision.c_transforms
as
vision
import
mindspore.dataset.vision.c_transforms
as
vision
from
PIL
import
Image
,
ImageFile
from
src.utils.sampler
import
DistributedSampler
...
...
model_zoo/official/cv/warpctc/src/dataset.py
浏览文件 @
53714427
...
...
@@ -19,7 +19,7 @@ import numpy as np
import
mindspore.common.dtype
as
mstype
import
mindspore.dataset.engine
as
de
import
mindspore.dataset.transforms.c_transforms
as
c
import
mindspore.dataset.
transforms.
vision.c_transforms
as
vc
import
mindspore.dataset.vision.c_transforms
as
vc
from
PIL
import
Image
from
src.config
import
config
as
cf
...
...
model_zoo/official/cv/yolov3_darknet53/src/yolo_dataset.py
浏览文件 @
53714427
...
...
@@ -19,7 +19,7 @@ import multiprocessing
from
PIL
import
Image
from
pycocotools.coco
import
COCO
import
mindspore.dataset
as
de
import
mindspore.dataset.
transforms.
vision.c_transforms
as
CV
import
mindspore.dataset.vision.c_transforms
as
CV
from
src.distributed_sampler
import
DistributedSampler
from
src.transforms
import
reshape_fn
,
MultiScaleTrans
...
...
model_zoo/official/cv/yolov3_darknet53_quant/src/yolo_dataset.py
浏览文件 @
53714427
...
...
@@ -18,7 +18,7 @@ import os
from
PIL
import
Image
from
pycocotools.coco
import
COCO
import
mindspore.dataset
as
de
import
mindspore.dataset.
transforms.
vision.c_transforms
as
CV
import
mindspore.dataset.vision.c_transforms
as
CV
from
src.distributed_sampler
import
DistributedSampler
from
src.transforms
import
reshape_fn
,
MultiScaleTrans
...
...
model_zoo/official/cv/yolov3_resnet18/src/dataset.py
浏览文件 @
53714427
...
...
@@ -22,7 +22,7 @@ from matplotlib.colors import rgb_to_hsv, hsv_to_rgb
from
PIL
import
Image
import
mindspore.dataset
as
de
from
mindspore.mindrecord
import
FileWriter
import
mindspore.dataset.
transforms.
vision.c_transforms
as
C
import
mindspore.dataset.vision.c_transforms
as
C
from
src.config
import
ConfigYOLOV3ResNet18
iter_cnt
=
0
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录