Bug fixes with Record3D and new config system. (#336)

fixed some bugs regarding record3d and new config system.
This commit is contained in:
Alexander Kristoffersen authored and GitHub committed 2022-09-03 14:43:26 -07:00
1 parent 6f3518d54f
commit 18f8a5d0b8
2 files changed
+8 -5

No files matched your search

+4 -3
View File
@@ -434,11 +434,12 @@ class Record3D(DataParser):
if not image_dir.exists():
raise ValueError(f"Image directory {image_dir} doesn't exist")
ext = ".jpg"
image_filenames = []
for f in image_dir.iterdir():
image_filenames.append(image_dir / f)
image_filenames = sorted(image_filenames, key=lambda fn: int(fn.name[: -len(ext)]))
if f.stem.isdigit(): # removes possible duplicate images (for example, 123(3).jpg)
image_filenames.append(image_dir / f)
image_filenames = sorted(image_filenames, key=lambda fn: int(fn.stem))
image_filenames = np.array(image_filenames)
num_images = len(image_filenames)