I am creating a pose model and this holds let's say 100MB in the memory. When I remove the pose model object with "del" command and use the garbage collector, the memory it holds is not released. Exactly 100MB is held in the memory until I reset my environment. How can I release the whole memory that is held by the Pose model?
For example, if it holds 100 MB for the pose model and if I create the pose model in a for loop for 10 iterations, at the end it exactly holds 1000MB even though I create the objects with the same name and delete/garbage-collect them.
I am creating Pose Model more than once because I am running many videos with different resolutions. If I try using the same Pose model for a video that has a different resolution, I am getting the error below. Maybe this might help to find a solution to my problem.
E20221123 15:36:44.515576 11080 calculator_graph.cc:805] INTERNAL: CalculatorGraph::Run() failed in Run: Calculator::Process() for node "posesegmentationfiltering__SegmentationSmoothingCalculator" failed: ; (current_mat.rows)==(previous_mat.rows)s/image/segmentation_smoothing_calculator.cc:196)
I tried both of these below but they could not release the memory.
del poseObject
gc.collect()