cvhciKIT / sloth

Sloth is a tool for labeling image and video data for computer vision research.
Other
611 stars 198 forks source link

Memory leak with polygons #166

Open kahvel opened 6 years ago

kahvel commented 6 years ago

It seems to me that when using polygons to annotate objects there is some kind of a memory leak. I stumbled upon this problem because I want to annotate large pictures with up to thousand objects and in this case the problem becomes noticeable by making the program lag or even crash. To reproduce this problem:

Setup:

  1. Open image for annotating
  2. Add polygons (the memory leak seems to occur already with one polygon, but having more polygons makes it easier to see)
  3. Open for example task manager to check memory usage

Memory leak 1:

  1. Annotate the first vertex of a polygon.
  2. Just move mouse around the image and see how more and more memory is used

Memory leak 2:

  1. Annotate the first vertex of a polygon.
  2. Don't move the mouse but add new vertices to the same spot. I think here is also some kind of a leak, because the amount of memory used for each new vertex seems to be depending on how many polygons/vertices are already present (the more polygons, the more memory each new vertex takes)

Currently my solution to this problem is closing the program and opening it again, then I can annotate for some time until memory problem again occurs and it starts lagging.

Does anybody have some idea what might cause this problem? It really makes annotating images with a lot of objects annoying.