Skip to main content

COCO

caution

When running an importer, any previously imported predictions will be overwritten! To ensure the ability to revert to previous model iterations, it is important to version your projects.

If you have model predictions stored in the COCO results format, you can import them into an Encord Active project running the following script:

from pathlib import Path

from encord_active.cli.utils.coco import import_coco_predictions
from encord_active.lib.model_predictions.importers import import_predictions
from encord_active.lib.project import Project

project_path = Path("/path/to/your/project/root")
predictions_path = Path("/path/to/your/predictions.json")

predictions = import_coco_predictions(project_path, predictions_path)

import_predictions(Project(project_path), predictions)