import datasets from itertools import chain _DESCRIPTION = "" _PROJECTS_GAME_ENGINE = [ "GameEngine_ActionRPG", "GameEngine_ArchVizInterior", "GameEngine_ASCTeuthisan", "GameEngine_BroadcastSample", "GameEngine_CitySample", "GameEngine_ElectricDreamsEnv", "GameEngine_ElementalDemo", "GameEngine_HillsideSample", "GameEngine_Matinee", "GameEngine_MeerkatDemo", "GameEngine_MLDeformerSample", "GameEngine_ParticleEffects", "GameEngine_RealisticRendering", "GameEngine_SlayAnimationSample", "GameEngine_StylizedRendering", "GameEngine_SubwaySequencer", "GameEngine_SunTemple", "GameEngine_All", ] _PROJECTS_DOWNSCALE = [ "Downscale_ActionRPG", "Downscale_ArchVizInterior", "Downscale_ASCTeuthisan", "Downscale_BroadcastSample", "Downscale_ElectricDreamsEnv", "Downscale_ElementalDemo", "Downscale_HillsideSample", "Downscale_Matinee", "Downscale_MeerkatDemo", "Downscale_MLDeformerSample", "Downscale_ParticleEffects", "Downscale_RealisticRendering", "Downscale_SlayAnimationSample", "Downscale_StylizedRendering", "Downscale_SubwaySequencer", "Downscale_SunTemple", "Downscale_DMXPrevisSample", "Downscale_Dota2", "Downscale_CitySample", "Downscale_CSGO", "Downscale_All", ] _PROJECTS = _PROJECTS_GAME_ENGINE + _PROJECTS_DOWNSCALE _DESCRIPTION_DATA_GAME_ENGINE = { "GameEngine_ActionRPG": "", "GameEngine_ArchVizInterior": "", "GameEngine_ASCTeuthisan": "", "GameEngine_BroadcastSample": "", "GameEngine_CitySample": "", "GameEngine_ElectricDreamsEnv": "", "GameEngine_ElementalDemo": "", "GameEngine_HillsideSample": "", "GameEngine_Matinee": "", "GameEngine_MeerkatDemo": "", "GameEngine_MLDeformerSample": "", "GameEngine_ParticleEffects": "", "GameEngine_RealisticRendering": "", "GameEngine_SlayAnimationSample": "", "GameEngine_StylizedRendering": "", "GameEngine_SubwaySequencer": "", "GameEngine_SunTemple": "", "GameEngine_All": "", } _DESCRIPTION_DATA_DOWNSCALE = { "Downscale_ActionRPG": "", "Downscale_ArchVizInterior": "", "Downscale_ASCTeuthisan": "", "Downscale_BroadcastSample": "", "Downscale_ElectricDreamsEnv": "", "Downscale_ElementalDemo": "", "Downscale_HillsideSample": "", "Downscale_Matinee": "", "Downscale_MeerkatDemo": "", "Downscale_MLDeformerSample": "", "Downscale_ParticleEffects": "", "Downscale_RealisticRendering": "", "Downscale_SlayAnimationSample": "", "Downscale_StylizedRendering": "", "Downscale_SubwaySequencer": "", "Downscale_SunTemple": "", "Downscale_DMXPrevisSample": "", "Downscale_Dota2": "", "Downscale_CitySample": "", "Downscale_CSGO": "", "Downscale_All": "", } _DESCRIPTION_DATA = {**_DESCRIPTION_DATA_GAME_ENGINE, **_DESCRIPTION_DATA_DOWNSCALE} _DATA_FILES_GAME_ENGINE = { "GameEngine_ActionRPG": { "train": { "r270p": "data/GameEngineData/ActionRPG/train-270p.tar.gz", "r360p": "data/GameEngineData/ActionRPG/train-360p.tar.gz", "r540p": "data/GameEngineData/ActionRPG/train-540p.tar.gz", "r1080p": "data/GameEngineData/ActionRPG/train-1080p.tar.gz", }, "val": { "r270p": "data/GameEngineData/ActionRPG/val-270p.tar.gz", "r360p": "data/GameEngineData/ActionRPG/val-360p.tar.gz", "r540p": "data/GameEngineData/ActionRPG/val-540p.tar.gz", "r1080p": "data/GameEngineData/ActionRPG/val-1080p.tar.gz", }, }, "GameEngine_ArchVizInterior": { "train": { "r270p": "data/GameEngineData/ArchVizInterior/train-270p.tar.gz", "r360p": "data/GameEngineData/ArchVizInterior/train-360p.tar.gz", "r540p": "data/GameEngineData/ArchVizInterior/train-540p.tar.gz", "r1080p": "data/GameEngineData/ArchVizInterior/train-1080p.tar.gz", }, "val": { "r270p": "data/GameEngineData/ArchVizInterior/val-270p.tar.gz", "r360p": "data/GameEngineData/ArchVizInterior/val-360p.tar.gz", "r540p": "data/GameEngineData/ArchVizInterior/val-540p.tar.gz", "r1080p": "data/GameEngineData/ArchVizInterior/val-1080p.tar.gz", }, }, "GameEngine_ASCTeuthisan": { "train": { "r270p": "data/GameEngineData/ASCTeuthisan/train-270p.tar.gz", "r360p": "data/GameEngineData/ASCTeuthisan/train-360p.tar.gz", "r540p": "data/GameEngineData/ASCTeuthisan/train-540p.tar.gz", "r1080p": "data/GameEngineData/ASCTeuthisan/train-1080p.tar.gz", }, "val": { "r270p": "data/GameEngineData/ASCTeuthisan/val-270p.tar.gz", "r360p": "data/GameEngineData/ASCTeuthisan/val-360p.tar.gz", "r540p": "data/GameEngineData/ASCTeuthisan/val-540p.tar.gz", "r1080p": "data/GameEngineData/ASCTeuthisan/val-1080p.tar.gz", }, }, "GameEngine_BroadcastSample": { "train": { "r270p": "data/GameEngineData/BroadcastSample/train-270p.tar.gz", "r360p": "data/GameEngineData/BroadcastSample/train-360p.tar.gz", "r540p": "data/GameEngineData/BroadcastSample/train-540p.tar.gz", "r1080p": "data/GameEngineData/BroadcastSample/train-1080p.tar.gz", }, "val": { "r270p": "data/GameEngineData/BroadcastSample/val-270p.tar.gz", "r360p": "data/GameEngineData/BroadcastSample/val-360p.tar.gz", "r540p": "data/GameEngineData/BroadcastSample/val-540p.tar.gz", "r1080p": "data/GameEngineData/BroadcastSample/val-1080p.tar.gz", }, }, "GameEngine_CitySample": { "train": { "r270p": "data/GameEngineData/CitySample/train-270p.tar.gz", "r360p": "data/GameEngineData/CitySample/train-360p.tar.gz", "r540p": "data/GameEngineData/CitySample/train-540p.tar.gz", "r1080p": "data/GameEngineData/CitySample/train-1080p.tar.gz", }, "val": { "r270p": "data/GameEngineData/CitySample/val-270p.tar.gz", "r360p": "data/GameEngineData/CitySample/val-360p.tar.gz", "r540p": "data/GameEngineData/CitySample/val-540p.tar.gz", "r1080p": "data/GameEngineData/CitySample/val-1080p.tar.gz", }, }, "GameEngine_ElectricDreamsEnv": { "train": { "r270p": "data/GameEngineData/ElectricDreamsEnv/train-270p.tar.gz", "r360p": "data/GameEngineData/ElectricDreamsEnv/train-360p.tar.gz", "r540p": "data/GameEngineData/ElectricDreamsEnv/train-540p.tar.gz", "r1080p": "data/GameEngineData/ElectricDreamsEnv/train-1080p.tar.gz", }, "val": { "r270p": "data/GameEngineData/ElectricDreamsEnv/val-270p.tar.gz", "r360p": "data/GameEngineData/ElectricDreamsEnv/val-360p.tar.gz", "r540p": "data/GameEngineData/ElectricDreamsEnv/val-540p.tar.gz", "r1080p": "data/GameEngineData/ElectricDreamsEnv/val-1080p.tar.gz", }, }, "GameEngine_ElementalDemo": { "train": { "r270p": "data/GameEngineData/ElementalDemo/train-270p.tar.gz", "r360p": "data/GameEngineData/ElementalDemo/train-360p.tar.gz", "r540p": "data/GameEngineData/ElementalDemo/train-540p.tar.gz", "r1080p": "data/GameEngineData/ElementalDemo/train-1080p.tar.gz", }, "val": { "r270p": "data/GameEngineData/ElementalDemo/val-270p.tar.gz", "r360p": "data/GameEngineData/ElementalDemo/val-360p.tar.gz", "r540p": "data/GameEngineData/ElementalDemo/val-540p.tar.gz", "r1080p": "data/GameEngineData/ElementalDemo/val-1080p.tar.gz", }, }, "GameEngine_HillsideSample": { "train": { "r270p": "data/GameEngineData/HillsideSample/train-270p.tar.gz", "r360p": "data/GameEngineData/HillsideSample/train-360p.tar.gz", "r540p": "data/GameEngineData/HillsideSample/train-540p.tar.gz", "r1080p": "data/GameEngineData/HillsideSample/train-1080p.tar.gz", }, "val": { "r270p": "data/GameEngineData/HillsideSample/val-270p.tar.gz", "r360p": "data/GameEngineData/HillsideSample/val-360p.tar.gz", "r540p": "data/GameEngineData/HillsideSample/val-540p.tar.gz", "r1080p": "data/GameEngineData/HillsideSample/val-1080p.tar.gz", }, }, "GameEngine_Matinee": { "train": { "r270p": "data/GameEngineData/Matinee/train-270p.tar.gz", "r360p": "data/GameEngineData/Matinee/train-360p.tar.gz", "r540p": "data/GameEngineData/Matinee/train-540p.tar.gz", "r1080p": "data/GameEngineData/Matinee/train-1080p.tar.gz", }, "val": { "r270p": "data/GameEngineData/Matinee/val-270p.tar.gz", "r360p": "data/GameEngineData/Matinee/val-360p.tar.gz", "r540p": "data/GameEngineData/Matinee/val-540p.tar.gz", "r1080p": "data/GameEngineData/Matinee/val-1080p.tar.gz", }, }, "GameEngine_MeerkatDemo": { "train": { "r270p": "data/GameEngineData/MeerkatDemo/train-270p.tar.gz", "r360p": "data/GameEngineData/MeerkatDemo/train-360p.tar.gz", "r540p": "data/GameEngineData/MeerkatDemo/train-540p.tar.gz", "r1080p": "data/GameEngineData/MeerkatDemo/train-1080p.tar.gz", }, "val": { "r270p": "data/GameEngineData/MeerkatDemo/val-270p.tar.gz", "r360p": "data/GameEngineData/MeerkatDemo/val-360p.tar.gz", "r540p": "data/GameEngineData/MeerkatDemo/val-540p.tar.gz", "r1080p": "data/GameEngineData/MeerkatDemo/val-1080p.tar.gz", }, }, "GameEngine_MLDeformerSample": { "train": { "r270p": "data/GameEngineData/MLDeformerSample/train-270p.tar.gz", "r360p": "data/GameEngineData/MLDeformerSample/train-360p.tar.gz", "r540p": "data/GameEngineData/MLDeformerSample/train-540p.tar.gz", "r1080p": "data/GameEngineData/MLDeformerSample/train-1080p.tar.gz", }, "val": { "r270p": "data/GameEngineData/MLDeformerSample/val-270p.tar.gz", "r360p": "data/GameEngineData/MLDeformerSample/val-360p.tar.gz", "r540p": "data/GameEngineData/MLDeformerSample/val-540p.tar.gz", "r1080p": "data/GameEngineData/MLDeformerSample/val-1080p.tar.gz", }, }, "GameEngine_ParticleEffects": { "train": { "r270p": "data/GameEngineData/ParticleEffects/train-270p.tar.gz", "r360p": "data/GameEngineData/ParticleEffects/train-360p.tar.gz", "r540p": "data/GameEngineData/ParticleEffects/train-540p.tar.gz", "r1080p": "data/GameEngineData/ParticleEffects/train-1080p.tar.gz", }, "val": { "r270p": "data/GameEngineData/ParticleEffects/val-270p.tar.gz", "r360p": "data/GameEngineData/ParticleEffects/val-360p.tar.gz", "r540p": "data/GameEngineData/ParticleEffects/val-540p.tar.gz", "r1080p": "data/GameEngineData/ParticleEffects/val-1080p.tar.gz", }, }, "GameEngine_RealisticRendering": { "train": { "r270p": "data/GameEngineData/RealisticRendering/train-270p.tar.gz", "r360p": "data/GameEngineData/RealisticRendering/train-360p.tar.gz", "r540p": "data/GameEngineData/RealisticRendering/train-540p.tar.gz", "r1080p": "data/GameEngineData/RealisticRendering/train-1080p.tar.gz", }, "val": { "r270p": "data/GameEngineData/RealisticRendering/val-270p.tar.gz", "r360p": "data/GameEngineData/RealisticRendering/val-360p.tar.gz", "r540p": "data/GameEngineData/RealisticRendering/val-540p.tar.gz", "r1080p": "data/GameEngineData/RealisticRendering/val-1080p.tar.gz", }, }, "GameEngine_SlayAnimationSample": { "train": { "r270p": "data/GameEngineData/SlayAnimationSample/train-270p.tar.gz", "r360p": "data/GameEngineData/SlayAnimationSample/train-360p.tar.gz", "r540p": "data/GameEngineData/SlayAnimationSample/train-540p.tar.gz", "r1080p": "data/GameEngineData/SlayAnimationSample/train-1080p.tar.gz", }, "val": { "r270p": "data/GameEngineData/SlayAnimationSample/val-270p.tar.gz", "r360p": "data/GameEngineData/SlayAnimationSample/val-360p.tar.gz", "r540p": "data/GameEngineData/SlayAnimationSample/val-540p.tar.gz", "r1080p": "data/GameEngineData/SlayAnimationSample/val-1080p.tar.gz", }, }, "GameEngine_StylizedRendering": { "train": { "r270p": "data/GameEngineData/StylizedRendering/train-270p.tar.gz", "r360p": "data/GameEngineData/StylizedRendering/train-360p.tar.gz", "r540p": "data/GameEngineData/StylizedRendering/train-540p.tar.gz", "r1080p": "data/GameEngineData/StylizedRendering/train-1080p.tar.gz", }, "val": { "r270p": "data/GameEngineData/StylizedRendering/val-270p.tar.gz", "r360p": "data/GameEngineData/StylizedRendering/val-360p.tar.gz", "r540p": "data/GameEngineData/StylizedRendering/val-540p.tar.gz", "r1080p": "data/GameEngineData/StylizedRendering/val-1080p.tar.gz", }, }, "GameEngine_SubwaySequencer": { "train": { "r270p": "data/GameEngineData/SubwaySequencer/train-270p.tar.gz", "r360p": "data/GameEngineData/SubwaySequencer/train-360p.tar.gz", "r540p": "data/GameEngineData/SubwaySequencer/train-540p.tar.gz", "r1080p": "data/GameEngineData/SubwaySequencer/train-1080p.tar.gz", }, "val": { "r270p": "data/GameEngineData/SubwaySequencer/val-270p.tar.gz", "r360p": "data/GameEngineData/SubwaySequencer/val-360p.tar.gz", "r540p": "data/GameEngineData/SubwaySequencer/val-540p.tar.gz", "r1080p": "data/GameEngineData/SubwaySequencer/val-1080p.tar.gz", }, }, "GameEngine_SunTemple": { "train": { "r270p": "data/GameEngineData/SunTemple/train-270p.tar.gz", "r360p": "data/GameEngineData/SunTemple/train-360p.tar.gz", "r540p": "data/GameEngineData/SunTemple/train-540p.tar.gz", "r1080p": "data/GameEngineData/SunTemple/train-1080p.tar.gz", }, "val": { "r270p": "data/GameEngineData/SunTemple/val-270p.tar.gz", "r360p": "data/GameEngineData/SunTemple/val-360p.tar.gz", "r540p": "data/GameEngineData/SunTemple/val-540p.tar.gz", "r1080p": "data/GameEngineData/SunTemple/val-1080p.tar.gz", }, }, } # we need to form lists with same resolutions to get all project at once _DATA_FILES_GAME_ENGINE_KEYS = list(_DATA_FILES_GAME_ENGINE.keys()) _DATA_FILES_GAME_ENGINE["GameEngine_All"] = { "train": { "r270p": sorted( [ _DATA_FILES_GAME_ENGINE[k]["train"]["r270p"] for k in _DATA_FILES_GAME_ENGINE_KEYS ] ), "r360p": sorted( [ _DATA_FILES_GAME_ENGINE[k]["train"]["r360p"] for k in _DATA_FILES_GAME_ENGINE_KEYS ] ), "r540p": sorted( [ _DATA_FILES_GAME_ENGINE[k]["train"]["r540p"] for k in _DATA_FILES_GAME_ENGINE_KEYS ] ), "r1080p": sorted( [ _DATA_FILES_GAME_ENGINE[k]["train"]["r1080p"] for k in _DATA_FILES_GAME_ENGINE_KEYS ] ), }, "val": { "r270p": sorted( [ _DATA_FILES_GAME_ENGINE[k]["val"]["r270p"] for k in _DATA_FILES_GAME_ENGINE_KEYS ] ), "r360p": sorted( [ _DATA_FILES_GAME_ENGINE[k]["val"]["r360p"] for k in _DATA_FILES_GAME_ENGINE_KEYS ] ), "r540p": sorted( [ _DATA_FILES_GAME_ENGINE[k]["val"]["r540p"] for k in _DATA_FILES_GAME_ENGINE_KEYS ] ), "r1080p": sorted( [ _DATA_FILES_GAME_ENGINE[k]["val"]["r1080p"] for k in _DATA_FILES_GAME_ENGINE_KEYS ] ), }, } _DATA_FILES_DOWNSCALE = { "Downscale_ActionRPG": { "train": { "r270p": "data/DownscaleData/ActionRPG/train-270p.tar.gz", "r360p": "data/DownscaleData/ActionRPG/train-360p.tar.gz", "r540p": "data/DownscaleData/ActionRPG/train-540p.tar.gz", "r1080p": "data/DownscaleData/ActionRPG/train-1080p.tar.gz", }, "val": { "r270p": "data/DownscaleData/ActionRPG/val-270p.tar.gz", "r360p": "data/DownscaleData/ActionRPG/val-360p.tar.gz", "r540p": "data/DownscaleData/ActionRPG/val-540p.tar.gz", "r1080p": "data/DownscaleData/ActionRPG/val-1080p.tar.gz", }, }, "Downscale_ArchVizInterior": { "train": { "r270p": "data/DownscaleData/ArchVizInterior/train-270p.tar.gz", "r360p": "data/DownscaleData/ArchVizInterior/train-360p.tar.gz", "r540p": "data/DownscaleData/ArchVizInterior/train-540p.tar.gz", "r1080p": "data/DownscaleData/ArchVizInterior/train-1080p.tar.gz", }, "val": { "r270p": "data/DownscaleData/ArchVizInterior/val-270p.tar.gz", "r360p": "data/DownscaleData/ArchVizInterior/val-360p.tar.gz", "r540p": "data/DownscaleData/ArchVizInterior/val-540p.tar.gz", "r1080p": "data/DownscaleData/ArchVizInterior/val-1080p.tar.gz", }, }, "Downscale_ASCTeuthisan": { "train": { "r270p": "data/DownscaleData/ASCTeuthisan/train-270p.tar.gz", "r360p": "data/DownscaleData/ASCTeuthisan/train-360p.tar.gz", "r540p": "data/DownscaleData/ASCTeuthisan/train-540p.tar.gz", "r1080p": "data/DownscaleData/ASCTeuthisan/train-1080p.tar.gz", }, "val": { "r270p": "data/DownscaleData/ASCTeuthisan/val-270p.tar.gz", "r360p": "data/DownscaleData/ASCTeuthisan/val-360p.tar.gz", "r540p": "data/DownscaleData/ASCTeuthisan/val-540p.tar.gz", "r1080p": "data/DownscaleData/ASCTeuthisan/val-1080p.tar.gz", }, }, "Downscale_BroadcastSample": { "train": { "r270p": "data/DownscaleData/BroadcastSample/train-270p.tar.gz", "r360p": "data/DownscaleData/BroadcastSample/train-360p.tar.gz", "r540p": "data/DownscaleData/BroadcastSample/train-540p.tar.gz", "r1080p": "data/DownscaleData/BroadcastSample/train-1080p.tar.gz", }, "val": { "r270p": "data/DownscaleData/BroadcastSample/val-270p.tar.gz", "r360p": "data/DownscaleData/BroadcastSample/val-360p.tar.gz", "r540p": "data/DownscaleData/BroadcastSample/val-540p.tar.gz", "r1080p": "data/DownscaleData/BroadcastSample/val-1080p.tar.gz", }, }, "Downscale_ElectricDreamsEnv": { "train": { "r270p": "data/DownscaleData/ElectricDreamsEnv/train-270p.tar.gz", "r360p": "data/DownscaleData/ElectricDreamsEnv/train-360p.tar.gz", "r540p": "data/DownscaleData/ElectricDreamsEnv/train-540p.tar.gz", "r1080p": "data/DownscaleData/ElectricDreamsEnv/train-1080p.tar.gz", }, "val": { "r270p": "data/DownscaleData/ElectricDreamsEnv/val-270p.tar.gz", "r360p": "data/DownscaleData/ElectricDreamsEnv/val-360p.tar.gz", "r540p": "data/DownscaleData/ElectricDreamsEnv/val-540p.tar.gz", "r1080p": "data/DownscaleData/ElectricDreamsEnv/val-1080p.tar.gz", }, }, "Downscale_ElementalDemo": { "train": { "r270p": "data/DownscaleData/ElementalDemo/train-270p.tar.gz", "r360p": "data/DownscaleData/ElementalDemo/train-360p.tar.gz", "r540p": "data/DownscaleData/ElementalDemo/train-540p.tar.gz", "r1080p": "data/DownscaleData/ElementalDemo/train-1080p.tar.gz", }, "val": { "r270p": "data/DownscaleData/ElementalDemo/val-270p.tar.gz", "r360p": "data/DownscaleData/ElementalDemo/val-360p.tar.gz", "r540p": "data/DownscaleData/ElementalDemo/val-540p.tar.gz", "r1080p": "data/DownscaleData/ElementalDemo/val-1080p.tar.gz", }, }, "Downscale_HillsideSample": { "train": { "r270p": "data/DownscaleData/HillsideSample/train-270p.tar.gz", "r360p": "data/DownscaleData/HillsideSample/train-360p.tar.gz", "r540p": "data/DownscaleData/HillsideSample/train-540p.tar.gz", "r1080p": "data/DownscaleData/HillsideSample/train-1080p.tar.gz", }, "val": { "r270p": "data/DownscaleData/HillsideSample/val-270p.tar.gz", "r360p": "data/DownscaleData/HillsideSample/val-360p.tar.gz", "r540p": "data/DownscaleData/HillsideSample/val-540p.tar.gz", "r1080p": "data/DownscaleData/HillsideSample/val-1080p.tar.gz", }, }, "Downscale_Matinee": { "train": { "r270p": "data/DownscaleData/Matinee/train-270p.tar.gz", "r360p": "data/DownscaleData/Matinee/train-360p.tar.gz", "r540p": "data/DownscaleData/Matinee/train-540p.tar.gz", "r1080p": "data/DownscaleData/Matinee/train-1080p.tar.gz", }, "val": { "r270p": "data/DownscaleData/Matinee/val-270p.tar.gz", "r360p": "data/DownscaleData/Matinee/val-360p.tar.gz", "r540p": "data/DownscaleData/Matinee/val-540p.tar.gz", "r1080p": "data/DownscaleData/Matinee/val-1080p.tar.gz", }, }, "Downscale_MeerkatDemo": { "train": { "r270p": "data/DownscaleData/MeerkatDemo/train-270p.tar.gz", "r360p": "data/DownscaleData/MeerkatDemo/train-360p.tar.gz", "r540p": "data/DownscaleData/MeerkatDemo/train-540p.tar.gz", "r1080p": "data/DownscaleData/MeerkatDemo/train-1080p.tar.gz", }, "val": { "r270p": "data/DownscaleData/MeerkatDemo/val-270p.tar.gz", "r360p": "data/DownscaleData/MeerkatDemo/val-360p.tar.gz", "r540p": "data/DownscaleData/MeerkatDemo/val-540p.tar.gz", "r1080p": "data/DownscaleData/MeerkatDemo/val-1080p.tar.gz", }, }, "Downscale_MLDeformerSample": { "train": { "r270p": "data/DownscaleData/MLDeformerSample/train-270p.tar.gz", "r360p": "data/DownscaleData/MLDeformerSample/train-360p.tar.gz", "r540p": "data/DownscaleData/MLDeformerSample/train-540p.tar.gz", "r1080p": "data/DownscaleData/MLDeformerSample/train-1080p.tar.gz", }, "val": { "r270p": "data/DownscaleData/MLDeformerSample/val-270p.tar.gz", "r360p": "data/DownscaleData/MLDeformerSample/val-360p.tar.gz", "r540p": "data/DownscaleData/MLDeformerSample/val-540p.tar.gz", "r1080p": "data/DownscaleData/MLDeformerSample/val-1080p.tar.gz", }, }, "Downscale_ParticleEffects": { "train": { "r270p": "data/DownscaleData/ParticleEffects/train-270p.tar.gz", "r360p": "data/DownscaleData/ParticleEffects/train-360p.tar.gz", "r540p": "data/DownscaleData/ParticleEffects/train-540p.tar.gz", "r1080p": "data/DownscaleData/ParticleEffects/train-1080p.tar.gz", }, "val": { "r270p": "data/DownscaleData/ParticleEffects/val-270p.tar.gz", "r360p": "data/DownscaleData/ParticleEffects/val-360p.tar.gz", "r540p": "data/DownscaleData/ParticleEffects/val-540p.tar.gz", "r1080p": "data/DownscaleData/ParticleEffects/val-1080p.tar.gz", }, }, "Downscale_RealisticRendering": { "train": { "r270p": "data/DownscaleData/RealisticRendering/train-270p.tar.gz", "r360p": "data/DownscaleData/RealisticRendering/train-360p.tar.gz", "r540p": "data/DownscaleData/RealisticRendering/train-540p.tar.gz", "r1080p": "data/DownscaleData/RealisticRendering/train-1080p.tar.gz", }, "val": { "r270p": "data/DownscaleData/RealisticRendering/val-270p.tar.gz", "r360p": "data/DownscaleData/RealisticRendering/val-360p.tar.gz", "r540p": "data/DownscaleData/RealisticRendering/val-540p.tar.gz", "r1080p": "data/DownscaleData/RealisticRendering/val-1080p.tar.gz", }, }, "Downscale_SlayAnimationSample": { "train": { "r270p": "data/DownscaleData/SlayAnimationSample/train-270p.tar.gz", "r360p": "data/DownscaleData/SlayAnimationSample/train-360p.tar.gz", "r540p": "data/DownscaleData/SlayAnimationSample/train-540p.tar.gz", "r1080p": "data/DownscaleData/SlayAnimationSample/train-1080p.tar.gz", }, "val": { "r270p": "data/DownscaleData/SlayAnimationSample/val-270p.tar.gz", "r360p": "data/DownscaleData/SlayAnimationSample/val-360p.tar.gz", "r540p": "data/DownscaleData/SlayAnimationSample/val-540p.tar.gz", "r1080p": "data/DownscaleData/SlayAnimationSample/val-1080p.tar.gz", }, }, "Downscale_StylizedRendering": { "train": { "r270p": "data/DownscaleData/StylizedRendering/train-270p.tar.gz", "r360p": "data/DownscaleData/StylizedRendering/train-360p.tar.gz", "r540p": "data/DownscaleData/StylizedRendering/train-540p.tar.gz", "r1080p": "data/DownscaleData/StylizedRendering/train-1080p.tar.gz", }, "val": { "r270p": "data/DownscaleData/StylizedRendering/val-270p.tar.gz", "r360p": "data/DownscaleData/StylizedRendering/val-360p.tar.gz", "r540p": "data/DownscaleData/StylizedRendering/val-540p.tar.gz", "r1080p": "data/DownscaleData/StylizedRendering/val-1080p.tar.gz", }, }, "Downscale_SubwaySequencer": { "train": { "r270p": "data/DownscaleData/SubwaySequencer/train-270p.tar.gz", "r360p": "data/DownscaleData/SubwaySequencer/train-360p.tar.gz", "r540p": "data/DownscaleData/SubwaySequencer/train-540p.tar.gz", "r1080p": "data/DownscaleData/SubwaySequencer/train-1080p.tar.gz", }, "val": { "r270p": "data/DownscaleData/SubwaySequencer/val-270p.tar.gz", "r360p": "data/DownscaleData/SubwaySequencer/val-360p.tar.gz", "r540p": "data/DownscaleData/SubwaySequencer/val-540p.tar.gz", "r1080p": "data/DownscaleData/SubwaySequencer/val-1080p.tar.gz", }, }, "Downscale_SunTemple": { "train": { "r270p": "data/DownscaleData/SunTemple/train-270p.tar.gz", "r360p": "data/DownscaleData/SunTemple/train-360p.tar.gz", "r540p": "data/DownscaleData/SunTemple/train-540p.tar.gz", "r1080p": "data/DownscaleData/SunTemple/train-1080p.tar.gz", }, "val": { "r270p": "data/DownscaleData/SunTemple/val-270p.tar.gz", "r360p": "data/DownscaleData/SunTemple/val-360p.tar.gz", "r540p": "data/DownscaleData/SunTemple/val-540p.tar.gz", "r1080p": "data/DownscaleData/SunTemple/val-1080p.tar.gz", }, }, "Downscale_DMXPrevisSample": { "train": { "r270p": "data/DownscaleData/DMXPrevisSample/train-270p.tar.gz", "r360p": "data/DownscaleData/DMXPrevisSample/train-360p.tar.gz", "r540p": "data/DownscaleData/DMXPrevisSample/train-540p.tar.gz", "r1080p": "data/DownscaleData/DMXPrevisSample/train-1080p.tar.gz", }, "val": { "r270p": "data/DownscaleData/DMXPrevisSample/val-270p.tar.gz", "r360p": "data/DownscaleData/DMXPrevisSample/val-360p.tar.gz", "r540p": "data/DownscaleData/DMXPrevisSample/val-540p.tar.gz", "r1080p": "data/DownscaleData/DMXPrevisSample/val-1080p.tar.gz", }, }, "Downscale_Dota2": { "train": { "r270p": "data/DownscaleData/Dota2/train-270p.tar.gz", "r360p": "data/DownscaleData/Dota2/train-360p.tar.gz", "r540p": "data/DownscaleData/Dota2/train-540p.tar.gz", "r1080p": "data/DownscaleData/Dota2/train-1080p.tar.gz", }, "val": { "r270p": "data/DownscaleData/Dota2/val-270p.tar.gz", "r360p": "data/DownscaleData/Dota2/val-360p.tar.gz", "r540p": "data/DownscaleData/Dota2/val-540p.tar.gz", "r1080p": "data/DownscaleData/Dota2/val-1080p.tar.gz", }, }, "Downscale_CitySample": { "train": { "r270p": "data/DownscaleData/CitySample/train-270p.tar.gz", "r360p": "data/DownscaleData/CitySample/train-360p.tar.gz", "r540p": "data/DownscaleData/CitySample/train-540p.tar.gz", "r1080p": "data/DownscaleData/CitySample/train-1080p.tar.gz", }, "val": { "r270p": "data/DownscaleData/CitySample/val-270p.tar.gz", "r360p": "data/DownscaleData/CitySample/val-360p.tar.gz", "r540p": "data/DownscaleData/CitySample/val-540p.tar.gz", "r1080p": "data/DownscaleData/CitySample/val-1080p.tar.gz", }, }, "Downscale_CSGO": { "train": { "r270p": "data/DownscaleData/CSGO/train-270p.tar.gz", "r360p": "data/DownscaleData/CSGO/train-360p.tar.gz", "r540p": "data/DownscaleData/CSGO/train-540p.tar.gz", "r1080p": "data/DownscaleData/CSGO/train-1080p.tar.gz", }, "val": { "r270p": "data/DownscaleData/CSGO/val-270p.tar.gz", "r360p": "data/DownscaleData/CSGO/val-360p.tar.gz", "r540p": "data/DownscaleData/CSGO/val-540p.tar.gz", "r1080p": "data/DownscaleData/CSGO/val-1080p.tar.gz", }, }, } # we need to form lists with same resolutions to get all project at once _DATA_FILES_DOWNSCALE_KEYS = list(_DATA_FILES_DOWNSCALE.keys()) _DATA_FILES_DOWNSCALE["Downscale_All"] = { "train": { "r270p": sorted( [ _DATA_FILES_DOWNSCALE[k]["train"]["r270p"] for k in _DATA_FILES_DOWNSCALE_KEYS ] ), "r360p": sorted( [ _DATA_FILES_DOWNSCALE[k]["train"]["r360p"] for k in _DATA_FILES_DOWNSCALE_KEYS ] ), "r540p": sorted( [ _DATA_FILES_DOWNSCALE[k]["train"]["r540p"] for k in _DATA_FILES_DOWNSCALE_KEYS ] ), "r1080p": sorted( [ _DATA_FILES_DOWNSCALE[k]["train"]["r1080p"] for k in _DATA_FILES_DOWNSCALE_KEYS ] ), }, "val": { "r270p": sorted( [ _DATA_FILES_DOWNSCALE[k]["val"]["r270p"] for k in _DATA_FILES_DOWNSCALE_KEYS ] ), "r360p": sorted( [ _DATA_FILES_DOWNSCALE[k]["val"]["r360p"] for k in _DATA_FILES_DOWNSCALE_KEYS ] ), "r540p": sorted( [ _DATA_FILES_DOWNSCALE[k]["val"]["r540p"] for k in _DATA_FILES_DOWNSCALE_KEYS ] ), "r1080p": sorted( [ _DATA_FILES_DOWNSCALE[k]["val"]["r1080p"] for k in _DATA_FILES_DOWNSCALE_KEYS ] ), }, } _DATA_FILES = {**_DATA_FILES_GAME_ENGINE, **_DATA_FILES_DOWNSCALE} class SuperResolutionGamesConfig(datasets.BuilderConfig): def __init__(self, data_files, features, **kwargs): super().__init__(version=datasets.Version("0.0.0"), **kwargs) self.data_files = data_files self.features = features class SuperResolutionGames(datasets.GeneratorBasedBuilder): BUILDER_CONFIGS = [ SuperResolutionGamesConfig( name=name, description=_DESCRIPTION_DATA[name], data_files=_DATA_FILES[name], features=["r270p", "r360p", "r540p", "r1080p"], ) for name in _PROJECTS ] def _info(self): features = {f: datasets.Image() for f in self.config.features} return datasets.DatasetInfo( description=_DESCRIPTION, features=datasets.Features(features), supervised_keys=None, ) def _split_generators(self, dl_manager): data_files = self.config.data_files train_archives, val_archives = data_files["train"], data_files["val"] train_archives_downloaded = {} for k in train_archives.keys(): train_archives_k = train_archives[k] # str - single project, list - all GameEngine / Downscale projects if isinstance(train_archives_k, str): train_archives_downloaded[k] = dl_manager.download(train_archives_k) elif isinstance(train_archives_k, list): train_archives_downloaded[k] = [ dl_manager.download(train_archives_k[i]) for i in range(len(train_archives_k)) ] else: raise TypeError() val_archives_downloaded = {} for k in val_archives.keys(): val_archives_k = val_archives[k] # str - single project, list - all GameEngine / Downscale projects if isinstance(val_archives_k, str): val_archives_downloaded[k] = dl_manager.download(val_archives_k) elif isinstance(val_archives_k, list): val_archives_downloaded[k] = [ dl_manager.download(val_archives_k[i]) for i in range(len(val_archives_k)) ] else: raise TypeError() train_gen_kwargs = {} for k in train_archives_downloaded.keys(): train_archives_downloaded_k = train_archives_downloaded[k] # str - single project, list - all GameEngine / Downscale projects if isinstance(train_archives_downloaded_k, list): train_gen_kwargs[k] = chain.from_iterable( [ dl_manager.iter_archive(train_archives_downloaded_k[i]) for i in range(len(train_archives_downloaded_k)) ] ) else: train_gen_kwargs[k] = dl_manager.iter_archive( train_archives_downloaded_k ) val_gen_kwargs = {} for k in val_archives_downloaded.keys(): val_archives_downloaded_k = val_archives_downloaded[k] # str - single project, list - all GameEngine / Downscale projects if isinstance(val_archives_downloaded_k, list): val_gen_kwargs[k] = chain.from_iterable( [ dl_manager.iter_archive(val_archives_downloaded_k[i]) for i in range(len(val_archives_downloaded_k)) ] ) else: val_gen_kwargs[k] = dl_manager.iter_archive(val_archives_downloaded_k) splits = [ datasets.SplitGenerator( name=datasets.Split.TRAIN, gen_kwargs=train_gen_kwargs ), datasets.SplitGenerator( name=datasets.Split.VALIDATION, gen_kwargs=val_gen_kwargs ), ] return splits def _generate_examples(self, r270p, r360p, r540p, r1080p): for idx, resolutions in enumerate(zip(r270p, r360p, r540p, r1080p)): r270p_i, r360p_i, r540p_i, r1080p_i = resolutions sample = { "r270p": {"path": r270p_i[0], "bytes": r270p_i[1].read()}, "r360p": {"path": r360p_i[0], "bytes": r360p_i[1].read()}, "r540p": {"path": r540p_i[0], "bytes": r540p_i[1].read()}, "r1080p": {"path": r1080p_i[0], "bytes": r1080p_i[1].read()}, } yield idx, sample