How to Use the sotuken Classification API
Use this pre-trained sotuken computer vision model to retrieve predictions with our hosted API or deploy to the edge. Learn More About Roboflow Inference
Switch Model:
Accuracy is calculated as the ratio of the number of correct labels over the total number of labels.
Validation Accuracy
Samples from Test Set
Try this model on images
0
fps 0
objects detected ![](/images/inference-icon.png)
Roboflow Inference
Inference is Roboflow's open source deployment package for developer-friendly vision inference.
How to Deploy the sotuken Classification API
Using Roboflow, you can deploy your classification model to a range of environments, including:
- Raspberry Pi
- NVIDIA Jetson
- A Docker container
- A web page
- A Python script using the Roboflow SDK.
Below, we have instructions on how to use our deployment options.
Code Snippets
Python
Javascript
Swift
## Infer on Local and Hosted Images To install dependencies, `pip install inference-sdk`. Then, add the following code snippet to a Python script: ```python from inference_sdk import InferenceHTTPClient CLIENT = InferenceHTTPClient( api_url="https://classify.roboflow.com", api_key="API_KEY" ) result = CLIENT.infer(your_image.jpg, model_id="MODEL_ENDPOINT/VERSION") ``` [See the inference-sdk docs](https://inference.roboflow.com/inference_helpers/inference_sdk/)
## Node.js We're using [axios](https://github.com/axios/axios) to perform the POST request in this example so first run npm install axios to install the dependency. ### Inferring on a Local Image ```javascript const axios = require("axios"); const fs = require("fs"); const image = fs.readFileSync("YOUR_IMAGE.jpg", { encoding: "base64" }); axios({ method: "POST", url: "https://classify.roboflow.com/MODEL_ENDPOINT/VERSION", params: { api_key: "API_KEY" }, data: image, headers: { "Content-Type": "application/x-www-form-urlencoded" } }) .then(function (response) { console.log(response.data); }) .catch(function (error) { console.log(error.message); }); ```
## Uploading a Local Image Using base64 ```swift import UIKit // Load Image and Convert to Base64 let image = UIImage(named: "your-image-path") // path to image to upload ex: image.jpg let imageData = image?.jpegData(compressionQuality: 1) let fileContent = imageData?.base64EncodedString() let postData = fileContent!.data(using: .utf8) // Initialize Inference Server Request with API_KEY, Model, and Model Version var request = URLRequest(url: URL(string: "https://classify.roboflow.com/MODEL_ENDPOINT/VERSION?api_key=API_KEY&name=YOUR_IMAGE.jpg")!,timeoutInterval: Double.infinity) request.addValue("application/x-www-form-urlencoded", forHTTPHeaderField: "Content-Type") request.httpMethod = "POST" request.httpBody = postData // Execute Post Request URLSession.shared.dataTask(with: request, completionHandler: { data, response, error in // Parse Response to String guard let data = data else { print(String(describing: error)) return } // Convert Response String to Dictionary do { let dict = try JSONSerialization.jsonObject(with: data, options: []) as? [String: Any] } catch { print(error.localizedDescription) } // Print String Response print(String(data: data, encoding: .utf8)!) }).resume() ```
More Deployment Resources
Roboflow Inference Documentation
Look through our Inference documentation for more information and resources on how to utilize this model.
Example Web App
Use this model with a full fledged web application that has all sample code included.
Deploy to NVIDIA Jetson
Perform inference at the edge with a Jetson via our Docker container.
Deploy Mobile iOS
Utilize your model on your mobile device.
Similar Projects
See More![](https://source.roboflow.com/LykFM0J1W1Sv7ZrTH6YDVd6QzXS2/W6j1QD8JqUcqac2Kur2r/thumb.jpg)
![](https://source.roboflow.com/LykFM0J1W1Sv7ZrTH6YDVd6QzXS2/W6j1QD8JqUcqac2Kur2r/annotation-kind-of-ramen.png)
87 images2 models
![](https://source.roboflow.com/EGRIHJybNTQLWTC7RZiAUmnYX6J3/9XoDWDvgVf166k0v6EDM/thumb.jpg)
![](https://source.roboflow.com/EGRIHJybNTQLWTC7RZiAUmnYX6J3/9XoDWDvgVf166k0v6EDM/annotation-JP-food.png)
113 images
![](https://source.roboflow.com/UVryjtVjoOY90XJwdax4nOz3wTF3/NsnNKZFzLpez09qlYtf5/thumb.jpg)
![](https://source.roboflow.com/UVryjtVjoOY90XJwdax4nOz3wTF3/NsnNKZFzLpez09qlYtf5/annotation-noodle-19um.png)
767 images
![](https://source.roboflow.com/MtNG4wOD2eNNXE9naG1NRc5wtyE3/5cswGMDxGqIjTZoJmCgT/thumb.jpg)
![](https://source.roboflow.com/MtNG4wOD2eNNXE9naG1NRc5wtyE3/5cswGMDxGqIjTZoJmCgT/annotation-foods.png)
1544 images1 model
![](https://source.roboflow.com/UVryjtVjoOY90XJwdax4nOz3wTF3/bEVrNcWy5tEjja2OP4M2/thumb.jpg)
![](https://source.roboflow.com/UVryjtVjoOY90XJwdax4nOz3wTF3/bEVrNcWy5tEjja2OP4M2/annotation-noodle-19um-noodle.png)
3438 images1 model