Skip to content

Fix training video loading bug #370

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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: 1 addition & 1 deletion training/dataset/vos_raw_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def __init__(
with g_pathmgr.open(file_list_txt, "r") as f:
subset = [os.path.splitext(line.strip())[0] for line in f]
else:
subset = os.listdir(self.img_folder)
subset = [folder for folder in os.listdir(self.img_folder) if os.path.isdir(os.path.join(self.img_folder, folder))]

# Read and process excluded files if provided
if excluded_videos_list_txt is not None:
Expand Down
2 changes: 1 addition & 1 deletion training/dataset/vos_segment_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def __init__(self, video_png_root):
# build a mapping from frame id to their PNG mask path
# note that in some datasets, the PNG paths could have more
# than 5 digits, e.g. "00000000.png" instead of "00000.png"
png_filenames = os.listdir(self.video_png_root)
png_filenames = [filename for filename in os.listdir(self.video_png_root) if os.path.splitext(filename)[0].isdigit()]
self.frame_id_to_png_filename = {}
for filename in png_filenames:
frame_id, _ = os.path.splitext(filename)
Expand Down