Skip to content

Commit 09446a1

Browse files
committed
Apply suggestions from code review
1 parent 6a2811b commit 09446a1

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

docs/docs/guide/5-detector-modes.md

+10-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ gl_exp = ExperimentalApi()
1313
detector = gl_exp.create_counting_detector(
1414
name="car-counter",
1515
query="How many cars are in the parking lot?",
16+
class_name="car",
1617
max_count=20,
1718
confidence_threshold=0.2,
1819
)
@@ -23,6 +24,8 @@ Counting detectors should be provided with a query that asks "how many" objects
2324

2425
A maximum count (of 50 or fewer) must be specified when creating a counting detector. This is the maximum number of objects that the detector will count in an image. Groundlight's ML models are optimized for counting up to 20 objects, but you can increase the maximum count to 50 if needed. If you have an application that requires counting more than 50 objects, please [contact us](mailto:[email protected]).
2526

27+
The `confidence_threshold` parameter sets the minimum confidence level required for the ML model's predictions. If the model's confidence falls below this threshold, the query will be sent for human review. Count detectors can have a `confidence_threshold` set to any value between `1/(max_count + 2)` and 1.
28+
2629
:::note
2730
Counting Detectors are available on [Business and Enterprise plans](https://www.groundlight.ai/pricing).
2831
:::
@@ -103,7 +106,9 @@ from groundlight import ExperimentalApi
103106
gl_exp = ExperimentalApi()
104107

105108
# highlight-start
106-
# Add a count label with corresponding ROIs to the image query from the previous example
109+
# Add a count label with corresponding ROIs to the image query from the previous example.
110+
# ROIs are specified as (left, top) and (right, bottom) coordinates, with values
111+
# between 0 and 1 representing the percentage of the image width and height.
107112
roi1 = gl_exp.create_roi("car", (0.1, 0.2), (0.2, 0.3))
108113
roi2 = gl_exp.create_roi("car", (0.4, 0.4), (0.5, 0.6))
109114
roi3 = gl_exp.create_roi("car", (0.6, 0.5), (0.8, 0.9))
@@ -134,6 +139,10 @@ detector = gl_exp.create_multiclass_detector(
134139
We recommend adding an "Other" class to your multi-class detector to handle cases where the image does not belong to any of the pre-defined classes.
135140
:::
136141

142+
<!-- :::note
143+
Multi-Class Detectors are available on [Business and Enterprise plans](https://www.groundlight.ai/pricing).
144+
::: -->
145+
137146
### Submit an Image Query to a Multi-Class Detector
138147

139148
Now that you have created a multi-class detector, you can submit an image query to it.

0 commit comments

Comments
 (0)