Comments (6)
强制转换就行了 im_info= np.array([800.,800.,1.], dtype='float32')
from paddledetection.
@aixier 请给下导出模型时的运行命令,注意模型要加载通过指定weights
正确设置~
[inference_program, feed_target_names, fetch_targets] = fluid.io.load_inference_model(dirname=save_freeze_dir, executor=exe)
中最好指定下 model_filename
和 params_filename
的名字。
from paddledetection.
python tools/export_model.py -c configs/dcn/cascade_rcnn_dcn_r50_fpn_1x.yml --output_dir=./inference_model_cas -o weights=/home/aistudio/work/PaddleDetection/ResNet50_cos_pretrained.tar YoloTestFeed.image_shape=[3,448,448] @qingqing01
from paddledetection.
@aixier 保存模型选错了,请注意选择cascade_rcnn_dcn_r50_fpn_1x对应的模型是:
https://paddlemodels.bj.bcebos.com/object_detection/cascade_rcnn_dcn_r50_fpn_1x.tar
另外:
[inference_program, feed_target_names, fetch_targets] = fluid.io.load_inference_model(dirname=save_freeze_dir, executor=exe)
中最好指定下 model_filename 和 params_filename的名字。
from paddledetection.
可以load了
[inference_program, feed_target_names, fetch_targets] = fluid.io.load_inference_model(dirname=path, executor=exe, model_filename="model", params_filename="params")
但是设置: im_info= np.array([800.,800.,1.])
然后
batch_outputs = exe.run(inference_program,
feed={feed_target_names[0]: tensor_img,
feed_target_names[1]: im_info,
feed_target_names[2]: image_shape[np.newaxis, :]},
fetch_list=fetch_targets,
return_numpy=False)
会报错
PaddleCheckError: Tensor holds the wrong type, it holds double, but desires to be float at [D:\1.6.1\paddle\paddle/fluid
/framework/tensor_impl.h:30]
@qingqing01
from paddledetection.
@aixier 既然解决了,那就close了
from paddledetection.
Related Issues (20)
- 部署方面的问题 HOT 1
- 基于昇腾Ascend 910B 怎么训练yolov3模型?
- 关于Fasterrcnn的cpp推理部署
- 请问怎么能在paddleDetection里面打印模型大小,或者precision 和 recall HOT 1
- PP-YOLOE-SOD 高精度小目标检测模型小模型速度更慢 HOT 2
- 旋转框检测训练图片输入尺寸
- dab-detr train AP=0 HOT 1
- 最新的develop分支代码出现(No module named 'paddle.base')bug(2024.4.12出现) HOT 3
- SSD模型代码ssd_vgg16_300_240e_voc.yml 训练代码无法运行 HOT 1
- ppvehicle进行实时流推流是在第20帧卡住,但无任何报错,寻求帮助
- predictor.run()之后无结果
- develop分支中deploy预测保存coco_results存在错误
- 我想问一下 【智慧安防】毫秒级打架识别 中的 pptsm_fight_frames_dense.yaml 在哪 HOT 1
- 模型需要转为onnx格式固定输入固定输出,但是PCB缺陷检测1个图可能不至1个缺陷,转了几次都不对
- 模型需要转为onnx格式固定输入固定输出,但是PCB缺陷检测1个图可能不至1个缺陷,转了几次都不对
- 做旋转检测时,multiclass_nms3 没有得到正确的结果 HOT 1
- Why did I not save the results of my training to best_model
- export_model.py export_onnx=True x.shape[dim] is not None tuple index out of range
- export_model.py export_onnx=True tuple index out of range
- Can't call main_program when full_graph=False. Use paddle.jit.to_static(full_graph=True) instead. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from paddledetection.