DS2
class DS2()
This namespace provides python functions that are more generally used for AI development.
init()
Parmeters
apptoken (str) : Access apptoken for making client requests.
Fields
utilClass : Get class Util as an object.
url : DS2 API url information.
apptoken : Apptoken (input data).
user : User information with input apptoken information.
user_token : User information with input apptoken information.
get_user_info()
Returns a storage of the user information as a corresponding apptoken of user object.
Return type
class util.User
User information
create_project()
Creates an CLICK AI project with a data_file in the local repository.
Parmeters
data_file (.csv, .zip, .mp4, .mov) : The local path of the file you want to upload to the server. The data file format supports csv, mp4, mov, and zip, and the zip file can include image files such as jpg, jpeg, png, and gif format.
predict_column_name (int) : When the format of data_file is .csv, the predict column name. (if data_file has label data, input the column name the data file has. Otherwise, enter a new name you want as the result column name) If the format of data_file is not .csv, leave as default value.
frame (int) : When the format of data_file is .mp4 or .mov, a number of frames per minute betwwen 1 and 600. If the format of data_file is neither .mp4 nor .mov, leave it as default.
training_method (str) : One of the suitable training methods with your data_file from 'image', 'normal_classification', 'normal_regression', 'object_detection', 'time_series', 'time_series_regression', 'time_series_classification', 'recommender' or 'image_classification'.
Return type
class Project
Project ID
create_project_by_dataconnector()
Creates an CLICK AI project with uploaded data in ds2.ai by using dataconneotor ID.
Parmeters
dataconnector (int) : Dataconnector ID which you can get if you have uploaded your data_file to server. You can find the dataconnector Id by DS2.get_dataconnectors().
training_method (str) : One of the suitable training methods with your data_file from 'image', 'normal_classification', 'normal_regression', 'object_detection', 'time_series', 'time_series_regression', 'time_series_classification', 'recommender' or 'image_classification'.
Return type
class Project
Project ID
load_model()
Creates an CLICK AI project with model_file.
Parmeters
model_file (.pth, .zip) : An AI model file made by Pytorch and tensorflow2.
Return type
class Project
Project ID
get_projects()
Reads the created projects and returns the list of project objects according to the parameters.
Parmeters
count (int) : Number of projects you want to load.
start (int) : The start order of the project ID you want to load.
desc (bool) : Sorted by descending if
True
, ascending ifFalse
.
Return type
class Project
List of project IDs
get_project()
Reads and returns the pre-created project as a corresponding project_id.
Parmeters
project_id (int) : Pre-created project ID.
Return type
class Project
Project ID
get_model()
Reads and returns the pre-developed AI model as a corresponding model_id.
Parmeters
model_id (int) : Pre-developed AI model ID.
Return type
class Model
Model ID
get_quick_models()
Returns the list of the quick start models' ID in AI Market.
Parmeters
count (int) : Number of quick model ids you want to load.
start (int) : The start order of the project you want to load.
desc (bool) : Sorted by descending if
True
, ascending ifFalse
.
Return type
class Project
*List of the quick start models
Reference
DS2 AI currently supports the following items as quick start models.
'person', 'ocr', 'person-skeleton', 'face-blur', 'face-landmark', 'living', 'dog-and-cat', 'animal', 'sport', 'hard-hat', 'transportation-segmentation', 'transportation'.
get_quick_model_by_slug_name()
Reads a quick start model as a corresponding slug name.
Parmeters
slug_name (str) : One of the slug names of quick start models from 'person', 'ocr', 'person-skeleton', 'face-blur', 'face-landmark', 'living', 'dog-and-cat', 'animal', 'sport', 'hard-hat', 'transportation-segmentation', or 'transportation'.
Return type
Class MarketModel
The quick start model corresponding to input slug name
create_dataconnector()
Uploads data file in server and returns the data connector ID of the uploaded data.
Parmeters
data_file (file) : The local path of the file you want to upload to the server. The data file format supports csv, mp4, mov, and zip, and the zip file can include image files such as jpg, jpeg, png, and gif format.
has_label_data (bool) :
True
if data_file includes label data,False
otherwise.predict_column_name (str) : When the format of data_file is .csv, enter the result column name. (if has_label_data is True, input the column name the data file has, if False, enter an name you want as the result column name) When the format of data_file is not a .csv, leave as default value(None).
frame (int) : When the format of data_file is .mp4 or .mov, a number of frames per minute betwwen 1 and 600. If the format of data_file is neither .mp4 nor .mov, leave it as default.
Return type
class Dataconnector
Dataconnector ID
get_dataconnetors()
Reads the created dataconnectors IDs and returns the list of IDs of them according to the parameters.
Parmeters
count (int) : Number of dataconnectors you want to read.
page (int) : The page of the dataconnecots you want to read.
desc (bool) : Sorted by descending if
True
, ascending ifFalse
Return type
class Dataconnector
List of dataconnector IDs
get_dataconnetor()
Reads the created dataconnector as a corresponding dataconnector ID.
Parmeters
dataconnector_id (int) : Pre-created dataconnector ID.
Return type
class Dataconnector
Dataconnector ID
create_labelproject()
Create an Labeling AI project for any dataset or model_file.
Parmeters
data_file (file) : The local path of the file you want to upload to the server. The data file format supports csv, mp4, mov, and zip, and the zip file can include image files such as jpg, jpeg, png, and gif format.
dataconnector (int) : Dataconnector id which you can get if from ds2ai.DS2.create_dataconnector.
dataconnectors (list) : Dataconnector IDs of two or more datasets you want to create to one label project
training_method (str) : One of the training methods from 'image', 'normal_classification', 'normal_regression', 'object_detection', 'time_series', 'time_series_regression', 'time_series_classification', 'recommender', or 'image_classification'.
name (str) : Project name
frame (int) : When the format of data_file is .mp4 or .mov, a number of frames per minute betwwen 1 and 600. If the format of data_file is neither .mp4 nor .mov, leave it as default.
Return type
class Labelproject
Labeling AI project ID
Reference
You can enter only one value among data_file, dataconnector, and datarconnetors.
get_labelprojects()
Reads the created label projects and returns the list of IDs of them according to the parameters.
Parmeters
count(int) : Number of label projects you want to read.
page(int) : The page of the label projects you want to read.
desc (Booleen) : Sorted by descending if
True
, ascending ifFalse
Return type
class Labelproject
List of Labeling AI project IDs
get_labelproject()
Reads the created label project as a corresponding Labeling AI project ID.
Parmeters
labelproject_id (int) : Pre-created label project ID.
Return type
class Labelproject
Labeling AI project id
get_opsprojects()
Reads the created ops projects in Skyhub AI and returns the list of IDs of them according to the parameters.
Parmeters
count(int) : Number of ops projects you want to read.
page(int) : The page of the ops projects you want to read.
desc (Booleen) : Sorted by descending if
True
, ascending ifFalse
Return type
class Opsproject
List of ops project IDs
get_opsproject()
Reads the created ops project in Skyhub AI as a corresponding ops project ID.
Parmeters
labelproject_id (int) :
Pre-created ops project ID.
Return type
class Opsproject
Ops project ID
get_jupyterprojects()
Reads the created jupyter projectsin Cutom training in Click AI and returns the list of IDs of them according to the parameters.
Parmeters
count (int) :
Number of jupyter projects you want to read.
page (int) :
The page of the jupyter projects you want to read.
desc (bool) :
Sorted by descending if
True
, ascending ifFalse
Return type
class Jupyterproject
List of Jupyter project in Custom training IDs
get_jupyterproject()
Reads the created jupyter project in Cutom training in Click AI as a corresponding jupyter project ID.
Parmeters
jupyterproject_id (int) : Pre-created jupyter project ID.
Return type
class Jupyterproject
Jupyter project ID
get_asynctasks()
Reads the asynctasks which you can check prediction results by your AI and returns the list of IDs of them according to the parameters.
Parmeters
count (int) : Number of asynctasks you want to read.
page (int) : The page of the asynctasks you want to read.
desc (bool) : Sorted by descending if
True
, ascending ifFalse
tasktype (str) : Task type that you want to check the status from "all", "exportCoco"(extract COCO dataset), "autoLabeling" (auto labeling), "runMovie" (prediction of video), "runAll"(prediction of all).
Return type
class Asynctask
List of asynctask IDs
get_asynctask()
Reads the asynctask which you can check the prediction result by your AI as a corresponding asynctask ID.
Parmeters
asynctask_id (int) : Pre-created asynctask ID.
Return type
class Asynctask
Asynctask project ID
start_auto_labeling()
Executes auto-labeling immediately from loading data file without using dataconnector.
Parmeters
data_file (files) : The local path of the file you want to upload to the server. The data file format supports csv, mp4, mov, and zip, and the zip file can include image files such as jpg, jpeg, png, and gif format.
amount (int) : The amount of images you desire to auto-labeling.
has_label_data (bool) :
True
if data_file includes label data,False
otherwise.predict_column_name (str) : When the format of data_file is .csv, result column name. (if has_label_data is True, input the column name the data file has, if False, enter an name you want as the result column name) When the format of data_file is not .csv, leave as default value(None).
frame_value (int) : When the format of data_file is .mp4 or .mov, a number of frames per minute betwwen 1 and 600. If the format of data_file is neither .mp4 nor .mov, leave it as default.
ai_type (str) : Depending on whether training for autolabeling is required, choose 'custom'(required) or 'general'(not required).
autolabeling_type (str) : When workapp is 'object_detection', choose a type of labeling 'box' or 'polygon'.
general_ai_type (str) : When ai_type is 'general', select labeling AI already created from 'person', 'animal', 'autonomous_driving', 'face_point detection' and 'people_keypoints'.
model_id (int) : When ai_type is 'custom', enter the model id of the custom AI you want to auto-label.
custom_ai_stage (int) : custom_ai_stage.
preprocessing_ai_type (dict) : Enter preprocessing options (Currently, 'face_de-identification' is supported).
labeling_class (str) : The class(es) name of the object you want to auto-label.
training_method (str) : One of the training_methods from 'object_detection', 'image', 'normal_classification', 'normal_regression' and 'text'.
name (str): Set the project name.
description (str): Describe the project.
Return type
class Project
Start auto labeling
train()
Executes development of Click AI immediately from loading data file without using dataconnector.
Parmeters
data_file (files) : The local path of the file you want to upload to the server. The data file format supports csv, mp4, mov, and zip, and the zip file can include image files such as jpg, jpeg, png, and gif format.
training_method (str) : Select one of the training methods from 'image', 'normal_classification', 'normal_regression', 'object_detection', 'time_series', 'time_series_regression', 'time_series_classification', 'recommender', 'image_classification''normal_regression' and 'text'.
value_for_predict (str) : When the format of data_file is .csv, result column name. (if has_label_data is "True", input the column name the data file has, if "False", enter an name you want as the result column name) When the format of data_file is not .csv, leave as default value.
option (str) : One of the training options, 'accuracy' for higher accuracy, or 'speed' for faster training speed.
frame (int) : When the format of data_file is .mp4 or .mov, a number of frames per minute betwwen 1 and 600. If the format of data_file is neither .mp4 nor .mov, leave it as default.
Return type
class Project
Start Click AI development
deploy()
Deploys AI models to cloud servers with specifications under the desired hosting region.
Parmeters
model_file (file) : Local path of the model file you want to deploy.
name (str) : Project name.
cloud_type (str) : Aserver leasing company (currently only 'AWS' supported).
region (str) : The hosting region.
server_type (str) : The server instance of the desired specification.
Return type
class Opsproject
Ops project id
Reference
You can find region information with DS2.get_server_lists().
get_magic_code()
Returns a the magic code for setting variable values with optimal combinations for AI training.
Parmeters
training_method (str) : Select one of the training methods from 'image', 'normal_classification', 'normal_regression', 'object_detection', 'time_series', 'time_series_regression', 'time_series_classification', 'recommender', 'image_classification''normal_regression' and 'text'.
data_file (files) : The local path of the file you want to upload to the server. The data file format supports csv, mp4, mov, and zip, and the zip file can include image files such as jpg, jpeg, png, and gif format.
value_for_predict (str) : When the format of data_file is .csv, result column. name. (if has_label_data is True, input the column name the data file has, if False, enter an name you want as the result column name) When the format of data_file is not .csv, leave as default value.
Return type
class Project
rent_custom_training_server()
Rents an inference training server in prefered cloud environment for Custom training of CLICK AI.
Parmeters
cloud_type (str) : Choose a server leasing company (currently only 'AWS' supported).
region (str) : Choose the hosting region.
server_type (str) : The server instance of the desired specification.
name (str) : Project name.
Return type
class Project
Reference
You can find region information with DS2.get_server_lists().
predict()
Returns a predicted value using a pre-generated AI model ID.
Parmeters
data (str) : Input data to predict the result.
model_id (int) : Pre-created model ID.
quick_model_name (str) : One of the slug names of quick start models from 'person', 'ocr', 'person-skeleton', 'face-blur', 'face-landmark', 'living', 'dog-and-cat', 'animal', 'sport', 'hard-hat', 'transportation-segmentation', 'transportation'.
return_type (str) : The "info" returns the detailed information of the predicted value. When the predict data is image or object detection,
xai
returns the detailed information of the predicted value as XAI.
Return type
class Project
Predicted value
get_server_lists()
Returns variable names by hosting region and server specification.
Return type
class Project
Predicted value
Last updated