Open kooscode opened 5 years ago
gdb back trace:
(gdb) bt
#0 0x00007f800649fe97 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1 0x00007f80064a1801 in __GI_abort () at abort.c:79
#2 0x00007f80072dd8b7 in () at /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3 0x00007f80072e3a06 in () at /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4 0x00007f80072e3a41 in () at /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5 0x00007f80072e3c74 in () at /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6 0x00007f8025312dca in cv::error(cv::Exception const&) () at /usr/local/lib/libopencv_core.so.3.4
#7 0x00007f8025313c6f in cv::error(int, cv::String const&, char const*, char const*, int) ()
at /usr/local/lib/libopencv_core.so.3.4
#8 0x00007f8025245579 in _ZN2cvL13errorNoReturnEiRKNS_6StringEPKcS4_i () at /usr/local/lib/libopencv_core.so.3.4
#9 0x00007f8025247fa7 in cv::_InputArray::type(int) const () at /usr/local/lib/libopencv_core.so.3.4
#10 0x00007f802511251c in cv::Mat::copyTo(cv::_OutputArray const&) const () at /usr/local/lib/libopencv_core.so.3.4
#11 0x00007f80290be7c4 in cvSaveImage () at /usr/local/lib/libopencv_imgcodecs.so.3.4
#12 0x0000557b27b8826f in draw_train_loss ()
#13 0x0000557b27bc0318 in train_detector ()
#14 0x0000557b27bc1f20 in run_detector ()
#15 0x0000557b27b51191 in main ()
FYI - there is a bug in OpenCV's retired CAPI..
Here is a fix.. it writes a PNG instead of JPG, but at least it no longer crashes...
I created a pull request as well..
In _"draw_trainloss" function from "image.c" , replace:
cvSaveImage("chart.jpg", img, 0);
with
stbi_write_png("chart.png", img->width, img->height, 3, (char *)img->imageData, 0);
This repository does not supports OpenCV higher than 3.4.0, maybe you should re-compile without OpenCV.
@Sephirot1st - Like I said, I fixed the code and its working now...
@kooscode I also have the same problem. Will there be no training errors as you change?
The only change is saving the png file of the graph.
@lvshuaigg
Try to change this line: https://github.com/AlexeyAB/darknet/blob/95773cfb423266b9ac6aeea54e862db5817b5447/src/image.c#L773
to this:
stbi_write_png("chart.png", img->width, img->height, 3, (char *)img->imageData, 0);
Does it solve your problem?
I also had this problem in thousands of training sessions. If I changed it to yours, I would not have any problem in the following training sessions
@lvshuaigg I added this fix: https://github.com/AlexeyAB/darknet/commit/dc827f4c1c49907d7061c63fdc9a634cc82a43d7#diff-d63433b66e54cd65ded01be20041119cR776
Try to update your code from GitHub. Does it solve your problem?
@AlexeyAB
Hello, I have added another 8G memory module, now a total of 16G memory, but when he runs to 2W many times, there is a problem. And I use the latest repository.
@lvshuaigg I think your message is related to this Issue: https://github.com/AlexeyAB/darknet/issues/2110