New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
convert_imageset.exe crash when processing 17K+ images #5348
Comments
I also have the same issue, my convert_imageset.exe crashes at lmdb=2GB |
Same here, compiled on Windows 10, MS Visual Studio 2015, CPU only |
Yes this is a LMDB issue. I fixed it on the latest caffe-builder master but haven't made a new release yet. You can build the dependencies from source using caffe-builder master. You can build all libraries (this is the default) or just lmdb and replace the lib, cmake file and header in the downloaded libraries. To build only LMDB use Alternatively use LevelDB. |
@willyd Is there anything that I'm missing? |
@willyd If yes, could you paste the URL? Thanks so much and sorry for not fully understanding your instructions. |
@GaryKT |
@willyd |
@GaryKT
Edit information: set CONDA_ROOT=your_conda_root cmake -G"!CMAKE_GENERATOR!" ^ While running build_win.cmd, make sure it loads the caffe-builder-config.cmake file, this is where I didn't notice at the beginning. Good luck !!! |
I am referring to this commit: willyd/caffe-builder@1129bc6 Or more specifically to this part of the patch: https://github.com/willyd/caffe-builder/blob/master/packages/lmdb/lmdb_45a88275d2a410e683bae4ef44881e0f55fa3c4d.patch#L305-L308 If already building your dependencies from source just delete the The correct (undocumented) usage of caffe-builder dependencies if to set USE_PREBUILT_DEPENDENCIES=OFF and use the config.cmake file as cache init as suggested by @caseyanya. I would gladly accept a PR that documents this! |
@caseyanya build_v140_x64.cmd |
@GaryKT |
@caseyanya |
@GaryKT |
@GaryKT Correct. I only support ninja since VS is prohibitively slow compared to ninja. @caseyanya The caffe build supports VS and Ninja generators. WITH_NINJA in build_win.cmd controls if Ninja is used or VS. The VS generator has a limitation: it can't build a shared library with CUDA support. |
@willyd |
@willyd Changed the settings in build_win.cmd to default to Ninja. D:\PROGRAMMING\caffe>scripts\build_win.cmd |
With Ninja in the same folder: D:\PROGRAMMING\caffe_builder\caffe-builder>build_v140_x64.cmd |
Looks like the generated command line in the Ninja build files is too long. Try:
|
Strange. |
Thanks. New terminal worked. Could it be that the scripts keep appending to the path each time they are run? (duplicating the paths that already were set) It's compiling now with Ninja I believe. Will let you know if it works. |
Exactly, that's why I suggested this
|
Ok, build_v140_x64.cmd ran through a lot now but there is some error at the end. Is below error of concern? Thanks in advance. -- Downloading... done |
Can you try this PR #5355 and let me know if the problem is gone? |
Thanks. Just to clarify: the updated file is now for the main caffe windows; not caffe builder that I was trying before, correct? |
Trying with caffee, ninja and the fix to windowsdependencies. Is this the right command? It seems to ignore the parameters from before. D:\PROGRAMMING\caffee_lmbd_fix\caffe\build\tools>convert_imageset.exe --resize_height=200 --resize_width=200 --shuffle D:\PROGRAMMING\caffe\dataset\train2.txt jim_test_lmbd No modules matched: use -help |
Correct parameters: D:\PROGRAMMING\caffee_lmbd_fix\caffe\build\tools>convert_imageset.exe --resize_height=200 --resize_width=200 --shuffle D:\PROGRAMMING\caffe\dataset\ train2.txt jim_test_lmbd The fix worked. It runs past 17K images now. (Got the command parameters / path wrong at first). Great, thanks @willyd |
Updated prebuilt dependencies. Fixes #5348.
Issue summary
Convert imageset crashes on workstation when trying to train more than 17K images...
There seems to be no error handling. The system has 64GB RAM and 8GB GPU.
Is this related to memory management? Is there way to have imrpove memory management so larger image datasets can be processed with convert_imageset?
convert_imageset.exe --resize_height=200 --resize_width=200 --shuffle D:\PROGRAMMING\caffe\datasets\train2.txt jim_lmbd_full2
I0302 16:35:15.431205 39444 convert_imageset.cpp:86] Shuffling data
I0302 16:35:15.934109 39444 common.cpp:36] System entropy source not available, using fallback algorithm to generate seed instead.
I0302 16:35:15.934109 39444 common.cpp:36] System entropy source not available, using fallback algorithm to generate seed instead.
I0302 16:35:15.938120 39444 convert_imageset.cpp:89] A total of 82081 images.
I0302 16:35:15.940126 39444 db_lmdb.cpp:40] Opened lmdb jim_lmbd_full2
I0302 16:35:45.373826 39444 convert_imageset.cpp:147] Processed 1000 files.
I0302 16:36:13.004973 39444 convert_imageset.cpp:147] Processed 2000 files.
I0302 16:36:40.344454 39444 convert_imageset.cpp:147] Processed 3000 files.
I0302 16:37:08.040336 39444 convert_imageset.cpp:147] Processed 4000 files.
I0302 16:37:34.534848 39444 convert_imageset.cpp:147] Processed 5000 files.
I0302 16:38:03.082845 39444 convert_imageset.cpp:147] Processed 6000 files.
I0302 16:38:30.661777 39444 convert_imageset.cpp:147] Processed 7000 files.
I0302 16:38:58.234722 39444 convert_imageset.cpp:147] Processed 8000 files.
I0302 16:39:28.175652 39444 convert_imageset.cpp:147] Processed 9000 files.
I0302 16:39:55.643424 39444 convert_imageset.cpp:147] Processed 10000 files.
I0302 16:40:22.398650 39444 convert_imageset.cpp:147] Processed 11000 files.
I0302 16:40:51.848107 39444 convert_imageset.cpp:147] Processed 12000 files.
I0302 16:41:21.773030 39444 convert_imageset.cpp:147] Processed 13000 files.
I0302 16:41:50.492295 39444 convert_imageset.cpp:147] Processed 14000 files.
I0302 16:42:15.996433 39444 convert_imageset.cpp:147] Processed 15000 files.
I0302 16:42:42.570592 39444 convert_imageset.cpp:147] Processed 16000 files.
I0302 16:43:09.036027 39444 convert_imageset.cpp:147] Processed 17000 files.
F0302 16:43:32.926897 39444 db_lmdb.hpp:15] Check failed: mdb_status == 0 (87 vs. 0) The parameter is incorrect.**
*** Check failure stack trace: *
Steps to reproduce
convert_imageset.exe --resize_height=200 --resize_width=200 --shuffle D:\PROGRAMMING\caffe\datasets\train2.txt jim_lmbd_full2
with more than 17000 or so images.
Your system configuration
Operating system: Windows 10
Compiler: MS Visual Studio 2015
CUDA version (if applicable): 8
CUDNN version (if applicable): 5.1
BLAS: ?
Python or MATLAB version (for pycaffe and matcaffe respectively): Python 3.5.2
The text was updated successfully, but these errors were encountered: