zeromodels / dfine-small

huggingface.co
Total runs: 30
24-hour runs: -5
7-day runs: -4
30-day runs: -11
Model's Last Updated: August 27 2026
object-detection

Introduction of dfine-small

Model Details of dfine-small

See our collection for all versions of D-FINE.

Run D-FINE with Keras 3: JAX, PyTorch, or TensorFlow

GitHub Docs Collection

zeromodels/dfine-small

Paper: D-FINE: Redefine Regression Task of DETRs as Fine-grained Distribution Refinement (arXiv:2410.13842) · HF Papers

D-FINE is a real-time detector built on the RT-DETR recipe: an HGNetV2 backbone, a hybrid encoder, and a deformable decoder with 300 queries. It is NMS-free. Boxes are regressed via Fine-grained Distribution Refinement: each decoder layer predicts a distribution over discrete offset bins and accumulates refinements across layers.

For more details on the model, please go to the upstream model card .

Pure- Keras 3 conversion of ustc-community/dfine-small-coco for zeromodels . One implementation runs unmodified on TensorFlow / Torch / JAX .

This is an object detection checkpoint ( DFineDetect ) on COCO (HGNetV2-Small).

✨ Quick start
import os
os.environ["KERAS_BACKEND"] = "torch"  # or "jax" / "tensorflow"

from PIL import Image
from zeromodels.models.dfine import DFineDetect, DFineImageProcessor

model = DFineDetect.from_weights("zeromodels/dfine-small")
processor = DFineImageProcessor.from_weights("zeromodels/dfine-small")

image = Image.open("your_image.jpg").convert("RGB")
inputs = processor(image)
output = model(inputs["pixel_values"], training=False)
results = processor.post_process_object_detection(
    output, threshold=0.5, target_sizes=[(image.height, image.width)]
)[0]
for score, name, box in zip(
    results["scores"], results["label_names"], results["boxes"]
):
    print(f"{name}: {float(score):.3f} {box}")

Load any D-FINE variant the same way with from_weights("zeromodels/<variant>") :

Variant Hub Backbone
dfine-nano zeromodels/dfine-nano HGNetV2-Nano
dfine-small zeromodels/dfine-small HGNetV2-Small
dfine-medium zeromodels/dfine-medium HGNetV2-Medium
dfine-large zeromodels/dfine-large HGNetV2-Large
dfine-xlarge zeromodels/dfine-xlarge HGNetV2-XLarge
Tips
  • Set KERAS_BACKEND before importing Keras / zeromodels.
  • DFineImageProcessor keeps do_normalize=False by default (rescaled [0, 1] input, matching upstream).
  • See D-FINE docs and Loading Weights .
  • Community / upstream safetensors still work via the hf: prefix, e.g. DFineDetect.from_weights("hf:ustc-community/dfine-small-coco") .
Special Thanks

A huge thank you to the D-FINE authors (USTC community) for creating and releasing these models.

License: Apache 2.0.

Runs of zeromodels dfine-small on huggingface.co

30
Total runs
-5
24-hour runs
-8
3-day runs
-4
7-day runs
-11
30-day runs

More Information About dfine-small huggingface.co Model

More dfine-small license Visit here:

https://choosealicense.com/licenses/apache-2.0

dfine-small huggingface.co

dfine-small huggingface.co is an AI model on huggingface.co that provides dfine-small's model effect (), which can be used instantly with this zeromodels dfine-small model. huggingface.co supports a free trial of the dfine-small model, and also provides paid use of the dfine-small. Support call dfine-small model through api, including Node.js, Python, http.

zeromodels dfine-small online free

dfine-small huggingface.co is an online trial and call api platform, which integrates dfine-small's modeling effects, including api services, and provides a free online trial of dfine-small, you can try dfine-small online for free by clicking the link below.

zeromodels dfine-small online free url in huggingface.co:

https://huggingface.co/zeromodels/dfine-small

dfine-small install

dfine-small is an open source model from GitHub that offers a free installation service, and any user can find dfine-small on GitHub to install. At the same time, huggingface.co provides the effect of dfine-small install, users can directly use dfine-small installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

dfine-small install url in huggingface.co:

https://huggingface.co/zeromodels/dfine-small

Url of dfine-small

Provider of dfine-small huggingface.co

zeromodels
ORGANIZATIONS

Other API from zeromodels