TrainingSet.AI Democratizing AI: Train and deploy a production-ready AI model in 30 minutes without being a data scientist.


Artificial intelligence is in every corner, you can apply it to almost anything to improve the digital infrastructure that’s a backbone to every business. It might seem intimidating at first, but you can get away without knowing anything about AI and still implement all of the great things that it brings.

TrainingSet.AI goal is to simplify the computer vision life cycle for AI and be able to have production ready AI models without the need of being a data scientist. This is the first in a series of Articles and new features we will be working on.

Let’s break down how you can train an image classifier in 4 steps with TrainingSet.AI:

  1. Add a Dataset
  2. Classify the Dataset Images
  3. Train the AI Model ( Just Press the TRAIN button)
  4. It's done! Call your trained model using TrainingSet.AI API endpoint to classify new images

Let’s break it down.


1. Adding a dataset


The first thing an AI model needs is data from which it’s going to learn. Let’s assume you have a dataset. You found an open dataset or you were really hard-working and gathered your own data.

If you are searching for a dataset, check out Kaggle, World Bank Open Data, WHO… Our strong recommendation is to try Google’s dataset search engine which returns results from all over the web! We are going to use the fruits-360 dataset found on Kaggle.

Let’s also assume you’ve already registered over at dashboard.trainingset.ai.

  1. Add images somewhere. Imgur, S3, your VPS, whatever. Just make them accessible via URL. To make it as simple as possible, you can also pick images from the web on our dashboard (use the “get images from the internet” button on the “add task” page).
  2. Create a new project. Make sure “AI training” is enabled.
    Trulli
  3. Create tasks on our platform. Each task is tied to exactly one image and contains the information about it. You can use the API, form on our dashboard or CSV to add it. We are going to use the form to make it simple.
    Trulli
     


2. Labeling data


Head over to the tasks view on the dashboard, pick a task and start labeling. In order for the model to learn, it needs instructions. The way we instruct the model to learn is by feeding it a series of images and their corresponding “classes”. For example, if we have images containing cats or dogs, we treat “dog” and “cat” as possible classes (also referred to as “labels” or “categories” sometimes) for an image. After the data is ready, it’s time to feed it to our model.

3. Training


Through the training process, AI should learn to perform its task from labeled data. Head over to the projects view on the dashboard, tune the parameters if you want and then click on the train button and wait. Feel free to skip the hyperparameter tuning if you want, if your dataset is good, the default parameters will give you solid results as well. If you don’t understand what the hyperparameters do, there is info for each of them.

Time to wait depends on a number of tasks you’ve labeled. You can monitor the log for live updates. Our project took an hour to train with 4284 images.
        

Trulli

After the training was done, results looked very promising. They can be inspected by pressing the statistics button (available after project is finished training):

Blue - training set accuracy

Red - training set loss

Purple - validation set accuracy

Yellow - validation set loss

Accuracy is the percentage of correctly predicted tasks. Loss is the sum of the differences between predicted probability of the real class of the image and 1.

Trulli

We can also inspect the images manually on projects page using “predictions” button (available after project is finished training):

Trulli
Trulli

  1. Consuming the model from API endpoint
    HTTP endpoint for consuming the model will be automatically created for you. It saves you the time of having to code the endpoint yourself, figuring out how to use the AI model, maintenance costs, scaling and infrastructure problems etc. Send the request as described in API documentation:

          
            curl -s --location --request POST "https://api.trainingset.ai/api/project/inference" \
            --header "user_key: $TS_API_KEY" \
            --data-urlencode "projectId=60416a6ab6753c00044004cd" \
            --data-urlencode "attachmentUrl=https://i.imgur.com/EK7qS07.png" | jq
          
        
Output:
          
            {
              "status": 200,
              "result": {
                "result": {
                  "0": 0,
                  "1": 0.999,
                  "2": 0,
                  "3": 0.001,
                  "4": 0,
                  "5": 0,
                  "6": 0,
                  "7": 0,
                  "8": 0
                }
              },
              "metadata": {
                "content_type": "json",
                "duration": 6.179576216
              }
            }
          
        

In our case the class with highest confidence is 1. We’ve created a project with the classes in following order: ["Avocado", "Banana", "Cherry", "Grapefruit", "Kiwi", "Mandarine", "Nectarine", "Orange", "Papaya"]. Taking the element at index 1 from the array, we can conclude that the image is showing a banana.

Conclusion

AI had seemed intimidating until the recent popup of AutoML solutions. You don’t have to be an expert in AI to leverage its benefits. Deep knowledge of AI is desirable if you want to do research or build extremely fine-tuned and complex AI models. But in MOST of the cases, you can get away by using already existing models like ours which you train with a little bit of data and you will be more than happy with the results.

Stay tuned and follow us on Linkedin to see new updates. We are going to add other types of AutoML models soon. Tasks which are annotated using boxes will be released in the next couple of weeks.

        

Contact Us

Any question you have, don't hesitate to contact us, we'll be in touch with you


footer-frame