CUHK-AIM-Group / EndoGaussian

EndoGaussian: Real-time Gaussian Splatting for Dynamic Endoscopic Scene Reconstruction
https://yifliu3.github.io/EndoGaussian/
MIT License
115 stars 6 forks source link

process SCARED dataset #12

Closed schwert26 closed 8 months ago

schwert26 commented 8 months ago

I am wondering how to use the code in https://github.com/EikoLoki/MICCAI_challenge_preprocess to process each frame of the SCARED dataset?

schwert26 commented 8 months ago

Here's the list of my dataset,I copied it from my schoolmates.Is there a problem with my data or does it need to be processed by https://github.com/EikoLoki/MICCAI_challenge_preprocess ? 2024-03-27 16-53-25 的屏幕截图

yifliu3 commented 8 months ago

Yes, the data should be processed as in the link.

In https://github.com/EikoLoki/MICCAI_challenge_preprocess, you can find an all_in_one.py file. You can change the path in the file to the path of each frame, and get the processed frames.

schwert26 commented 8 months ago

Thanks for your apply!I am so sorry that I still don't understand....Could you be more specific?Thank you very much!

sunshinewuu commented 8 months ago

Hi, thanks for making this work available! Is that means to change the rootpath in the file(rootpath = '/media/eikoloki/TOSHIBA EXT/MICCAI_SCARED/dataset3')as your own data's path?And then?

yifliu3 commented 8 months ago

@schwert26 @sunshinewuu
Thanks for your attention. To be specific, there are several steps:

Step1: git clone the repo from https://github.com/EikoLoki/MICCAI_challenge_preprocess

Step2: change the rootpath in all_in_one.py to my own path. For example, after downloading and unzipping the original SCARED dataset (remember to unzip all files, including the files under the data subfolder of each keyframe), I want to process /home/yifliu3/scared/dataset_1(my own path), then the rootpath is modified as /home/yifliu3/scared/dataset_1.

Step3: some keyframes (e.g., keyframe_5) of the dataset have no data file, please modify these keyframe_x folders to keyframe_x_ignore.

Step4: execute the all_in_one.py using python all_in_one.py

schwert26 commented 8 months ago

Thanks for your reply! I am wondering is that my dataset is not complete?I have followed your step, execute the all_inone.py, but an error occurred:Traceback (most recent call last): File "all in_one.py", line 10, in image_scissor(rootpath) File "/home/xxx/桌面/EndoGaussian-master/MICCAI_challenge_preprocess-master/image_scissor.py", line 26, in image_scissor stacked_filelist = [sf for sf in listdir(stacked_filepath) if '.png' in sf] FileNotFoundError: [Errno 2] No such file or directory: '/home/xxxx/桌面/EndoGaussian-master/data/scared/dataset_1/keyframe_1/data/rgb_data'. So,is it possible that my SCARED original dataset is not fully downloaded? 2024-03-28 20-42-14 的屏幕截图

yifliu3 commented 8 months ago

Hi, I just checked the pre-processing code and found they're using rgb_data folder as the space to save the processed images. You can add an operation os.makedirs(rgb_filepath, exist_ok=True) before the parse_video function in Video_parser.py.

schwert26 commented 8 months ago

It works!I've changed some code in the EndoGaussian-master/scene/endo_loader.py/def load_meta(self).