ImageLogger(save_dir: str, result_buffer: threedb.utils.CyclicBuffer, config: Dict[str, Any])¶
This logger saves all the images generated by 3DB during a given experiment.
The renderer should expose a static property
threedb.rendering.render_blender.Blender.KEYS) that contains the dictionary keys that correspond to renderered images. For each key, images of that type are saved to an
images/ID_<KEY>subdirectory of the given logging directory.
__init__(save_dir: str, result_buffer: threedb.utils.CyclicBuffer, config: Dict[str, Any]) → None¶
Initializes an ImageLogger
save_dir (str) – Parent directory in which the images will be saved (in an
result_buffer (CyclicBuffer) – The buffer that is being written to by the policy controller containing all the results
config (Dict[str, Any]) – Config that the experiment was run with (see here for information on config file format)
log(item: Dict[str, Any]) → None¶
item (Dict[str, Any]) – Writes the images (as dictated by the
threedb.rendering.base_renderer.BaseRenderer.KEYSfield in the renderer) to the appropriate subdirectory.
end() → None¶
Performs cleanup operations for the logger. No-op by default, should be overriden with code for closing any open file handles, ports, etc.