
Start Your AI Journey Today
- Access 100+ AI APIs in a single platform.
- Compare and deploy AI models effortlessly.
- Pay-as-you-go with no upfront fees.
This guide explains how to use Eden AI's API in Python for custom image classification. It covers creating a project, uploading data, training a model, running a classification job, and retrieving results, with clear code examples.
AutoML image classification allows you to build custom machine learning models for classifying images into categories without deep technical expertise.
With Eden AI, you can use its simple API to create a custom image classifier for your needs. This guide will take you through implementing AutoML image classiffication using Python.
Custom Image Classification with AutoML allows you to automatically create and train a machine learning model to classify images into your own specific categories.
Using an AutoML platform, you upload labeled images, and the tool automatically selects and tunes the best model to recognize and categorize new images based on your custom labels.
This process simplifies machine learning, making it accessible even to those without deep expertise in AI.
1. Create an Account: Visit Eden AI and sign up for an account. Once registered, navigate to the API section to obtain your API key. This key will give you access to a wide range of AI services including face comparison.
2. Navigate to Image Technologies – After logging in, go to the image section of the platform.
3. Select Custom Image Classification– Choose the Custom Image Classification feature or explore advanced options based on your needs.
The process is split into five stages to allow for clear, logical steps that ensure all parts of the project (creation, data uploading, training, prediction, and result retrieval) are managed separately.
This also helps avoid potential issues related to data size or processing time, as the operations are asynchronous.
To interact with Eden AI's API, you’ll need the requests module, which is a simple HTTP library for making API requests in Python. To install it, run:
Once installed, you can use requests to send requests to Eden AI’s endpoints.
The first step in the custom image classification process is to create a project. This will serve as the container for all your data and model settings.
This request creates a new project on Eden AI for your image classification. The response will contain a project_id, which will be used in subsequent stages to link your data and model.
Now that you’ve created your project, you need to upload your image data for training. Each image needs to be labeled with its category, and you must specify which data type you are uploading (e.g., TEST, TRAIN).
This sends your labeled image data to Eden AI for use in training or testing your model. You can upload multiple images by repeating this request for each image.
Once your data is uploaded, you need to train your model. The next step is to send a request to start the training process using your uploaded data.
This sends a request to Eden AI to begin training your custom classification model using the data you uploaded. The training may take some time depending on the amount of data.
After training your model, you can now classify new images using the model you trained. The following code sends an image to the trained model for classification.
This sends the image to your model for classification and returns the predicted label.
After launching the classification job, you can retrieve the classification results. The results are usually provided with a public_id, which you can use to check the classification.
This request retrieves the classification results, showing you the predicted label and confidence score for the image.
Here’s an example of what you might see when you retrieve the results:
For even more customization and better management of your AutoML classification tasks, Eden AI provides additional endpoints that allow you to fine-tune your workflows.
Whether you need to list, launch, or retrieve results for various jobs such as training, prediction, or data uploading, these endpoints offer you greater flexibility and control.
You can explore all available options and detailed instructions in our comprehensive documentation here.
Eden AI offers several advantages for Custom Image Classification.
With Eden AI, you can choose from a variety of providers, giving you great flexibility.
Eden AI’s API is designed to be simple and intuitive, making it easy for developers to integrate many AI services into their applications with minimal effort.
Whether you’re working on small projects or large-scale applications, Eden AI is built to scale with your needs, making it suitable for a wide range of use cases.
Using Eden AI’s API, you can easily create custom image classification models without needing deep machine learning knowledge.
By following the five-stage process (creating a project, uploading data, training, predicting, and retrieving results), you can quickly implement and deploy powerful image classification models for your own applications.
You can directly start building now. If you have any questions, feel free to chat with us!
Get startedContact sales