Closed lbtanh closed 2 years ago
Mostly the error indicates some writing to an forbidden area in memory. For instance, when you having an index to an array running from 0 up till 10, and you want to get position -2, or +25. Because your screen comes with the error right at the beginning, even before main.cpp starts printing your OpenCV version, I presume some initialization (main.cpp lines 140 - 166) goes wrong. Please put some diagnostic printing lines in your code to see where it went wrong. Example
int main(int argc, char **argv)
{
float f;
float FPS[16];
int n,Fcnt=0;
size_t i;
cv::Mat frame;
cv::Mat result_cnn;
cv::Mat faces;
std::vector<FaceObject> Faces;
cout << "Init Faces list" << endl;
vector<cv::Mat> fc1;
string pattern_jpg = "./img/*.jpg";
cv::String NewItemName;
size_t FaceCnt;
//the networks
TLive Live;
cout << "Init Live" << endl;
TWarp Warp;
cout << "Init Warp" << endl;
TMtCNN MtCNN;
cout << "Init MtCNN" << endl;
TArcFace ArcFace;
cout << "Init ArcFace" << endl;
TRetina Rtn(RetinaWidth, RetinaHeight, false); //no Vulkan support on a RPi
cout << "Init Rtn" << endl;
TBlur Blur;
cout << "Init Blur" << endl;
Mostly the error indicates some writing to an forbidden area in memory. For instance, when you having an index to an array running from 0 up till 10, and you want to get position -2, or +25. Because your screen comes with the error right at the beginning, even before main.cpp starts printing your OpenCV version, I presume some initialization (main.cpp lines 140 - 166) goes wrong. Please put some diagnostic printing lines in your code to see where it went wrong. Example
int main(int argc, char **argv) { float f; float FPS[16]; int n,Fcnt=0; size_t i; cv::Mat frame; cv::Mat result_cnn; cv::Mat faces; std::vector<FaceObject> Faces; cout << "Init Faces list" << endl; vector<cv::Mat> fc1; string pattern_jpg = "./img/*.jpg"; cv::String NewItemName; size_t FaceCnt; //the networks TLive Live; cout << "Init Live" << endl; TWarp Warp; cout << "Init Warp" << endl; TMtCNN MtCNN; cout << "Init MtCNN" << endl; TArcFace ArcFace; cout << "Init ArcFace" << endl; TRetina Rtn(RetinaWidth, RetinaHeight, false); //no Vulkan support on a RPi cout << "Init Rtn" << endl; TBlur Blur; cout << "Init Blur" << endl;
thanks @Qengineering, i add breakpoint at the beggining, and debug. There somethings wrong in TMtCNN.cpp (from line 18)
Here the models are loaded into the networks. If it crashes on line 18, it might indicate a missing or corrupt det1.param file. Please check by temporary not loading any model and see what's happening. Of course you get errors when running the app, but if you see your OpenCV version printed on screen, you know for sure where the crash happens.
//----------------------------------------------------------------------------------------
TMtCNN::TMtCNN(void)
{
/*
Pnet.load_param("./models/mtcnn/det1.param");
Pnet.load_model("./models/mtcnn/det1.bin");
Rnet.load_param("./models/mtcnn/det2.param");
Rnet.load_model("./models/mtcnn/det2.bin");
Onet.load_param("./models/mtcnn/det3.param");
Onet.load_model("./models/mtcnn/det3.bin");
*/
}
//----------------------------------------------------------------------------------------
Here the models are loaded into the networks. If it crashes on line 18, it might indicate a missing or corrupt det1.param file. Please check by temporary not loading any model and see what's happening. Of course you get errors when running the app, but if you see your OpenCV version printed on screen, you know for sure where the crash happens.
//---------------------------------------------------------------------------------------- TMtCNN::TMtCNN(void) { /* Pnet.load_param("./models/mtcnn/det1.param"); Pnet.load_model("./models/mtcnn/det1.bin"); Rnet.load_param("./models/mtcnn/det2.param"); Rnet.load_model("./models/mtcnn/det2.bin"); Onet.load_param("./models/mtcnn/det3.param"); Onet.load_model("./models/mtcnn/det3.bin"); */ } //----------------------------------------------------------------------------------------
Thanks, i think somethings went wrong with prebuild lib (det1.bin, ...), maybe the environments not the same (i dont install Paddle-Lite, cause not enough storage)
did you find a solution to the error? I have the same.
Dear @TsvetkovEvan, sorry to hear about your problems.
Did you follow the above discussion?
It may sound arrogant, but the software is almost certainly flawless. Lots of downloads without any problem per week.
Usually there is something wrong in the environment. A software package, such as Paddle-Lite or ncnn, that is not properly installed. Working with virtual environments also aims to be a source of misunderstandings. Please try to pin-point your error to one line of code with debug cout
statements.
did you find a solution to the error? I have the same.
Hello @TsvetkovEvan, i changed to repo Face-Recognition-with-Mask-Jetson-Nano, it works normally, i don't know the root cause.
@lbtanh, @TsvetkovEvan , Adapted project file for ncnn version 20210322. No problems any more.
This issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Thank you.
I have built successfully with #5 , but when i run the error appear: . log:
Checking for existence: /home/anhlbt/Face-Recognition-Jetson-Nano-main/bin/Release/FaceRecognition Executing: xterm -T FaceRecognition -e /usr/bin/cb_console_runner LD_LIBRARY_PATH=$LD_LIBRARY_PATH:.:/usr/local/lib/:/usr/lib/:/usr/local/lib /home/anhlbt/Face-Recognition-Jetson-Nano-main/bin/Release/FaceRecognition (in /home/anhlbt/Face-Recognition-Jetson-Nano-main/.)
do you have any suggestion for this error? thanks