jkjung-avt / tensorrt_demos

TensorRT MODNet, YOLOv4, YOLOv3, SSD, MTCNN, and GoogLeNet
https://jkjung-avt.github.io/
MIT License
1.74k stars 545 forks source link

How do I free up memory when I want to switch models #604

Open dongdaiquan opened 11 months ago

dongdaiquan commented 11 months ago

Hi my create yolo code: trt_yolo = yolo_with_plugins.TrtYOLO(trt_file_path, category_num, letter_box, ctx)

When I call trt_yolo.del() and trt_yolo = None, memory is not freed

How do I actively free up memory?