Module ivit_i.common.app
Classes
class iAPP_CLS
-
iVIT-I
Application Object forClassification
Model, if you want to useiVIT-I-{platform}-Web-Api-Fast
and run your own custom application then you have to inherit this object and follow the rule.Usage
- Initialize Application (*):
- you must re-define
__init__
function for your own situation.
- you must re-define
- Run Application (*):
- you must re-define
__call__
function for your own situation.
- you must re-define
- 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 iniVIT-I-{platform}-Web-Api-Fast
.
- we will use
Ancestors
- ivit_i.common.app.iAPP
- abc.ABC
Static methods
def get_type() ‑> str
-
Retrun
CLS
- Initialize Application (*):
class iAPP_HANDLER
-
iAPP_HANDLER
can handle eachiAPP_{TYPE}
application,Usage
- Using
register
to reigster one application or usingregister_from_folder
to register all application. - 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
- Using
class iAPP_OBJ
-
iVIT-I
Application Object forObject Detection
Model, if you want to useiVIT-I-{platform}-Web-Api-Fast
and run your own custom application then you have to inherit this object and follow the rule.Usage
- Initialize Application (*):
- you must re-define
__init__
function for your own situation.
- you must re-define
- Run Application (*):
- you must re-define
__call__
function for your own situation.
- you must re-define
- 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 iniVIT-I-{platform}-Web-Api-Fast
.
- we will use
Ancestors
- ivit_i.common.app.iAPP
- abc.ABC
Static methods
def get_type() ‑> str
-
Return
OBJ
- Initialize Application (*):
class iAPP_SEG
-
iVIT-I
Application Object forSemantic Segmentation
Model, if you want to useiVIT-I-{platform}-Web-Api-Fast
and run your own custom application then you have to inherit this object and follow the rule.Usage
- Initialize Application (*):
- you must re-define
__init__
function for your own situation.
- you must re-define
- Run Application (*):
- you must re-define
__call__
function for your own situation.
- you must re-define
- 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 iniVIT-I-{platform}-Web-Api-Fast
.
- we will use
Ancestors
- ivit_i.common.app.iAPP
- abc.ABC
Static methods
def get_type() ‑> str
-
Return
SEG
- Initialize Application (*):