Comments (6)
没太看明白你的意思,你是说在量化模型后对图片预测,如何得到检测目标在图片中xywh四点位置信息是吗?
from ncnn-yolov4-int8.
嗯嗯,因为这个定点数他是一个函数映射出来进行计算的值吧,在实际的检测图片上没办法去得到xywh的位置信息,因为我想做硬件加速器去实现,所以最后得到的定点数位置信息,怎么转换成实际图片上的位置信息呢
from ncnn-yolov4-int8.
不太确定这个是不是你想要得到的答案:
在yolov4.cpp的line154~line159:
const Object& obj = objects[i];
fprintf(stderr, "%d = %.5f at %.2f %.2f %.2f x %.2f\n", obj.label, obj.prob,
obj.rect.x, obj.rect.y, obj.rect.width, obj.rect.height);
cv::rectangle(image, obj.rect, cv::Scalar(255, 0, 0));
nihui大佬将xywh四点位置信息封装到obj中,假设我的检测推理时是将图片resize成160px160px,那么你是需要计算出他换算的比例尺,比如,你的原始图片为640px640px,缩放比例ratio=4,当你通过这个推理脚本得到resize图片的xywh位置信息,你需要以图片中心为基准点,根据这个比例尺换算出实际图片的xywh信息。
from ncnn-yolov4-int8.
好像不太一样,nihui大佬是有一套完整的yolov4量化代码吗,能发一下地址吗,麻烦了
from ncnn-yolov4-int8.
嗯嗯,nihui六月份还有更新ncnn的框架,你可以直接编译进行量化的
ncnn链接:https://github.com/Tencent/ncnn
ncnn的一些注意事项:https://github.com/Tencent/ncnn/wiki/quantized-int8-inference
祝好运兄弟
from ncnn-yolov4-int8.
好的,谢谢
from ncnn-yolov4-int8.
Related Issues (4)
- quantization/ncnn2table params HOT 4
- int8 fp16速度比较 HOT 2
- ncnn如何使用
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 ncnn-yolov4-int8.