How ascend-research/turtle works
Project Type and Purpose
• The project is a video restoration deep learning framework. It accepts degraded video inputs (after frame extraction) and outputs enhanced, restored video frames.
• Its flexible "Model Forge" design allows customization by switching layers and feed-forward configurations through YAML option files.
• The codebase builds on the BasicSR toolbox and adapts state-of-the-art architectures for various low-level video restoration tasks.
File Structure
• Top-level files like README, setup.py, and make_video.py are for configuration, package management, and scripts.
• The “basicsr” directory is the core component and is subdivided into:
• data: Includes modules for dataset handling, transformations, and prefetching (e.g., data_sampler.py, video_image_dataset.py, video_super_image_dataset.py).
• models: Contains model definitions and architecture implementations (e.g., turtle_arch.py, turtle_t1_arch.py, turtlesuper_t1_arch.py) along with loss functions, learning rate schedulers, and training-related files.
• loss: Provides loss calculations needed during training.
• metrics: Implements evaluation metrics (like PSNR/SSIM) to assess performance.
• utils: Utility functions such as file handling, logger, image/video utilities.
• Additional scripts (e.g., inference.py, inference_no_ground_truth.py, video_to_frames.py) support both model testing and real-world video inference examples.
• The “options” folder contains YAML configuration files, offering flexibility to select and modify the model architecture and hyperparameters.
Architectural Patterns & Design Principles
• The project follows a modular design, with a clear separation between data handling, modeling, training, and evaluation.
• It employs dependency injection through YAML options to enable “Model Forge” customization.
• The system can be seen as a pipeline architecture where data flows sequentially from input, through processing layers, to the output.