robustTemplateMatching
robustTemplateMatching copied to clipboard
Unable to allocate 11.8 GiB for ...
Hello, I'd like to run with my sample Images. Sample Image : 831 * 592 with 3 channel (color) Template Image : 56 * 59 with 3 channel (color)
When I ran robustTemplateMatching with my sample at PyCharm. ( run.py sample/1.jpg template/1.png ) Exception error occurred. {MemoryError} Unable to allocate 11.8 GiB for an array with shape (256, 133, 194, 16, 15) and data type float64
How can I fix it?
cf) My Environment
(torch) C:\Users\SDC>conda list
Name Version Build Channel
_pytorch_select 1.1.0 cpu blas 1.0 mkl ca-certificates 2020.1.1 0 certifi 2019.11.28 py37_0 cffi 1.14.0 py37h7a1dbc1_0 cudatoolkit 10.0.130 0 cython 0.29.15 py37ha925a31_0 freetype 2.8 h51f8f2c_1 hdf5 1.8.20 hac2f561_1 icc_rt 2019.0.0 h0cc432a_1 intel-openmp 2020.0 166 jpeg 9b hb83a4c4_2 libopencv 3.4.2 h20b85fd_0 libpng 1.6.37 h2a8f88b_0 libtiff 4.1.0 h56a325e_0 mkl 2020.0 166 mkl-service 2.3.0 py37hb782905_0 mkl_fft 1.0.15 py37h14836fe_0 mkl_random 1.1.0 py37h675688f_0 ninja 1.9.0 py37h74a9793_0 numpy 1.18.1 py37h93ca92e_0 numpy-base 1.18.1 py37hc3f5095_1 opencv 3.4.2 py37h40b0b35_0 openssl 1.1.1e he774522_0 pip 20.0.2 py37_1 py-opencv 3.4.2 py37hc319ecb_0 pycparser 2.20 py_0 python 3.7.6 h60c2a47_2 pytorch 1.3.1 cpu_py37h9f948e0_0 setuptools 46.0.0 py37_0 six 1.14.0 py37_0 sqlite 3.31.1 he774522_0 torchvision 0.4.1 pypi_0 pypi vc 14.1 h0510ff6_4 vs2015_runtime 14.16.27012 hf0eaf9b_1 wheel 0.34.2 py37_0 wincertstore 0.2 py37_0 xz 5.2.4 h2fa13f4_4 zlib 1.2.11 h62dcd97_3 zstd 1.3.7 h508b16e_0
I got a similar exception, using cython solves this problem.