Skip to content
/ plcs Public

Automatic Penaeus Monodon Larvae Counting via Equal Keypoint Regression with Smartphones

Notifications You must be signed in to change notification settings

1L2018/plcs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

使用说明

  • 这是plcs_onnx测试代码项目,onnx文件通过mmdeploy项目将mmpose代码转换而来,tools文件夹中包含的是图像预处理代码、模型后处理代码;
  • 使用CPU时需要切换环境为cutlerByLRX,GPU切换环境为mmdeploy,并在main.py中切换device;以下报错既是环境错误:
/opt/rh/devtoolset-8/root/usr/include/c++/8/bits/stl_vector.h:932: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::reference = int&; std::vector<_Tp, _Alloc>::size_type = long unsigned int]: Assertion '__builtin_expect(__n < this->size(), true)' failed.

  • weights/unquant中保存的是 非量化onnx权重,hrnet_w32, gpu/cpu;
  • 推理代码全部放在predict中,继承自 BasePredict
  • onnx/tensorrt推理结束后得到的结果会重新放到GPU中,相比于cpu后处理,gpu的处理速度下降了2个量级,从0.03->0.0001,目前处理速度瓶颈主要在预处理部分,后续想办法优化。
  • 预处理阶段耗时:总时长0.08,cv2.imread()读取图片时长接近于0.08,warpAffine操作仅耗时0.001

About

Automatic Penaeus Monodon Larvae Counting via Equal Keypoint Regression with Smartphones

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages