Module ivit_i.common.app

Classes

class iAPP_CLS

iVIT-I Application Object for Classification Model, if you want to use iVIT-I-{platform}-Web-Api-Fast and run your own custom application then you have to inherit this object and follow the rule.

Usage

  1. Initialize Application (*):
    • you must re-define __init__ function for your own situation.
  2. Run Application (*):
    • you must re-define __call__ function for your own situation.
  3. Check Parameters (Optional):
    • we will use verify_params(self, params: dict) -> bool to check the parameters is available or not, so you can re-define it for checking parameters in iVIT-I-{platform}-Web-Api-Fast.

Ancestors

  • ivit_i.common.app.iAPP
  • abc.ABC

Static methods

def get_type() ‑> str

Retrun CLS

class iAPP_HANDLER

iAPP_HANDLER can handle each iAPP_{TYPE} application,

Usage

  1. Using register to reigster one application or using register_from_folder to register all application.
  2. Using get_app to get the target application via key name.

Methods

def add_new_app(self, app_key: str, app_obj: ivit_i.common.app.iAPP) ‑> None

Add a new application

Args

app_key : str
the application name ( key )
app_obj : iAPP
the application object ( address )
def get_all_apps(self) ‑> dict

Get all application

def get_app(self, app_key: str) ‑> ivit_i.common.app.iAPP

Get application via key ( name )

Args

app_key : str
the application key ( name )

Raises

NameError
get unexpected application name

Returns

iAPP
iAPP Object
def get_sort_apps(self) ‑> dict

Get all application which sort by type

def get_sup_type(self) ‑> list

Get the support type of the ivitAppHandler

def get_type_app(self, app_type: str) ‑> list

Get the applications which is target type

def register(self, app_key: str, app_obj: ivit_i.common.app.iAPP) ‑> bool

Register each custom application

Args

app_key : str
the key of the application which is the keyword when user want to get the application.
app_obj : iAPP
the module of the application, we will double check is the subclasss of the iAPP or not.

Returns

bool
register success or failure
def register_from_folder(self, app_folder: str) ‑> dict

Search and import all applications that already inherit with iAPP moduel in custom folder, It will recursive all path in folder

Args

app_folder : str
the folder of all applications

Returns

dict
the dict object with each application key and object address
class iAPP_OBJ

iVIT-I Application Object for Object Detection Model, if you want to use iVIT-I-{platform}-Web-Api-Fast and run your own custom application then you have to inherit this object and follow the rule.

Usage

  1. Initialize Application (*):
    • you must re-define __init__ function for your own situation.
  2. Run Application (*):
    • you must re-define __call__ function for your own situation.
  3. Check Parameters (Optional):
    • we will use verify_params(self, params: dict) -> bool to check the parameters is available or not, so you can re-define it for checking parameters in iVIT-I-{platform}-Web-Api-Fast.

Ancestors

  • ivit_i.common.app.iAPP
  • abc.ABC

Static methods

def get_type() ‑> str

Return OBJ

class iAPP_SEG

iVIT-I Application Object for Semantic Segmentation Model, if you want to use iVIT-I-{platform}-Web-Api-Fast and run your own custom application then you have to inherit this object and follow the rule.

Usage

  1. Initialize Application (*):
    • you must re-define __init__ function for your own situation.
  2. Run Application (*):
    • you must re-define __call__ function for your own situation.
  3. Check Parameters (Optional):
    • we will use verify_params(self, params: dict) -> bool to check the parameters is available or not, so you can re-define it for checking parameters in iVIT-I-{platform}-Web-Api-Fast.

Ancestors

  • ivit_i.common.app.iAPP
  • abc.ABC

Static methods

def get_type() ‑> str

Return SEG