Skip to content

  • 体验新版
    • 正在加载...
  • 登录
  • PaddlePaddle
  • PaddleDetection
  • Issue
  • #945

P
PaddleDetection
  • 项目概览

PaddlePaddle / PaddleDetection
大约 2 年 前同步成功

通知 708
Star 11112
Fork 2696
  • 代码
    • 文件
    • 提交
    • 分支
    • Tags
    • 贡献者
    • 分支图
    • Diff
  • Issue 184
    • 列表
    • 看板
    • 标记
    • 里程碑
  • 合并请求 40
  • Wiki 0
    • Wiki
  • 分析
    • 仓库
    • DevOps
  • 项目成员
  • Pages
P
PaddleDetection
  • 项目概览
    • 项目概览
    • 详情
    • 发布
  • 仓库
    • 仓库
    • 文件
    • 提交
    • 分支
    • 标签
    • 贡献者
    • 分支图
    • 比较
  • Issue 184
    • Issue 184
    • 列表
    • 看板
    • 标记
    • 里程碑
  • 合并请求 40
    • 合并请求 40
  • Pages
  • 分析
    • 分析
    • 仓库分析
    • DevOps
  • Wiki 0
    • Wiki
  • 成员
    • 成员
  • 收起侧边栏
  • 动态
  • 分支图
  • 创建新Issue
  • 提交
  • Issue看板
已关闭
开放中
Opened 6月 15, 2020 by saxon_zh@saxon_zhGuest

数据增强报错

Created by: ljx111

两个数据增强操作RandomDistort 、ExpandImage加上后报错,请问一下这是什么问题导致的? 以下是部分配置信息:

TrainReader:
  inputs_def:
    fields: ['image', 'im_info', 'im_id', 'gt_bbox', 'gt_class', 'is_crowd']
  dataset:
    !PolypsDataSet
    image_dir: image_train
    anno_path: label_train__.txt
    dataset_dir: dataset/polyps/data
  sample_transforms:
  - !DecodeImage
    to_rgb: true
  - !NormalizeImage
    is_channel_first: false
    is_scale: true
    mean: [0.485,0.456,0.406]
    std: [0.229, 0.224,0.225]
  - !ResizeImage
    target_size: 512
    max_size: 1333
    interp: 1
    use_cv2: true
  - !RandomFlipImage
    prob: 0.5
  - !RandomDistort ###
    brightness_lower: 0.75
    brightness_upper: 1.5
    contrast_lower: 0.75
    contrast_upper: 1.5
    saturation_lower: 0.5
    saturation_upper: 1.5
    hue_lower: -18
    hue_upper: 18
    brightness_prob: 0.5
    contrast_prob: 0.5
    saturation_prob: 0.5 
    hue_prob: 0.5
    count: 4
    is_order: False
  - !ExpandImage ###
    max_ratio: 1.25
    mean: [123.675, 116.28, 103.53]
    prob: 0.5
  - !RandomCrop
    aspect_ratio: [.5, 2.]
    thresholds: [.0, .1, .3, .5, .7, .9]
    scaling: [.3, 1.]
  - !MixupImage
    alpha: 1.5
    beta: 1.5
  - !Permute
    to_bgr: false
    channel_first: true
  batch_transforms:
  - !PadBatch
    pad_to_stride: 32
    use_padded_im_info: false
  batch_size: 16
  shuffle: true
  worker_num: 2
  use_process: false


以下是报名信息:
2020-06-14 23:50:30,323-INFO: places would be ommited when DataLoader is not iterable
W0614 23:50:31.137933  1011 device_context.cc:237] Please NOTE: device: 0, CUDA Capability: 70, Driver API Version: 10.1, Runtime API Version: 9.0
W0614 23:50:31.141782  1011 device_context.cc:245] device: 0, cuDNN Version: 7.3.
2020-06-14 23:50:32,759-INFO: Load model and fuse batch norm if have from http://paddle-imagenet-models-name.bj.bcebos.com/ResNet101_pretrained.tar...
2020-06-14 23:50:32,759-INFO: Found /home/aistudio/.cache/paddle/weights/ResNet101_pretrained
2020-06-14 23:50:32,767-INFO: Loading parameters from /home/aistudio/.cache/paddle/weights/ResNet101_pretrained...
2020-06-14 23:50:32,768-WARNING: /home/aistudio/.cache/paddle/weights/ResNet101_pretrained.pdparams not found, try to load model file saved with [ save_params, save_persistables, save_vars ]
2020-06-14 23:50:32,768-WARNING: /home/aistudio/.cache/paddle/weights/ResNet101_pretrained.pdparams not found, try to load model file saved with [ save_params, save_persistables, save_vars ]
2020-06-14 23:50:32,778-WARNING: variable file [ /home/aistudio/.cache/paddle/weights/ResNet101_pretrained/fc_0.w_0 /home/aistudio/.cache/paddle/weights/ResNet101_pretrained/fc_0.b_0 ] not used
2020-06-14 23:50:32,778-WARNING: variable file [ /home/aistudio/.cache/paddle/weights/ResNet101_pretrained/fc_0.w_0 /home/aistudio/.cache/paddle/weights/ResNet101_pretrained/fc_0.b_0 ] not used
2020-06-14 23:50:33,142-INFO: places would be ommited when DataLoader is not iterable
I0614 23:50:33.165014  1011 parallel_executor.cc:440] The Program will be executed on CUDA using ParallelExecutor, 1 cards are used, so 1 programs are executed in parallel.
I0614 23:50:33.210036  1011 build_strategy.cc:365] SeqOnlyAllReduceOps:0, num_trainers:1
I0614 23:50:33.329967  1011 parallel_executor.cc:307] Inplace strategy is enabled, when build_strategy.enable_inplace = True
I0614 23:50:33.363153  1011 parallel_executor.cc:375] Garbage collection strategy is enabled, when FLAGS_eager_delete_tensor_gb = 0
2020-06-14 23:50:33,391-INFO: fail to map op [RandomDistort_67107d] with error: Cannot handle this data type and stack:
Traceback (most recent call last):
  File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/PIL/Image.py", line 2645, in fromarray
    mode, rawmode = _fromarray_typemap[typekey]
KeyError: ((1, 1, 3), '<f4')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/aistudio/work/PaddleDetection/ppdet/data/reader.py", line 45, in __call__
    data = f(data, ctx)
  File "/home/aistudio/work/PaddleDetection/ppdet/data/transform/operators.py", line 597, in __call__
    im = Image.fromarray(im)
  File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/PIL/Image.py", line 2647, in fromarray
    raise TypeError("Cannot handle this data type")
TypeError: Cannot handle this data type

2020-06-14 23:50:33,392-WARNING: recv endsignal from outq with errmsg[consumer[consumer-1ea-1] failed to map with error:[Cannot handle this data type]]
2020-06-14 23:50:33,392-INFO: fail to map op [RandomDistort_67107d] with error: Cannot handle this data type and stack:
Traceback (most recent call last):
  File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/PIL/Image.py", line 2645, in fromarray
    mode, rawmode = _fromarray_typemap[typekey]
KeyError: ((1, 1, 3), '<f4')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/aistudio/work/PaddleDetection/ppdet/data/reader.py", line 45, in __call__
    data = f(data, ctx)
  File "/home/aistudio/work/PaddleDetection/ppdet/data/transform/operators.py", line 597, in __call__
    im = Image.fromarray(im)
  File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/PIL/Image.py", line 2647, in fromarray
    raise TypeError("Cannot handle this data type")
TypeError: Cannot handle this data type
指派人
分配到
无
里程碑
无
分配里程碑
工时统计
无
截止日期
无
标识: paddlepaddle/PaddleDetection#945
渝ICP备2023009037号

京公网安备11010502055752号

网络110报警服务 Powered by GitLab CE v13.7
开源知识
Git 入门 Pro Git 电子书 在线学 Git
Markdown 基础入门 IT 技术知识开源图谱
帮助
使用手册 反馈建议 博客
《GitCode 隐私声明》 《GitCode 服务条款》 关于GitCode
Powered by GitLab CE v13.7