Open zuiyuewentian opened 3 years ago
麻烦贴下模型文件夹里面的model.yml,我们先看下是否是transforms的问题
麻烦贴下模型文件夹里面的model.yml,我们先看下是否是transforms的问题 好的
Model: MaskRCNN Transforms:
麻烦贴下模型文件夹里面的model.yml,我们先看下是否是transforms的问题
有2个模型 先目标检测 ,再分割。这个是目标检测的模型参数
Model: FasterRCNN Transforms:
看你的日志是加载faster rcnn的报的错。导出模型的时候有指定fixed_input_shape吗?如果没有的话,那就取消load_model()中的fixed_input_shape设置试下。
另外mask rcnn本身就带有检测和分割的任务,能问下为啥要用faster rcnn后面接mask rcnn呢?
mask rcnn在服务端运行挂掉,有具体的报错信息吗?
看你的日志是加载faster rcnn的报的错。导出模型的时候有指定fixed_input_shape吗?如果没有的话,那就取消load_model()中的fixed_input_shape设置试下。
另外mask rcnn本身就带有检测和分割的任务,能问下为啥要用faster rcnn后面接mask rcnn呢?
mask rcnn在服务端运行挂掉,有具体的报错信息吗?
我原来采用这种方式加载模型的才导致错误 model = pdx.deploy.Predictor('dashboard_model', use_gpu=False) 我现在换成 model = pdx.load_model('dashboard_model') 加载 ,可以了,这是为什么
我原来采用这种方式加载模型的才导致错误 model = pdx.deploy.Predictor('dashboard_model', use_gpu=False)我原来采用这种方式加载模型的才导致错误
那烦请贴下这种方式加载模型报的错误信息,我们看下。
另外,你最开始贴的那个报错信息截图,具体是执行的怎样的命令
我原来采用这种方式加载模型的才导致错误 model = pdx.deploy.Predictor('dashboard_model', use_gpu=False)我原来采用这种方式加载模型的才导致错误
那烦请贴下这种方式加载模型报的错误信息,我们看下。
另外,你最开始贴的那个报错信息截图,具体是执行的怎样的命令
好的,我的功能是第一步目标检测仪表盘,第二步采用实例分割仪表盘。我做了个flask页面上传图片处理,页面如下:
下面是执行的输出全部错误信息: [root@iZbp1c6670iwpk8axdurjbZ yoyo]# python3 index_server.py 加载数据集... 加载数据集完毕... 加载模型... 加载模型... 加载识别仪表盘模型... --- fused 0 scale with matmul --- Fused 0 MatmulTransposeReshape patterns --- fused 0 scale with matmul --- Fused 0 MatmulTransposeReshape patterns 模型加载完毕.
180.102.192.85 - - [07/Jun/2021 11:37:12] "GET / HTTP/1.1" 200 - 180.102.192.85 - - [07/Jun/2021 11:37:13] "GET /favicon.ico HTTP/1.1" 404 - 15.jpeg [2021-06-07 11:37:30,915] ERROR in app: Exception on / [POST] Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 2447, in wsgi_app response = self.full_dispatch_request() File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1952, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1821, in handle_user_exception reraise(exc_type, exc_value, tb) File "/usr/local/lib/python3.6/site-packages/flask/_compat.py", line 39, in reraise raise value File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1950, in full_dispatch_request rv = self.dispatch_request() File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1936, in dispatch_request return self.view_functionsrule.endpoint File "index_server.py", line 64, in hello_world result = dash_model.predict(im) File "/usr/local/lib/python3.6/site-packages/paddlex/deploy.py", line 278, in predict model_pred = self.raw_predict(preprocessed_input) File "/usr/local/lib/python3.6/site-packages/paddlex/deploy.py", line 257, in raw_predict self.predictor.zero_copy_run() paddle.fluid.core_avx.EnforceNotMet:
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::memory::detail::MemoryBlock::Split(paddle::memory::detail::MetadataCache, unsigned long)
3 paddle::memory::detail::BuddyAllocator::SplitToAlloc(std::_Rb_tree_const_iterator<std::tuple<unsigned long, unsigned long, void> >, unsigned long)
4 paddle::memory::detail::BuddyAllocator::Alloc(unsigned long)
5 void paddle::memory::legacy::Alloc
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/framework.py", line 2610, in append_op
attrs=kwargs.get("attrs", None))
File "/opt/conda/envs/python35-paddle120-env/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 "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/layers/nn.py", line 2938, in conv2d
"data_format": data_format,
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddlex/cv/nets/hrnet.py", line 442, in conv_bn_layer
bias_attr=False)
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddlex/cv/nets/hrnet.py", line 258, in fuselayers
str(j + 1) + '' + str(k + 1))
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddlex/cv/nets/hrnet.py", line 285, in high_resolution_module
name=name)
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddlex/cv/nets/hrnet.py", line 306, in stage
out, numblocks, channels, name=name + '' + str(i + 1))
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddlex/cv/nets/hrnet.py", line 124, in net
tr1, num_modules_2, num_blocks_2, channels_2, name='st2')
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddlex/cv/nets/hrnet.py", line 498, in call
out = self.net(input)
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddlex/cv/nets/detection/faster_rcnn.py", line 220, in build_net
body_feats = self.backbone(im)
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddlex/cv/models/faster_rcnn.py", line 234, in build_net
outputs = model.build_net(inputs)
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddlex/cv/models/load_model.py", line 82, in load_model
mode='test')
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddlex/command.py", line 158, in main
model = pdx.load_model(args.model_dir, fixed_input_shape)
File "/opt/conda/envs/python35-paddle120-env/bin/paddlex", line 10, in
Error: An error occurred here. There is no accurate error hint for this error yet. We are continuously in the process of increasing hint for this kind of error check. It would be helpful if you could inform us of how this conversion went by opening a github issue. And we will resolve it with high priority.
方便看下 python3 index_server.py 里都用了什么API么?
方便看下 python3 index_server.py 里都用了什么API么?
model = pdx.deploy.Predictor('dashboard_model', use_gpu=False) result = model .predict(url) 就用了这两个
部署到服务器上,实例分割模型采用cpu4核8g计算,一运行推理就挂掉,同样配置的本地笔记本可以运行该程序,运行的时候查看过cpu使用情况大概在79%左右,内存占用不多,就挂了