Code Monkey home page Code Monkey logo

Comments (5)

qingqing01 avatar qingqing01 commented on May 22, 2024

@shuxsu 可以的,比如 SSD的config中 https://github.com/PaddlePaddle/PaddleDetection/blob/release/0.1/configs/ssd/ssd_vgg16_300.yml#L139 :

SSDTestFeed:
  batch_size: 1
  dataset:
    annotation: dataset/coco/annotations/instances_val2017.json
  image_shape: [3, 300, 300]
  sample_transforms:
  - !DecodeImage
    to_rgb: true
    with_mixup: false
  - !ResizeImage
    interp: 1
    max_size: 0
    target_size: 300
    use_cv2: false
  - !Permute
    to_bgr: false
  - !NormalizeImage
    is_scale: false
    mean: [104, 117, 123]
    std: [1, 1, 1]

from paddledetection.

shuxsu avatar shuxsu commented on May 22, 2024

@shuxsu 可以的,比如 SSD的config中 https://github.com/PaddlePaddle/PaddleDetection/blob/release/0.1/configs/ssd/ssd_vgg16_300.yml#L139 :

SSDTestFeed:
  batch_size: 1
  dataset:
    annotation: dataset/coco/annotations/instances_val2017.json
  image_shape: [3, 300, 300]
  sample_transforms:
  - !DecodeImage
    to_rgb: true
    with_mixup: false
  - !ResizeImage
    interp: 1
    max_size: 0
    target_size: 300
    use_cv2: false
  - !Permute
    to_bgr: false
  - !NormalizeImage
    is_scale: false
    mean: [104, 117, 123]
    std: [1, 1, 1]

配置信息如下:

MaskRCNNTestFeed:
  batch_size: 1
  dataset:
   annotation: /home/shuxsu/models-develop/PaddleCV/PaddleDetection/dataset/coco/annotations/instance_val.json
  image_shape: [3, 2048,1024]
  sample_transforms:
    - !DecodeImage
     to_rgb: true  # default: true
     with_mixup: false  # default: false
   - !ResizeImage
      interp: 1
      max_size: 1333
      target_size: 800
      use_cv2: true  # default: true

报错信息如下:

 UserWarning: The following exception is not an EOF exception.
  "The following exception is not an EOF exception.")
Traceback (most recent call last):
  File "infer.py", line 270, in <module>
    main()
  File "infer.py", line 184, in main
    return_numpy=False)
  File "/home/shuxsu/anaconda3/lib/python3.7/site-packages/paddle/fluid/executor.py", line 775, in run
    six.reraise(*sys.exc_info())
  File "/home/shuxsu/anaconda3/lib/python3.7/site-packages/six.py", line 693, in reraise
    raise value
  File "/home/shuxsu/anaconda3/lib/python3.7/site-packages/paddle/fluid/executor.py", line 770, in run
    use_program_cache=use_program_cache)
  File "/home/shuxsu/anaconda3/lib/python3.7/site-packages/paddle/fluid/executor.py", line 817, in _run_impl
    use_program_cache=use_program_cache)
  File "/home/shuxsu/anaconda3/lib/python3.7/site-packages/paddle/fluid/executor.py", line 894, in _run_program
    fetch_var_name)
paddle.fluid.core_avx.EnforceNotMet: 

--------------------------------------------
C++ Call Stacks (More useful to developers):
--------------------------------------------
0   std::string paddle::platform::GetTraceBackString<std::string const&>(std::string const&, char const*, int)
1   paddle::platform::EnforceNotMet::EnforceNotMet(std::string const&, char const*, int)
2   paddle::operators::ConvOp::InferShape(paddle::framework::InferShapeContext*) const
3   paddle::framework::OperatorWithKernel::RunImpl(paddle::framework::Scope const&, boost::variant<paddle::platform::CUDAPlace, paddle::platform::CPUPlace, paddle::platform::CUDAPinnedPlace, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_> const&, paddle::framework::RuntimeContext*) const
4   paddle::framework::OperatorWithKernel::RunImpl(paddle::framework::Scope const&, boost::variant<paddle::platform::CUDAPlace, paddle::platform::CPUPlace, paddle::platform::CUDAPinnedPlace, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_> const&) const
5   paddle::framework::OperatorBase::Run(paddle::framework::Scope const&, boost::variant<paddle::platform::CUDAPlace, paddle::platform::CPUPlace, paddle::platform::CUDAPinnedPlace, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_> const&)
6   paddle::framework::Executor::RunPreparedContext(paddle::framework::ExecutorPrepareContext*, paddle::framework::Scope*, bool, bool, bool)
7   paddle::framework::Executor::Run(paddle::framework::ProgramDesc const&, paddle::framework::Scope*, int, bool, bool, std::vector<std::string, std::allocator<std::string> > const&, bool)

------------------------------------------
Python Call Stacks (More useful to users):
------------------------------------------
  File "/home/shuxsu/anaconda3/lib/python3.7/site-packages/paddle/fluid/framework.py", line 2423, in append_op
    attrs=kwargs.get("attrs", None))
  File "/home/shuxsu/anaconda3/lib/python3.7/site-packages/paddle/fluid/layer_helper.py", line 43, in append_op
    return self.main_program.current_block().append_op(*args, **kwargs)
  File "/home/shuxsu/anaconda3/lib/python3.7/site-packages/paddle/fluid/layers/nn.py", line 2800, in conv2d
    "data_format": data_format,
  File "/home/shuxsu/models-develop/PaddleCV/PaddleDetection/ppdet/modeling/backbones/resnet.py", line 138, in _conv_norm
    name=_name + '.conv2d.output.1')
  File "/home/shuxsu/models-develop/PaddleCV/PaddleDetection/ppdet/modeling/backbones/resnet.py", line 380, in c1_stage
    name=_name)
  File "/home/shuxsu/models-develop/PaddleCV/PaddleDetection/ppdet/modeling/backbones/resnet.py", line 401, in __call__
    res = self.c1_stage(res)
  File "/home/shuxsu/models-develop/PaddleCV/PaddleDetection/ppdet/modeling/architectures/mask_rcnn.py", line 88, in build
    body_feats = self.backbone(im)
  File "/home/shuxsu/models-develop/PaddleCV/PaddleDetection/ppdet/modeling/architectures/mask_rcnn.py", line 285, in test
    return self.build(feed_vars, 'test')
  File "infer.py", line 132, in main
    test_fetches = model.test(feed_vars)
  File "infer.py", line 270, in <module>
    main()

----------------------
Error Message Summary:
----------------------
PaddleCheckError: Expected input_channels == filter_dims[1] * groups, but received input_channels:666 != filter_dims[1] * groups:3.
ShapeError: The number of input channels should be equal to filter channels * groups. But received: the input channels is [666], the shapeof input is [1, 666, 1333, 3], the filter channel is [3], the shape of filter is [64, 3, 7, 7],the groups is [1] at [/paddle/paddle/fluid/operators/conv_op.cc:90]
  [operator < conv2d > error]
terminate called without an active exception
W1203 12:19:14.752770 21342 init.cc:212] *** Aborted at 1575346754 (unix time) try "date -d @1575346754" if you are using GNU date ***
W1203 12:19:14.757767 21342 init.cc:212] PC: @                0x0 (unknown)
W1203 12:19:14.757959 21342 init.cc:212] *** SIGABRT (@0x3e800005352) received by PID 21330 (TID 0x7faa18d96700) from PID 21330; stack trace: ***
W1203 12:19:14.762604 21342 init.cc:212]     @     0x7faa6a747890 (unknown)
W1203 12:19:14.765628 21342 init.cc:212]     @     0x7faa6a382e97 gsignal
W1203 12:19:14.768391 21342 init.cc:212]     @     0x7faa6a384801 abort
W1203 12:19:14.770934 21342 init.cc:212]     @     0x7faa58c4284a __gnu_cxx::__verbose_terminate_handler()
W1203 12:19:14.772892 21342 init.cc:212]     @     0x7faa58c40f47 __cxxabiv1::__terminate()
W1203 12:19:14.774785 21342 init.cc:212]     @     0x7faa58c40f7d std::terminate()
W1203 12:19:14.776237 21342 init.cc:212]     @     0x7faa58c40c5a __gxx_personality_v0
W1203 12:19:14.778208 21342 init.cc:212]     @     0x7faa681e6b97 _Unwind_ForcedUnwind_Phase2
W1203 12:19:14.781105 21342 init.cc:212]     @     0x7faa681e6e7d _Unwind_ForcedUnwind
W1203 12:19:14.782873 21342 init.cc:212]     @     0x7faa6a745f10 __GI___pthread_unwind
W1203 12:19:14.784462 21342 init.cc:212]     @     0x7faa6a73dae5 __pthread_exit
W1203 12:19:14.784979 21342 init.cc:212]     @     0x56480c4bce59 PyThread_exit_thread
W1203 12:19:14.785101 21342 init.cc:212]     @     0x56480c342c17 PyEval_RestoreThread.cold.798
W1203 12:19:14.785704 21342 init.cc:212]     @     0x7faa55354b27 pyopencv_cv_imdecode()
W1203 12:19:14.786296 21342 init.cc:212]     @     0x56480c43e744 _PyMethodDef_RawFastCallKeywords
W1203 12:19:14.786861 21342 init.cc:212]     @     0x56480c43e861 _PyCFunction_FastCallKeywords
W1203 12:19:14.787427 21342 init.cc:212]     @     0x56480c4aa2bd _PyEval_EvalFrameDefault
W1203 12:19:14.787945 21342 

from paddledetection.

qingqing01 avatar qingqing01 commented on May 22, 2024

错误信息提示:

ShapeError: The number of input channels should be equal to filter channels * groups. But received: the input channels is [666], the shapeof input is [1, 666, 1333, 3], the filter channel is [3], the shape of filter is [64, 3, 7, 7],the groups is [1] at [/paddle/paddle/fluid/operators/conv_op.cc:90]
[operator < conv2d > error]

表示conv层输入的shape是[1, 666, 1333, 3],而期望的输入数据channel是3,所以是没有数据的Permute,需要在config里加入Permute操作:

  sample_transforms:
  - !DecodeImage
    to_rgb: true
    with_mixup: false
  - !NormalizeImage
    is_channel_first: false
    is_scale: true
    mean: [0.485,0.456,0.406]
    std: [0.229, 0.224,0.225]
  - !ResizeImage
    interp: 1
    max_size: 1333
    target_size: 800
    use_cv2: true
  - !Permute
    channel_first: true
    to_bgr: false

from paddledetection.

qingqing01 avatar qingqing01 commented on May 22, 2024

@shuxsu 请问是否解决?

from paddledetection.

shuxsu avatar shuxsu commented on May 22, 2024

@shuxsu 请问是否解决?

已解决

from paddledetection.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.