robustTemplateMatching icon indicating copy to clipboard operation
robustTemplateMatching copied to clipboard

Memory error while loading the numpy array

Open riti1302 opened this issue 5 years ago • 3 comments

Hi @kamata1729 ! I am using the code without cuda and cython and I am getting the following memory error. My system has 4GB RAM. Looking forward to your reply.

save features... calc NCC... Traceback (most recent call last): File "run.py", line 68, in template, image, threshold=None, use_cython=args.use_cython) File "/home/ritika/Documents/robustTemplateMatching-master/FeatureExtractor.py", line 117, in call self.template_feature_map.numpy(), self.image_feature_map.numpy()) File "/home/ritika/Documents/robustTemplateMatching-master/FeatureExtractor.py", line 69, in calc_NCC tmp = np.zeros((c, M.shape[-2] - h_f, M.shape[-1] - w_f, h_f, w_f)) MemoryError

riti1302 avatar Jul 23 '19 07:07 riti1302

Hi, I have same problem. Did you fix it ?

janggj68 avatar Apr 01 '20 02:04 janggj68

I also ran the code without cuda and cython.Surprisingly, I input three pictures of similar size,one succeeded, one showed that the process was killed, and the other reported an error "type error"。Have you ever encountered a similar situation?

Junny-han avatar Sep 30 '21 09:09 Junny-han

The error will be fixed if you use the code from my PR or my fork.

Arka161 avatar Dec 11 '21 23:12 Arka161