GTRefiner.IO package

Submodules

GTRefiner.IO.Reader module

class GTRefiner.IO.Reader.AbstractReader

Bases: object

Interface or all reader like classes.

abstract classmethod read(path: Path) Any

Read the file at given location (path).

class GTRefiner.IO.Reader.ColorTableReader

Bases: TableReader

classmethod read(path: Path) ColorTable

Read a given json-based color table. :param path: path to json-based color table :type path: Path :return: color table :rtype: ColorTable

class GTRefiner.IO.Reader.GTReader

Bases: AbstractReader

abstract classmethod read(path: Path) GroundTruth

Read the ground truth.

class GTRefiner.IO.Reader.ImageReader

Bases: GTReader

classmethod read(path: Path) RawImage

Read the ground truth.

class GTRefiner.IO.Reader.JSONReader

Bases: GTReader

classmethod read(path: Path) VectorGT

Method to read the json file and create a vector ground truth. :param xml_path: File path to PAGE XML. :type xml_path: Path :return: Vector ground truth :rtype: VectorGT

class GTRefiner.IO.Reader.PxGTReader

Bases: GTReader

classmethod read(path: Path) PixelLevelGT

Read the ground truth.

class GTRefiner.IO.Reader.TableReader

Bases: AbstractReader

abstract classmethod read(path: Path) Any

Read the file at given location (path).

class GTRefiner.IO.Reader.VisibilityTableReader

Bases: TableReader

classmethod read(path: Path) VisibilityTable

Read a given json-based visibility table. :param path: path to json-based visibility table :type path: Path :return: visibility table :rtype: VisibilityTable

class GTRefiner.IO.Reader.XMLReader

Bases: GTReader

classmethod read(path: Path) VectorGT

Reade the XML base PAGE and return a vector ground truth. :param path: File path to PAGE XML. :type path: Path :return: Vector ground truth :rtype: VectorGT

GTRefiner.IO.Writer module

class GTRefiner.IO.Writer.AbstractWriter

Bases: object

abstract classmethod write(ground_truth: <module 'GTRefiner.GTRepresentation.GroundTruth' from '/Users/loverboy99/PycharmProjects/BachelorThesis/HisDB_GT_Refinement/GTRefiner/GTRepresentation/GroundTruth.py'>, path: ~pathlib.Path)
class GTRefiner.IO.Writer.GIFWriter

Bases: ImageWriter

classmethod write(ground_truth: Image, path: Path)

Store an image as GIF. :param ground_truth: raw image to be stored :type ground_truth: Image :param path: Output path :type path: Path

class GTRefiner.IO.Writer.ImageWriter

Bases: AbstractWriter

abstract classmethod write(ground_truth: MyImage, path: Path)
class GTRefiner.IO.Writer.JSONWriter

Bases: VectorGTWriter

classmethod write(ground_truth: VectorGT, path: Path)

Write the vector based ground truth with the build()-method provided by the vector ground truth. :param ground_truth: vector ground truth to be dumped to json :type ground_truth: VectorGT :param path: Output path :type path: Path

class GTRefiner.IO.Writer.PNGWriter

Bases: ImageWriter

classmethod write(ground_truth: Image, path: Path)

Store an image as GIF. :param ground_truth: raw image to be stored :type ground_truth: Image :param path: Output path :type path: Path

class GTRefiner.IO.Writer.PXGTWriter

Bases: ImageWriter

classmethod write(ground_truth: Image, path: Path)

Write px-based ground truth image. :param ground_truth: pixel based ground truth image to be stored :type ground_truth: Image :param path: Output path :type path: Path

class GTRefiner.IO.Writer.RawImageWriter

Bases: ImageWriter

classmethod write(ground_truth: RawImage, path: Path, format: str = '.gif')

Write raw image (original image that may haven been resized and/or cropped). :param ground_truth: raw image to be stored, defaults to GIF. :type ground_truth: Image :param path: Output path :type path: Path

class GTRefiner.IO.Writer.VectorGTWriter

Bases: AbstractWriter

abstract classmethod write(ground_truth: VectorGT, path: Path)
class GTRefiner.IO.Writer.XMLWriter

Bases: VectorGTWriter

classmethod write(ground_truth: VectorGT, path: Path)

Module contents