Subclass of threedb.result_logging.base_logger.BaseLogger.

class threedb.result_logging.image_logger.ImageLogger(save_dir: str, result_buffer: threedb.utils.CyclicBuffer, config: Dict[str, Any])

Bases: threedb.result_logging.base_logger.BaseLogger

This logger saves all the images generated by 3DB during a given experiment.

The renderer should expose a static property KEYS (e.g. 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 images/ subdirectory)

  • 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

Implementation of log() for ImageLogger


item (Dict[str, Any]) – Writes the images (as dictated by the threedb.rendering.base_renderer.BaseRenderer.KEYS field in the renderer) to the appropriate subdirectory.


Performs cleanup operations for the logger. No-op by default, should be overriden with code for closing any open file handles, ports, etc.


alias of threedb.result_logging.image_logger.ImageLogger