ISAT package

Subpackages

Submodules

ISAT.annotation module

class ISAT.annotation.Object(category, group, segmentation, area, layer, bbox, iscrowd=False, note='')

Bases: object

A class to represent an annotation object.

Parameters:
  • category (str) – The category of the object.

  • group (int) – The group of the object.

  • segmentation (list | tuple) – The vertices of the object.[(x1, y1), (x2, y2), …]

  • area (float) – The area of the object.

  • layer (int) – The layer of the object.

  • bbox (list | tuple) – The bbox of the object. [xmin, ymin, xmax, ymax]

  • iscrowd (bool) – The crowd tag of the object.

  • note (str) – The note of the object.

class ISAT.annotation.Annotation(image_path, label_path)

Bases: object

A class to represent an annotation containing many objects.

Parameters:
  • image_path (str) – The path to the image.

  • label_path (str) – The path to the label file.

description

Always ‘ISAT’.

Type:

str

img_folder

The path to the folder where the images are located.

Type:

str

img_name

The name of the image.

Type:

str

label_path

The path to the label file.

Type:

str

note

The note of the image.

Type:

str

height

The height of the image.

Type:

int

width

The width of the image.

Type:

int

depth

The depth of the image.

Type:

int

load_annotation()

Load annotation from self.label_path

save_annotation()

Save annotation to self.label_path

ISAT.configs module

ISAT.configs.load_config(file)

Load config file

Parameters:

file (str) – config file path

Returns:

config dict

Return type:

dict

ISAT.configs.save_config(cfg, file)

Save config file

Parameters:
  • cfg (dict) – config dict

  • file (str) – config file path

Return type:

None

class ISAT.configs.STATUSMode(value)

Bases: Enum

The status mode

VIEW = 0
CREATE = 1
EDIT = 2
REPAINT = 3
class ISAT.configs.DRAWMode(value)

Bases: Enum

The draw mode.

POLYGON = 0

Manually draw polygon

SEGMENTANYTHING_POINT = 1

Segment anything with point prompt.

SEGMENTANYTHING_BOX = 2

Segment anything with box prompt.

SEGMENTANYTHING_VISUAL = 3

Segment anything with visual prompt.

class ISAT.configs.MAPMode(value)

Bases: Enum

Canvas show map mode

LABEL = 0
SEMANTIC = 1
INSTANCE = 2
class ISAT.configs.CONTOURMode(value)

Bases: Enum

Contour Mode - ways to convert masks to polygons.

SAVE_MAX_ONLY = 0

Only save max contour.

SAVE_EXTERNAL = 1

Only save external contour.

SAVE_ALL = 2

Only save all contour.

ISAT.main module

ISAT.main.main()

Module contents