Open ankitsharma07 opened 4 years ago
I have the same problem. Have you solved your problem?
@sanli0 What OS are you running maskrcnn_benchmark?
centos
I used something like this to resolve the issue:
def process_maskrcnn(self, image):
try:
manager = multiprocessing.Manager()
return_dict = manager.dict()
def worker_process(return_dic, image):
imagercnnmask, imagemask = self.obj_maskrcnn.run_maskrcnn(image)
return_dic['1'] = True
return_dic['2'] = imagercnnmask
return_dic['3'] = imagemask
p = Process(target=worker_process, args=(return_dict, image))
p.start()
p.join()
return return_dict.values()
except:
return False, None, None
@sanli0 Did it solve your problem?
❓ Questions and Help
I am running maskrcnn_benchmark in the server and facing an issue of memory leak. I have made a flask application which when gets a request utilizes 800 MB of memory. On making another request the memory starts accumulating from 800 MB and goes further. On sending multiple requests simultaneously the program occupies all the allocated memory and exits.
I am not able to figure out where the memory is leaking. I am attaching some code snippets where I am using maskrcnn in my program.