title: how to clean ram memory in python running a series of YOLO predictions?
body: <p>i am trying to run a YOLO prediction on a hundreds of jpeg in a row one after the other. in the following code predict.py creates a jpeg with prediction for the filename in the argument. 
  this code scans the whole folder and goes files by file. 
  long story short it gets slow after 30 jpegs and the task manager shows 10GB ram in use.</p>
  
  <p>would appreciate any help</p>
  
  <p>once every files is created i would like to start with "fresh" clean memory for the next iteration- using gc.collect in the following way did not change anything.</p>
  
  <pre><code>    import os
      import predict
      import gc
  
      for root, dirs, files in os.walk("images\edited images"): 
         i=1
         for name in files:
             predict.main(os.path.join(root, name))
             print(os.path.join(root, name))
             i=i+1
             print(i)
             gc.collect()
  </code></pre>