Reading session#
- pyclickimage.read_session(path: str | Path)[source]#
Read a pyclickimage session file.
The format is automatically detected from the file extension.
- Parameters:
path (str or pathlib.Path) – Session file.
- Returns:
Annotation dictionary:
image -> group -> list of points.- Return type:
dict
- pyclickimage.read_session_csv(path: str | Path)[source]#
Read a pyclickimage CSV export.
- Parameters:
path (str or pathlib.Path) – CSV export file.
- Returns:
Nested dictionary:
image -> group -> list of (x, y)- Return type:
dict
- pyclickimage.read_session_json(path: str | Path, output: Literal['dict', 'raw'] = 'dict')[source]#
Read a pyclickimage JSON session file.
- Parameters:
path (str or pathlib.Path) – JSON session file.
output ({"dict", "raw"}, default="dict") –
Output format.
"dict":Return only the annotation data:
image -> group -> list of (x, y).
"raw":Return the complete JSON session dictionary.
- Returns:
Session data.
- Return type:
dict