GECO2 is a few-shot object counting model designed for dense and scale-varying scenes. Instead of relying on heuristic image tiling or aggressive upscaling, it builds exemplar-aware query features across multiple backbone resolutions and fuses them into a high-resolution detection map. This makes it better suited for crowded images with small objects, large objects, or both at the same time. In the X-AnyLabeling workflow, GECO2 is exposed through the remote inference service provided by X-AnyLabeling-Server.
This example uses the remote-server workflow. Before using GECO2 in X-AnyLabeling, make sure X-AnyLabeling-Server is installed and running.
- Follow the X-AnyLabeling-Server installation guide in the server repository.
- Enable
geco2inconfigs/models.yaml. - Prepare the GECO2 model weights required by the server.
- Start the server.
- In X-AnyLabeling, configure the remote server endpoint in your user configuration and select
Remote-Serverfrom the auto-labeling panel.
Tip
You can refer to the X-AnyLabeling-Server repository for the latest setup instructions, model configuration examples, and weight download links.
Launch the X-AnyLabeling client, press Ctrl+A or click the AI button in the left menu bar to open the auto-labeling panel. In the model dropdown list, select Remote-Server, then choose GECO2.
GeCo2-Demo.mp4
Note
Replace the placeholder GIF above with your final GECO2 demo.
- Load an image into X-AnyLabeling.
- Choose the rectangle prompt tool in the auto-labeling panel.
- Draw one or more exemplar boxes around the target objects you want to count.
- Click
Run Rectto send the image and exemplar prompts to the remote server. - Review the returned counting boxes shown by the model.
- Adjust the confidence threshold if needed and run again for a stricter or looser result.
- Use clean exemplar boxes that tightly cover representative instances.
- When object scale varies a lot, provide exemplars from different size ranges if possible.
- For very dense scenes, start with a moderate confidence threshold and then refine based on over-counting or under-counting behavior.
- GECO2 is intended for remote inference in this integration, so the client depends on a reachable X-AnyLabeling-Server instance.
See User Guide for more details.
