mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-12 19:04:03 +08:00
Ignore non-image files in ns-process-data (#1040)
* Ignore non-image files in ns-process-data * Update reqs * bump ipython
This commit is contained in:
1 parent
a578ac8d15
commit
0a57c7c72b
2 files changed
+11
-5
No files matched your search
@@ -335,7 +335,8 @@ class ProcessRecord3D:
|
||||
record3d_image_filenames = []
|
||||
for f in record3d_image_dir.iterdir():
|
||||
if f.stem.isdigit(): # removes possible duplicate images (for example, 123(3).jpg)
|
||||
record3d_image_filenames.append(f)
|
||||
if f.suffix.lower() in [".jpg", ".jpeg", ".png", ".tif", ".tiff"]:
|
||||
record3d_image_filenames.append(f)
|
||||
|
||||
record3d_image_filenames = sorted(record3d_image_filenames, key=lambda fn: int(fn.stem))
|
||||
num_images = len(record3d_image_filenames)
|
||||
@@ -436,7 +437,8 @@ class ProcessPolycam:
|
||||
|
||||
polycam_image_filenames = []
|
||||
for f in polycam_image_dir.iterdir():
|
||||
polycam_image_filenames.append(f)
|
||||
if f.suffix.lower() in [".jpg", ".jpeg", ".png", ".tif", ".tiff"]:
|
||||
polycam_image_filenames.append(f)
|
||||
polycam_image_filenames = sorted(polycam_image_filenames, key=lambda fn: int(fn.stem))
|
||||
num_images = len(polycam_image_filenames)
|
||||
idx = np.arange(num_images)
|
||||
@@ -528,7 +530,8 @@ class ProcessMetashape:
|
||||
# Copy images to output directory
|
||||
image_filenames = []
|
||||
for f in self.data.iterdir():
|
||||
image_filenames.append(f)
|
||||
if f.suffix.lower() in [".jpg", ".jpeg", ".png", ".tif", ".tiff"]:
|
||||
image_filenames.append(f)
|
||||
image_filenames = sorted(image_filenames, key=lambda fn: fn.stem)
|
||||
num_images = len(image_filenames)
|
||||
idx = np.arange(num_images)
|
||||
|
||||
Reference in new issue
Block a user