Create a Box Detect Function
A Box Detect function finds where a specific object appears in an image. The output is a list of detected instances, each with a bounding box and a confidence score.
Box Detect functions in Nyckel are single-class — one function finds one kind of object. If you want to detect helmets and vehicles, that’s two functions.
What you’ll build
A function trained to find one type of object in images, returning its location and a confidence score for each detected instance.
Total time: ~20 minutes (plus however long it takes to gather and annotate your first training images).
1. Open the console and create a function
Go to the Nyckel console and sign in. Click New function.
2. Pick an input type
Box Detect functions take image inputs only.
3. Pick the function type
Select Box Detect.
4. Name the function
The function’s name is the object it detects — pick a name that describes that one object, in the singular:
helmetproduct-defectvehiclebarcode
Click Create. The function is created, but it can’t find anything yet — Box Detect functions need annotated training images before they make useful predictions.
What’s different from classification
Box Detect functions are set up similarly to classification functions, but the workflow has three important differences:
- No Labels tab. Because each Box Detect function targets a single object class, there are no labels to define. The function’s name is the class.
- No zero-shot. Classification can return useful predictions on day one. Detection can’t — until you’ve imported images and drawn bounding boxes, the function returns nothing.
- Training happens in the Train tab. You import images, then go to the Train tab and draw boxes around every instance of the object in each image. That’s how the model learns what to look for.
Next
Add Training Images and Boxes — import images and draw the bounding boxes that teach the function what to find.