This guide makes the following assumptions:
- You have an active OpenAI subscription with an API key.
- Your images are stored in AWS.
STEP 1: Import your Images
1
Set Up AWS
Before you can do anything with the Encord platform and cloud storage, you need to configure your cloud storage to work with Encord. Once the integration between Encord and your cloud storage is complete, you can then use your data in Encord.In order to integrate with AWS S3, you need to:You have the following options to integrate AWS and Encord:
- Create a permission policy for your resources that allows appropriate access to Encord.
- Create a role for Encord and attach the policy so that Encord can access those resources.
- Activate Cross-origin resource sharing which allows Encord to access those resources from a web browser.
- Test the integration to make sure it works.
See our AWS integration documentation for a detailed explanation of setting up AWS to work with Encord.
2
Create AWS Integration in Encord
Create an S3 bucket to store your files if you haven’t already. Your S3 bucket permissions should be set to be blocking all public access.


It is essential you do not close this tab or window until you have finished the whole integration process. If you use the AWS UI for integration, we advise opening the AWS console in a separate tab.
See our AWS integration documentation for a detailed explanation of how to set up the AWS integration.
3
Create JSON file for Registration
See our documentation on JSON registration files for more comprehensive information
imageMetadata
is optional unless you are using a client-only access integration.The title
field is optional. If omitted, the image file path and name are used as the default title. For example, if the file is located at https://encord-solutions-bucket.s3.eu-west-2.amazonaws.com/path/to/my/bucket/image23.mp4
, the title defaults to /path/to/my/bucket/image23.jpg
.Key or Flag | Required? | Default value |
---|---|---|
”objectUrl” | Yes | |
”title” | No | The file’s path + title |
”imageMetadata” | No | |
”clientMetadata” | No | |
”createVideo” | No | false |
imageMetadata
must be specified when a Strict client-only access integration is used. In all other cases, imageMetadata
is optional, but including it significantly reduces import times.Keys / Flags that are not required can be omitted from the JSON file entirely.
4
Create a Folder to Store Your Images
All files in Encord must be stored within folders. Therefore, you need to create a folder before registering any data with Encord. To create a folder:
- Navigate to Files under the Index heading in the Encord platform.
- Click the + New folder button to create a new folder. Select the type of folder you want to create.

- Give the folder a meaningful name and description.
- Click Create to create the folder. The folder is listed in Files.
5
Upload Your Images to Encord
To ensure smoother uploads and faster completion times, and avoid hitting absolute file limits, we recommend adding smaller batches of data. Limit uploads to 100 videos or up to 1,000 images at a time. You can also create multiple Datasets, all of which can be linked to a single Project. Familiarize yourself with our limits and best practices for data import/registration before adding data to Encord.
- Navigate to Files section of Index in the Encord platform.
-
Click + Upload files.
A dialog appears.
- Select the folder you previously created.
- Click the Import from private cloud option.
-
Select the integration you previously created to add your cloud data.
We recommend turning on the Ignore individual file errors feature. This ensures that individual file errors do not lead to the whole upload process being aborted.
-
Click Add JSON or CSV files to add a JSON or CSV file specifying cloud data that is to be added.
STEP 2: Set Up Your Project
1
Create a Dataset
- Click the New dataset button in the Datasets section in Annotate.

- Give your Dataset a meaningful title and description. A clear title and description keeps your data organized.
Toggle Looking to create a mirrored dataset? to create a Mirrored Dataset.

- Click Create dataset to create the Dataset.
Attach files
To ensure smoother uploads and faster completion times, and avoid hitting absolute file limits, we recommend adding smaller batches of data. Limit uploads to 100 videos or up to 1,000 images at a time. You can also create multiple Datasets, all of which can be linked to a single Project. Familiarize yourself with our limits and best practices for data import/registration before adding data to Encord.
- Navigate to the Datasets section under the Annotate heading.
- Click the Dataset you want to attach data to.
- Click +Attach existing files.
If the files you want have not been uploaded into Encord yet, click +Upload files to upload new files.

- Select the folders containing the files you want to attach to the Dataset. To select individual files, double-click a folder to see its contents, and select the files you want to add to the Dataset.
- Click Attach data to attach the selected files to the Dataset.
2
Create an Ontology
Learn how to create Ontologies here.
- A radio classification called “Animal” with two options: One called “Cat” the other called “Dog”.
- Any other Objects you want to include in your Ontology.
3
Create Your Workflow template
Learn how to create Workflow templates here.

4
Create a Project
- In the Encord platform, select Projects under Annotate.
- Click the + New annotation project button to create a new Project.

- Give the Project a meaningful title and description.

If you are part of an Organization, an optional Project tags drop-down is visible. Project tags are useful for categorizing and finding your Projects. Select as many tags as are relevant for your Project.
- Click the Attach ontology button.
- Select the Ontology you created previously from the list using the Select button.

- Click OK to attach the Ontology to the Project.
- Click the Attach datasets button.
- Select the Dataset you created previously from the list using the Attach button.

- Click OK to attach the Dataset(s) to the Project.

- Click the Load from template button to use a Workflow template.

- Select the template you want to use and click Load template.
- Click Create project to finish creating the Project.

STEP 3: Configure Your Agent
-
Create a python file called
imagePreClassification.py
. -
Paste the following script into
imagePreClassification.py
replacing:<your_openai_api_key>
with your OpenAI API key.<private_key_path>
with the path to your private key.<project_hash>
with the hash of the Project you created in STEP 2.
Pre-Classification for Images Example
- Save
imagePreClassification.py
.
STEP 4: Run your Agent
RunimagePreClassification.py
.
The script processes all images in the Dataset. If additional images are added, the script must be re-run to include them.