From 3417f454c07d116172ea2137e646140050eb4ee3 Mon Sep 17 00:00:00 2001 From: Darnell Granberry <40174000+DarnellGranberry@users.noreply.github.com> Date: Tue, 12 Nov 2024 11:24:48 -0500 Subject: [PATCH] get image file extension for later use --- topaz/extract.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/topaz/extract.py b/topaz/extract.py index f1066f1..ebfdb23 100644 --- a/topaz/extract.py +++ b/topaz/extract.py @@ -333,7 +333,7 @@ def extract_particles(paths:List[str], model:Union[torch.nn.Module, str], device for path,score,coords in nms_iterator(stream, radius, threshold, pool=pool, dims=dims, verbose=verbose): # get the name of the image w/o extension basename = os.path.basename(path) - name = os.path.splitext(basename)[0] + name, ext = os.path.splitext(basename) if verbose: report(f'Extracted {len(score)} particles from {name}') # scale the coordinates