Skip to content
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

Does the uvo_process.py file lack preprocess for val dataset? #107

Open
mao-code opened this issue Oct 2, 2024 · 0 comments
Open

Does the uvo_process.py file lack preprocess for val dataset? #107

mao-code opened this issue Oct 2, 2024 · 0 comments

Comments

@mao-code
Copy link

mao-code commented Oct 2, 2024

I noticed that both the train and val set in UVO dataset have "reorg" in the config file.
However, I only found the train path in the uvo_preprocess.py.

I have modified the code. If it is the case, please notify me. I will send a pull request.

import cv2 
import json 
import os
from pycocotools import mask as mask_utils
import numpy as np
from tqdm import tqdm

# train
# json_path = '/home/default/ephemeral_drive/Tryon/AnyDoor/training_data/UVO/UVO_sparse_train_video_with_interpolation.json'
# output_path = "/home/default/ephemeral_drive/Tryon/AnyDoor/training_data/UVO/UVO_sparse_train_video_with_interpolation_reorg.json"

# val
json_path = '/home/default/ephemeral_drive/Tryon/AnyDoor/training_data/UVO/UVO_sparse_val_video_with_interpolation.json'
output_path = "/home/default/ephemeral_drive/Tryon/AnyDoor/training_data/UVO/UVO_sparse_val_video_interpolation_reorg.json"

with open(json_path, 'r') as fcc_file:
    data = json.load(fcc_file)

info = data['info']
videos = data['videos']
print(len(videos))


uvo_dict = {}
for video in tqdm(videos):
    vid = video['id']
    file_names = video['file_names']
    uvo_dict[vid] = file_names


with open(output_path,"w") as f:
    json.dump(uvo_dict,f)
    print('finish')
@mao-code mao-code changed the title Does the uvo_process.py file lack of val preprocess? Does the uvo_process.py file lack preprocess for val dataset? Oct 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant