Blog

How Toch solves the problem of Data Modelling to offer 17+ different Sports ready Models!

Posted on Jul 04, 2021

 

Challenge Part – Because a key moment does not announce itself and is therefore often missed on video. It all starts from Sourcing right data,PREPARING Data as per the desire format and doing Quality check, compliances check before pushing it for Machine Learning for the appropriate use-case and label all the parameters using internal Toch Annotation Tool to make sure Machine learning achieve 95% accuracy in the first GO!

Let’s start with the basics…

A data set is a collection of data. In other words, a data set corresponds to the contents of a single database table, or a single statistical data matrix, where every column of the table represents a particular variable, and each row corresponds to a given member of the data set in question.

Here we use ‘Images’ as Input Data Set to trained our Vision Models. 

 

During an AI development, we always rely on data. From training, tuning, model selection to testing, TOCH use three different data sets: the training set, the validation set ,and the testing set. For your information, validation sets are used to select and tune the final ML model.

Data Preprocessing

Alright, let’s back to our data set thanks to our Data Strategy team who’ve gathered data that we judge essential, diverse and representative for Sports Key-moment. Preprocessing includes selection of the right data from the complete data set and building a training set. The process of putting together the data in this optimal format is known as feature transformation.

  1. Data Cleaning: In this step, our goal is to deal with missing values and remove unwanted characters from the data.
  2. Feature Extraction: In this step, we focus on analysis and optimisation of the number of features. Usually, a member of the team has to find out which features are important for prediction and select them for faster computations and low memory consumption.

 

 

Machine Learning 

 

 

Examples of hyperparameters used in the scikit-learn package

Perceptron(n_iter=40, eta0=0.1, random_state=0)
train_test_split( X, y, test_size=0.4, random_state=0)
LogisticRegression(C=1000.0, random_state=0)
KNeighborsClassifier(n_neighbors=5, p=2, metric='minkowski')
SVC(kernel='linear', C=1.0, random_state=0)
DecisionTreeClassifier(criterion='entropy', 
max_depth=3, random_state=0)
Lasso(alpha = 0.1)
PCA(n_components = 4)
 

 

Clients Love our APIs driven solution.

Key moment detection : We uses simple Input request fusing API_Key and SECRET_KEY with Params to identify the incoming request and connect with right machine to perform their task. 

var headers = {

                    ‘apikey’: ‘YOUR_API_KEY’,

                    ‘secretkey’: ‘YOUR_SECRET_KEY’,

                  };

    // Headers must be required with valid api keys. 

Var options = {auto_km:true/false,contentThreshold:true, cameraCut:”true”,balckSlate:”true” };

// auto_km : true if neede ai based key moment detection

// contentThreshold : true, if need to cut moments according to change in scene content

//cameraCut : true , if need moments according to camera switch

// balckSlate : true , if need to split video using slate key frame

 

Var params = {input_video_url:””,options:options, webhook_url:””};

    var options = {

        uri: ‘http://km.mytoch.com/api/v1/video_analysis/split_scene

,

        method: ‘POST’,

        body: params,

        headers: headers,

        json: true

    };

    request.post(options, function(err, response, body) {

        if (err) {

            console.log(err);

        } else if (response.statusCode == ‘200’ && body != ”) {

            console.log(body);

            // in return you will get the request created object, You can use assetId later for checking the status of asset. 

            // Also Setup your webhooks so we can send you back the request results asap….

        }

    });

Response 

 

response = {

        success: true,

        message:”Asset request initialized successfully.”

        data : { status:”processing”, assetId:”RTHFrt36TR4BG77”}

    };

 

Content modration

var headers = {

                    ‘apikey’: ‘YOUR_API_KEY’,

                    ‘secretkey’: ‘YOUR_SECRET_KEY’,

                  };

    // Headers must be required with valid api keys. 

Var params = {input_video_url:””, webhook_url:””};

    var options = {

        uri: ‘https://km.mytoch.com/api/todos/create_cm_request

,

        method: ‘POST’,

        body: params,

        headers: headers,

        json: true

    };

    request.post(options, function(err, response, body) {

        if (err) {

            console.log(err);

        } else if (response.statusCode == ‘200’ && body != ”) {

            console.log(body);

            // in return you will get the request created object, You can use assetId later for checking the status of asset. 

            // Also Setup your webhooks so we can send you back the request results asap….

        }

    });

 

Response 

 

response = {

        success: true,

        message:”Asset request initialized successfully.”

        data : { status:”processing”, assetId:”RTHFrt36TR4BG77”}

    };

 

For more details or a quick demo – IM me – saket@toch.ai 

Stay Up to Date

Register to our blog updates newsletter to receive the latest content in your inbox.

We use necessary and (optional) analytics cookies on our websites to analyze traffic and personalize content. You can read our cookie policy to understand how we use cookies. You may press ‘decline’ if you do not want us to use optional cookies. We will set a cookie on your device to remember and honor your preference.