kamata1729 / robustTemplateMatching

Implementation of Robust Template Matching Using Scale-Adaptive Deep Convolutional Features
http://www.apsipa.org/proceedings/2017/CONTENTS/papers2017/14DecThursday/TA-02/TA-02.5.pdf
MIT License
183 stars 50 forks source link

Memory error while loading the numpy array #3

Open riti1302 opened 5 years ago

riti1302 commented 5 years ago

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

janggj68 commented 4 years ago

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

Junny-han commented 3 years ago

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?

Arka161 commented 2 years ago

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