Skip to content

Tiled Upscaling #38

@FurkanGozukara

Description

@FurkanGozukara

Is that possible to do tiled upscaling and be slower but not lose much quality?

can you add a script to do this for video to video super resolution upscale?

ty @CSRuiXie

Implementation in the STAR Project (inference_sr_img_dir_tile.py):
The script uses ImageSpliterTh from util_image.py.
ImageSpliterTh(video_data, tile_size, tile_overlap, sf=self.upscale): This line clearly shows that the tile size and overlap are configurable.
pch_size in ImageSpliterTh corresponds to tile_size.
stride in ImageSpliterTh is effectively tile_size - tile_overlap.
im_spliter.update_gaussian(output, index_infos): This method is called after processing each tile (output). Inside ImageSpliterTh, this accumulates the processed tile into a larger canvas (self.im_res) using pre-calculated Gaussian weights (self.weight).
im_spliter.gather(): This method, called after all tiles are processed, divides the accumulated results (self.im_res) by the accumulated weights (self.pixel_count) to get the final blended image. This is the weighted averaging step.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions