pic_scanner.common.constants package

Subpackages

Module contents

__init__.py

This module contains constants and default settings used across the application.

Imports:

from .defaults import * from .meta.constants import *

Constants:

AUTHORS (list): A list of authors of the project. DEFAULT_BASE_URL (str): The default base URL for the API. FILE_SYSTEM_DEFAULTS (dict): Default settings for the file system. IMAGE_EXTENSIONS (list): A list of valid image extensions. LABEL_DESCRIPTIONS (dict): A dictionary containing labels and their descriptions. PROG_NAME (str): The name of the program. RELEASE_MAP (dict): A mapping of releases. UNIT_ABBREVIATION_MAP (dict): A dictionary that maps unit abbreviations to their full names. URLS (dict): A dictionary containing various URLs used in the application. VALID_LABELS (set): A set of valid labels that can be used to classify images in the dataset. VERSION (str): The version of the program.

pic_scanner.common.constants.UNIT_ABBREVIATION_MAP

A dictionary that maps unit abbreviations to their full names. .. rubric:: Example

{

‘B’: ‘bytes’, ‘KB’: ‘kilobytes’, ‘MB’: ‘megabytes’, ‘GB’: ‘gigabytes’, ‘TB’: ‘terabytes’, ‘PB’: ‘petabytes’, ‘EB’: ‘exabytes’, ‘ZB’: ‘zetabytes’, ‘YB’: ‘yottabytes’,

}

Type:

dict

pic_scanner.common.constants.DEFAULT_BASE_URL

The default base URL for the API. Example: ‘http://localhost:8080/infer

Type:

str

pic_scanner.common.constants.LABEL_DESCRIPTIONS

A dictionary that contains the labels and their descriptions. .. rubric:: Example

{

“FEMALE_GENITALIA_COVERED”: “Female genitalia covered”, “FACE_FEMALE”: “Female face”, “BUTTOCKS_EXPOSED”: “Exposed buttocks”, “FEMALE_BREAST_EXPOSED”: “Exposed female breasts”, “FEMALE_GENITALIA_EXPOSED”: “Exposed female genitalia”, “MALE_BREAST_EXPOSED”: “Exposed male breasts”, “ANUS_EXPOSED”: “Exposed anus”, “FEET_EXPOSED”: “Exposed feet”, “BELLY_COVERED”: “Covered belly”, “FEET_COVERED”: “Covered feet”, “ARMPITS_COVERED”: “Covered armpits”, “ARMPITS_EXPOSED”: “Exposed armpits”, “FACE_MALE”: “Male face”, “BELLY_EXPOSED”: “Exposed belly”, “MALE_GENITALIA_EXPOSED”: “Exposed male genitalia”, “ANUS_COVERED”: “Covered anus”, “FEMALE_BREAST_COVERED”: “Covered female breasts”, “BUTTOCKS_COVERED”: “Covered buttocks”,

}

Type:

dict

pic_scanner.common.constants.VALID_LABELS

A set of valid labels that can be used to classify images in the dataset. .. rubric:: Example

{“FEMALE_GENITALIA_COVERED”, “FACE_FEMALE”, “BUTTOCKS_EXPOSED”, …}

Type:

set

pic_scanner.common.constants.IMAGE_EXTENSIONS

A list of valid image extensions. Example: [‘.png’, ‘.jpg’, ‘.jpeg’, ‘.bmp’, ‘.tiff’]

Type:

list

pic_scanner.common.constants.DEFAULT_BASE_URL = 'http://localhost:8080/infer'

str: The default base URL for the API.

pic_scanner.common.constants.IMAGE_EXTENSIONS = ['.png', '.jpg', '.jpeg', '.bmp', '.tiff']

list: A list of valid image extensions.

pic_scanner.common.constants.LABEL_DESCRIPTIONS = {'ANUS_COVERED': 'Covered anus', 'ANUS_EXPOSED': 'Exposed anus', 'ARMPITS_COVERED': 'Covered armpits', 'ARMPITS_EXPOSED': 'Exposed armpits', 'BELLY_COVERED': 'Covered belly', 'BELLY_EXPOSED': 'Exposed belly', 'BUTTOCKS_COVERED': 'Covered buttocks', 'BUTTOCKS_EXPOSED': 'Exposed buttocks', 'FACE_FEMALE': 'Female face', 'FACE_MALE': 'Male face', 'FEET_COVERED': 'Covered feet', 'FEET_EXPOSED': 'Exposed feet', 'FEMALE_BREAST_COVERED': 'Covered female breasts', 'FEMALE_BREAST_EXPOSED': 'Exposed female breasts', 'FEMALE_GENITALIA_COVERED': 'Female genitalia covered', 'FEMALE_GENITALIA_EXPOSED': 'Exposed female genitalia', 'MALE_BREAST_EXPOSED': 'Exposed male breasts', 'MALE_GENITALIA_EXPOSED': 'Exposed male genitalia'}

dict: A dictionary that contains the labels and their descriptions.

The keys are the labels and the values are the descriptions.

pic_scanner.common.constants.UNIT_ABBREVIATION_MAP = {'B': 'bytes', 'EB': 'exabytes', 'GB': 'gigabytes', 'KB': 'kilobytes', 'MB': 'megabytes', 'PB': 'petabytes', 'TB': 'terabytes', 'YB': 'yottabytes', 'ZB': 'zetabytes'}

dict: A dictionary that maps unit abbreviations to their full names.

pic_scanner.common.constants.VALID_LABELS = {'ANUS_COVERED', 'ANUS_EXPOSED', 'ARMPITS_COVERED', 'ARMPITS_EXPOSED', 'BELLY_COVERED', 'BELLY_EXPOSED', 'BUTTOCKS_COVERED', 'BUTTOCKS_EXPOSED', 'FACE_FEMALE', 'FACE_MALE', 'FEET_COVERED', 'FEET_EXPOSED', 'FEMALE_BREAST_COVERED', 'FEMALE_BREAST_EXPOSED', 'FEMALE_GENITALIA_COVERED', 'FEMALE_GENITALIA_EXPOSED', 'MALE_BREAST_EXPOSED', 'MALE_GENITALIA_EXPOSED'}

set: A set of valid labels that can be used to classify images in the dataset.