Crop Quick Start
Integrate a Crop Model.
Install the Client Library
Install the Mindee SDK for your language or framework of choice
Requires Python ≥ 3.9. Python ≥ 3.11 is recommended.
Simply install the PyPi package using pip:
pip install -U mindee~=5.2Requires Node.js ≥ 20.1. Node.js ≥ 22 is recommended.
Simply install the NPM package:
npm install mindee@^5.5.0Requires PHP ≥ 8.1. PHP ≥ 8.3 is recommended.
Simply install the Packagist package using composer:
php composer.phar require "mindee/mindee:>=3.0"Requires Java ≥ 11. Java ≥ 17 is recommended.
Group ID: com.mindee.sdk
Artifact ID: mindee-api-java
Version: 5.2.0 or greater
There are various installation methods, Maven, Gradle, etc:
.NET ≥ 8.0 is recommended.
Simply install the NuGet package using dotnet add:
dotnet add package Mindee --version 4.4Don't see support for your favorite language or framework? Make a feature request!
Send a File and Poll
Use the client library to send the file to your Crop Model and return the result.
Requires Python ≥ 3.9. Python ≥ 3.11 is recommended. Requires the Mindee Python SDK version 4.35.1 or greater.
from mindee import PathInput
from mindee.v2 import (
Client,
CropParameters,
CropResponse,
)
input_path = "/path/to/the/file.ext"
api_key = "MY_API_KEY"
model_id = "MY_MODEL_ID"
# Init a new client
mindee_client = Client(api_key)
# Set Crop parameters
model_params = CropParameters(
# ID of the model, required.
model_id=model_id,
)
# Load a file from disk
input_source = PathInput(input_path)
# Send for processing using polling
response = mindee_client.enqueue_and_get_result(
CropResponse,
input_source,
model_params,
)
# Print a brief summary of the parsed data
print(response.inference)
# Access the crop result
crops: list = response.inference.result.cropsAlso take a look at the Crop Result documentation.
Requires Node.js ≥ 20.1. Node.js ≥ 22 is recommended. Requires the Mindee Node.js SDK version 5.5.0 or greater.
Also take a look at the Crop Result documentation.
Requires PHP ≥ 8.1. PHP ≥ 8.3 is recommended. Requires the Mindee PHP SDK version 3.0.0 or greater.
Also take a look at the Crop Result documentation.
Requires Ruby ≥ 3.2. Requires the Mindee Ruby SDK version 5.2.1 or greater.
Also take a look at the Crop Result documentation.
Requires Java ≥ 11. Java ≥ 17 is recommended. Requires the Mindee Java SDK version 5.1.0 or greater.
Also take a look at the Crop Result documentation.
.NET ≥ 8.0 is recommended. Requires the Mindee .NET SDK version 4.3.0 or greater.
Also take a look at the Crop Result documentation.
Last updated
Was this helpful?

