TMElyralab / MusePose

MusePose: a Pose-Driven Image-to-Video Framework for Virtual Human Generation
Other
2.29k stars 167 forks source link

Update draw_dwpose.py #75

Open thisisvk45 opened 2 months ago

thisisvk45 commented 2 months ago

Breakdown of the specific changes made to optimize the previous code:

Video Info in One Step: I used get_video_info() to grab the width, height, and fps in one go, avoiding redundant operations.

Parallel Processing: I added ThreadPoolExecutor to handle multiple videos at the same time, speeding up the process.

Progress Bar for Videos: I moved tqdm to track the progress across all videos, making it cleaner and easier to monitor.

Simplified Directory Handling: I used os.makedirs(save_dir, exist_ok=True) to automatically create directories without manually checking.

Unified Resizing Logic: I calculated the render and save dimensions once, then reused them, eliminating repeated resizing steps.

I am a final year undergrad student looking for internships and full time role.