Skip to content

Importing shutil and making shure the needed folder exists. #5

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
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
11 changes: 8 additions & 3 deletions notebooks/fit_model_to_scene_full.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -130,16 +130,21 @@
"outputs": [],
"source": [
"PATH_TO_VIDEO = \"../assets/examples/video_fruits.mp4\"\n",
"perform_preprocessing = True\n",
"\n",
"num_ref_views = 16 # how many frames you want to extract from video and colmap\n",
"if False:\n",
"num_corrs = 20000\n",
"\n",
"if perform_preprocessing:\n",
" # Full pipeline helpers\n",
" import shutil \n",
" from gradio_demo import preprocess_input\n",
" from source.utils_preprocess import read_video_frames, preprocess_frames, select_optimal_frames, save_frames_to_scene_dir, run_colmap_on_scene\n",
" from source.visualization import generate_circular_camera_path, save_numpy_frames_as_mp4, generate_fully_smooth_cameras_with_tsp, put_text_on_image\n",
" # Change to your path\n",
" images, scene_dir = preprocess_input(PATH_TO_VIDEO, num_ref_views, num_corrs)\n",
" shutil.copytree(scene_dir, '../assets/video_colmaped', dirs_exist_ok=True)\n",
" \n"
" os.makedirs('.../assets/video_colmaped', exist_ok=True)\n",
" shutil.copytree(scene_dir, '../assets/video_colmaped', dirs_exist_ok=True)"
]
},
{
Expand Down