# Bounding box feature
object_features = [
lb.Tool(
tool=lb.Tool.Type.BBOX,
name="regulatory-sign",
color="#ff0000",
)
]
# Checklist feature
classification_features = [
lb.Classification(
class_type=lb.Classification.Type.CHECKLIST,
name="Quality Issues",
options=[
lb.Option(value="blurry", label="Blurry"),
lb.Option(value="distorted", label="Distorted"),
],
)
]
# Builder function
ontology_builder = lb.OntologyBuilder(tools=object_features,
classifications=classification_features)
# Create ontology
ontology = client.create_ontology(
"Ontology from new features",
ontology_builder.asdict(),
media_type=lb.MediaType.Image,
)