PaddleX
PaddleX copied to clipboard
PaddlePaddle End-to-End Development Toolkit(『飞桨』深度学习全流程开发工具)
模型类型为FasterRCNN,训练代码如下 ``` Dataset_Dir= 'E:/PaddleX_workspace/datasets/D0001' Model_Dir= 'E:/PaddleX_workspace/projects/P0001/T0001/output/best_model' Quant_Dir= 'E:/PaddleX_workspace/projects/P0001/T0001/output/Quant' import paddlex as pdx from paddlex import transforms as T train_transforms = T.Compose([ T.ResizeByShort(short_size=800,max_size=1333), T.RandomHorizontalFlip(), T.Normalize()]) eval_transforms = T.Compose([ T.ResizeByShort(short_size=800,max_size=1333), T.Normalize()]) train_dataset...
训练后得到best_model.pdopt和best_model.pdparams两个文件
Fixed a bug where the bbox of the instance dataset in vertical flip was not transformed correctly.
## 描述问题 使用 paddlejsconverter 对 paddlex 中的 PicoDet 模型(已转换为 inference)转换时报错 TypeError: Object of type BlockDesc is not JSON serializable 3. 您使用的**模型**和**数据集**是? PicoDet 数据集是[钢筋计数项目](https://github.com/PaddlePaddle/PaddleX/tree/develop/examples/rebar_count) 4. 请提供您出现的报错信息及相关log ``` aistudio@jupyter-64630-3486734:~$ paddlejsconverter --modelPath=work/code/output/inference_model_picodet_esnet_l/inference_model/model.pdmodel --paramPath=work/code/output/inference_model_picodet_esnet_l/inference_model/model.pdiparams...
aistudio上跑的paddlex。版本paddlex-2.1.0 ``` model.train( num_epochs=300,#训练轮数 train_dataset=train_dataset, #训练数据 eval_dataset=eval_dataset, #验证数据 train_batch_size=128, #batchsize save_interval_epochs=5, #保存轮数 log_interval_steps=20, #log轮数 save_dir='output/ppyolo_resnet50',#保存目录 # pretrain_weights='COCO', #预训练权重 resume_checkpoint='./output/ppyolo_resnet50/epoch_45/',#恢复训练 pretrain_weights=None, #恢复训练 learning_rate=0.000125, #学习率 warmup_steps=500, #预热部署 lr_decay_epochs=[150, 250], # step学习率衰减, use_vdl=True)...
在运行[https://github.com/PaddlePaddle/PaddleX/tree/develop/deploy/cpp/docs/csharp_deploy](url)例子的时候,笔记本上的3060显卡不能使用GPU模式推理,要把里面的cuda、cudnn、tensorrt升级到cuda11的对应版本,就用[https://paddleinference.paddlepaddle.org.cn/user_guides/download_lib.html#windows](url)里预编译的cuda11_cudnn8.0版本就可以了。编译dll的时候用release模式,model_infer.cpp文件做如下修改[https://github.com/PaddlePaddle/PaddleX/pull/1318/files](url) 测试的时候,可以用[https://github.com/PaddlePaddle/PaddleX/blob/develop/deploy/cpp/docs/demo/decrypt_infer.md](url)里面YoloV3的模型测试,模型类型选det。  如果用paddleX_GUI训练的模型,模型类型要选paddlex。 
系统环境为:win10+cuda11.2+cudnn8.1+TensorRT8.0.1.6+Python3.8 当使用pdx.deploy.Predictor初始化加载模型时,use_trt=False时能正常加载,=True时会报错。代码及报错如下图   当加载的模型为PPYolov2时,则不会报错,但是加载时间会长达2-3分钟,然后便能正常运行预测,是否正常?
环境:cuda11.2+cudnn8.1+trt8.0.1.6 模型类型为PPYolov2,输入尺寸800*800 用的接口为paddle.deploy.predictor ``` import paddlex as pdx import time a=time.time() model=pdx.deploy.Predictor( model_dir = r'F:\gasket3\inference_model', use_gpu = True, use_trt = True, trt_precision_mode = 'float16' ) print(time.time()-a) ```  加载时间为459秒,差不多8分钟 已将deploy.py中的use_static设置为True,如图...
使用!paddlex --export_inference --model_dir=output/yolov3_darknet53/best_model --save_dir=inference --fixed_input_shape=[608,608],出错, Traceback (most recent call last): File "/opt/conda/envs/python35-paddle120-env/bin/paddlex", line 6, in from paddlex.command import main File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddlex/__init__.py", line 18, in init_parallel_env() File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddlex/utils/env.py", line 71, in...
``` #加载模型 model = pdx.load_model('/home/aistudio/work/Project/P0001/T0002/best_model/') ``` ``` print(model.predict(img_file = '/home/aistudio/' + 'work/Datasets/D0001/JPEGImages/2021-06-16-10_05_10.jpg')) print('\r\n') print(model.predict(img_file = '/home/aistudio/' + 'work/Datasets/D0001/JPEGImages/2021-06-16-10_05_10.jpg')) ``` [{'category_id': 0, 'category': 'Bubble', 'bbox': [778.1098022460938, 276.94537353515625, 46.76513671875, 62.3902587890625], 'score': 0.9573819041252136},...