data_utils ¶
Functions:¶
fastvideo.models.dits.hyworld.data_utils.get_closest_ratio ¶
Get the closest ratio in the buckets.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
height | float | video height | required |
width | float | video width | required |
ratios | list | video aspect ratio | required |
buckets | list | buckets generated by | required |
Returns:
| Type | Description |
|---|---|
| the closest size in the buckets and the corresponding ratio |