zensvi.cv.ClassifierPlaces365 ============================= .. py:class:: zensvi.cv.ClassifierPlaces365(device=None, verbosity=1) Bases: :py:obj:`zensvi.cv.classification.base.BaseClassifier` A classifier for identifying places using the Places365 model. The model is from Zhou et al. (2017) (https://github.com/CSAILVision/places365). :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_image_output: Union[str, pathlib.Path, None] = None, dir_summary_output: Union[str, pathlib.Path, None] = None, batch_size: int = 1, save_image_options: str = 'cam_image blend_image', save_format: str = 'json csv', csv_format: str = 'long', verbosity: int = None) Classifies images based on scene recognition using the Places365 model. The output file can be saved in JSON and/or CSV format and will contain the scene categories, scene attributes, and environment type (indoor or outdoor) for each image. A list of categories can be found at https://github.com/CSAILVision/places365/blob/master/categories_places365.txt and a list of attributes can be found at https://github.com/CSAILVision/places365/blob/master/labels_sunattribute.txt Scene categories' values range from 0 to 1, where 1 is the highest probability of the scene category. Scene attributes' values are the responses of the scene attributes, which are the dot product of the scene attributes' weight and the features of the image, and higher values indicate a higher presence of the attribute in the image. The environment type is either "indoor" or "outdoor". :param dir_input: Directory containing input images :param dir_image_output: Directory to save output images :param dir_summary_output: Directory to save summary output :param batch_size: Batch size for inference :param save_image_options: Save options for images ("cam_image blend_image") :param save_format: Save format for the output ("json csv") :param csv_format: CSV format for the output ("long" or "wide") :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 :raises ValueError: If neither dir_image_output nor dir_summary_output is provided .. 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