zensvi.cv.ClassifierPerception ============================== .. py:class:: zensvi.cv.ClassifierPerception(perception_study, device=None, verbosity=1) Bases: :py:obj:`zensvi.cv.classification.base.BaseClassifier` A classifier for evaluating the perception of streetscape based on a given study. :param perception_study: The specific perception study for which the model is trained, including "safer", "livelier", "wealthier", "more beautiful", "more boring", "more depressing". This affects the checkpoint file used. :type perception_study: str :param device: The device that the model should be loaded onto. Options are "cpu", "cuda", or "mps". If `None`, the model tries to use a GPU if available; otherwise, falls back to CPU. :type device: str, optional :param verbosity: Level of verbosity for progress bars. Defaults to 1. 0 = no progress bars, 1 = outer loops only, 2 = all loops. :type verbosity: int, optional .. py:method:: classify(dir_input: Union[str, pathlib.Path], dir_summary_output: Union[str, pathlib.Path], batch_size=1, save_format='json csv', verbosity: int = None) -> List[str] Classifies images based on human perception of streetscapes from the specified perception study. :param dir_input: Directory containing input images. :type dir_input: Union[str, Path] :param dir_summary_output: Directory to save summary output. If None, output is not saved. :type dir_summary_output: Union[str, Path] :param batch_size: Batch size for inference. Defaults to 1. :type batch_size: int, optional :param save_format: Save format for the output. Options are "json" and "csv". Add a space between options. Defaults to "json csv". :type save_format: str, optional :param verbosity: Level of verbosity for progress bars. If None, uses the instance's verbosity level. 0 = no progress bars, 1 = outer loops only, 2 = all loops. :type verbosity: int, optional :returns: List of dictionaries containing perception scores for each image. :rtype: List[dict] .. py:property:: verbosity Property for the verbosity level of progress bars. :returns: verbosity level (0=no progress, 1=outer loops only, 2=all loops) :rtype: int