-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Description
I used swin-transformer objection detection, test and selected the parameters --eval bbox --show --show-dir xxx to generate my prediction images. The test set is about 3,000. My computer's memory is 48g,the operating system is ubuntu 18.04.
When predicting the first picture, the memory usage of the process is about 9.2%. By the time it was more than two thousand, it had filled up all the memory and the computer crashed.
I found that when I commented out this code in mmdet.models.detectors.base.py, the memory leak problem disappeared
img = imshow_det_bboxes(
img,
bboxes,
labels,
segms,
class_names=self.CLASSES,
score_thr=score_thr,
bbox_color=bbox_color,
text_color=text_color,
mask_color=mask_color,
thickness=thickness,
font_size=font_size,
win_name=win_name,
show=show,
wait_time=wait_time,
out_file=out_file)
It seems that the problem lies in the imshow_det_bboxes function of mmdet.core.visualization.image.py
Has anyone else encountered this problem?