Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions deeptrack/features.py
Original file line number Diff line number Diff line change
Expand Up @@ -7620,10 +7620,8 @@ def get(
# Try to load the image using various readers.
try:
import imageio
import gc

image = [imageio.v3.imread(file).copy() for file in path]
gc.collect() # Clean up memory after loading with ImageIO.
except (ImportError, AttributeError, KeyError, OSError, ValueError):
try:
image = [np.load(file, **load_options).copy() for file in path]
Expand Down
4 changes: 4 additions & 0 deletions tests/test_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -2904,6 +2904,10 @@ def test_LoadImage(self):
)

finally:
import gc

gc.collect()

for file in temp_files:
if os.path.exists(file):
os.remove(file)
Expand Down
624 changes: 334 additions & 290 deletions tutorials/2-examples/DTEx211_MNIST.ipynb

Large diffs are not rendered by default.

Loading