Closed AIGirl10 closed 3 years ago
It is missed detection for plate. Maybe the model has changed. or you can try a low threshold for PNet, RNet and ONet.
@lqian
Thank you so much for fast reply !
and it gave this output.
plateNo: 粤WP9P
what can be the reason ?
OpenCV Error: Assertion failed (0 <= roi.x && 0 <= roi.width && roi.x + roi.width <= m.cols && 0 <= roi.y && 0 <= roi.height && roi.y + roi.height <= m.rows) in Mat, file /build/opencv-QiBZO9/opencv-3.2.0/modules/core/src/matrix.cpp, line 522
terminate called after throwing an instance of 'cv::Exception'
what(): /build/opencv-QiBZO9/opencv-3.2.0/modules/core/src/matrix.cpp:522: error: (-215) 0 <= roi.x && 0 <= roi.width && roi.x + roi.width <= m.cols && 0 <= roi.y && 0 <= roi.height && roi.y + roi.height <= m.rows in function Mat
I am using the original demo example given. in with Detect function is commented and calling recognize function.
/*
* mtcnn_test.cpp
*
* Created on: Jun 25, 2019
* Author: lqian
*/
#include <opencv2/core.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/highgui.hpp>
#include <assert.h>
#include "mlpdr/MLPDR.h"
using namespace std;
using namespace mlpdr;
using namespace cv;
int main(int argc, char ** argv) {
MLPDR detector(argv[1], 0.4f, 0.4f, 0.4f);
Mat img = imread(argv[2]);
assert(!img.empty());
TickMeter tm;
tm.start();
// std::vector<mlpdr::PlateInfo> plateInfos = detector.Detect(img, 40, 3); // 608.23 ms
vector<PlateInfo> plateInfos = detector.recognize(img);
tm.stop();
printf("detect cost: %f (ms)\n", tm.getTimeMilli());
cout<<"\nsize:"<<plateInfos.size();
for (auto pi: plateInfos) {
cout << "plateNo: " << pi.plateNo << endl;
}
}
Please let me know if I am doing something wrong. Thank you !
please send picture which can be easy to access.
@AIGirl10 please try community branch code base.
When trying to run demo on x86, it is building successfully. But when trying to run it, it is not giving any output. The output vector is empty
vector<PlateInfo> plateInfos = detector.recognize(img); tm.stop(); printf("detect cost: %f (ms)\n", tm.getTimeMilli()); /* Printing vector size */ cout<<"\nsize:"<<plateInfos.size();
it is giving 0 as an output on this image
@lqian can you please check this ? Thank you !
Hi,
I ran this ./examples/demo ../models/ ../images/20201005161220950.jpg
, but the only output Im getting is :-
initialized!
done ProposalNet with 60 proposal
rnet run session and on copy to host
rnet run session and on copy to host
rnet run session and on copy to host
rnet run session and on copy to host
rnet run session and on copy to host
rnet run session and on copy to host
rnet run session and on copy to host
rnet run session and on copy to host
rnet run session and on copy to host
rnet run session and on copy to host
rnet run session and on copy to host
detect cost: 49654.972916 (ms)
Can anyone please help me
please try community branch source code.
When trying to run demo on x86, it is building successfully. But when trying to run it, it is not giving any output. The output vector is empty
it is giving 0 as an output on this image
@lqian can you please check this ? Thank you !