hardikdava / rf-detr

RF-DETR: SOTA Real-Time Object Detection Model

  • Public
  • 45 runs
  • CPU
  • GitHub
  • Weights
  • Paper
  • License

Input

image
*file

Input image for prediction

number

Confidence threshold for predictions

Default: 0.5

Output

detections

{ "bbox": [ 1130.3861083984375, 870.3076782226562, 1227.43505859375, 1070.7080078125 ], "label": "person", "class_id": 1, "confidence": 0.782194197177887 }
{ "bbox": [ 1387.476318359375, 711.0593872070312, 1475.7423095703125, 885.52880859375 ], "label": "person", "class_id": 1, "confidence": 0.7491818070411682 }
{ "bbox": [ 757.0631103515625, 410.0844421386719, 814.717529296875, 576.0881958007812 ], "label": "person", "class_id": 1, "confidence": 0.7373124957084656 }
{ "bbox": [ 673.7122802734375, 586.7875366210938, 750.0972290039062, 784.587158203125 ], "label": "person", "class_id": 1, "confidence": 0.7071190476417542 }
{ "bbox": [ 923.84228515625, 190.01162719726562, 981.186767578125, 326.1014709472656 ], "label": "person", "class_id": 1, "confidence": 0.6266906261444092 }
{ "bbox": [ 48.9046516418457, 815.5372314453125, 174.3046417236328, 987.0126342773438 ], "label": "person", "class_id": 1, "confidence": 0.626331090927124 }
{ "bbox": [ 1842.2598876953125, 639.9713745117188, 1920.2652587890625, 836.7003173828125 ], "label": "person", "class_id": 1, "confidence": 0.6238293647766113 }
{ "bbox": [ 708.2510986328125, 208.5155487060547, 767.106689453125, 354.1095886230469 ], "label": "person", "class_id": 1, "confidence": 0.617853045463562 }
{ "bbox": [ 1485.5985107421875, 511.60296630859375, 1564.0711669921875, 687.2857055664062 ], "label": "person", "class_id": 1, "confidence": 0.6040253639221191 }
{ "bbox": [ 570.1437377929688, 288.21771240234375, 631.499267578125, 432.7860107421875 ], "label": "person", "class_id": 1, "confidence": 0.5985834002494812 }
{ "bbox": [ 1468.667724609375, 356.3482360839844, 1540.305908203125, 519.6421508789062 ], "label": "person", "class_id": 1, "confidence": 0.5822452902793884 }
{ "bbox": [ 1147.14404296875, 466.7207946777344, 1206.602783203125, 616.011962890625 ], "label": "person", "class_id": 1, "confidence": 0.559958815574646 }
{ "bbox": [ 242.7247314453125, 477.5770568847656, 325.34466552734375, 656.0650024414062 ], "label": "person", "class_id": 1, "confidence": 0.5295079946517944 }
{ "bbox": [ 1182.6055908203125, 504.6381530761719, 1213.0966796875, 557.5219116210938 ], "label": "handbag", "class_id": 31, "confidence": 0.5192841291427612 }
{ "bbox": [ 987.968017578125, 117.69999694824219, 1041.8316650390625, 254.9807586669922 ], "label": "person", "class_id": 1, "confidence": 0.4871187210083008 }
{ "bbox": [ 984.7857055664062, 170.77835083007812, 1014.1322631835938, 211.3856201171875 ], "label": "handbag", "class_id": 31, "confidence": 0.46760207414627075 }
{ "bbox": [ 340.15020751953125, 490.80975341796875, 404.38909912109375, 639.0241088867188 ], "label": "person", "class_id": 1, "confidence": 0.4649312198162079 }
{ "bbox": [ 1166.2489013671875, 125.4473876953125, 1219.7884521484375, 256.1348876953125 ], "label": "person", "class_id": 1, "confidence": 0.4631597101688385 }
{ "bbox": [ 675.2691650390625, 687.5641479492188, 701.6160888671875, 748.8626708984375 ], "label": "handbag", "class_id": 31, "confidence": 0.46044349670410156 }
{ "bbox": [ 1470.7281494140625, 378.6562194824219, 1505.9769287109375, 430.2394714355469 ], "label": "backpack", "class_id": 27, "confidence": 0.4502895176410675 }
{ "bbox": [ 389.3254089355469, 518.041259765625, 458.45819091796875, 666.4095458984375 ], "label": "person", "class_id": 1, "confidence": 0.4408545196056366 }
{ "bbox": [ 1804.0802001953125, 162.8067169189453, 1862.0927734375, 289.3603515625 ], "label": "person", "class_id": 1, "confidence": 0.41475173830986023 }
{ "bbox": [ 1703.928955078125, 169.55543518066406, 1769.3426513671875, 304.6439208984375 ], "label": "person", "class_id": 1, "confidence": 0.4060918986797333 }
{ "bbox": [ 1696.428466796875, 227.39805603027344, 1724.58349609375, 270.4450378417969 ], "label": "handbag", "class_id": 31, "confidence": 0.403550922870636 }
{ "bbox": [ 574.8470458984375, 217.8853759765625, 624.1472778320312, 309.0682678222656 ], "label": "person", "class_id": 1, "confidence": 0.38930562138557434 }
{ "bbox": [ 445.0135192871094, 501.421875, 511.9714050292969, 640.6360473632812 ], "label": "person", "class_id": 1, "confidence": 0.38499635457992554 }
{ "bbox": [ 49.003883361816406, 840.3244018554688, 110.21122741699219, 918.168212890625 ], "label": "backpack", "class_id": 27, "confidence": 0.3801417052745819 }
{ "bbox": [ 800.2516479492188, 68.438720703125, 836.4820556640625, 196.13795471191406 ], "label": "person", "class_id": 1, "confidence": 0.37990665435791016 }
{ "bbox": [ 469.35516357421875, 522.4736938476562, 512.6201171875, 576.8795776367188 ], "label": "backpack", "class_id": 27, "confidence": 0.36733952164649963 }
{ "bbox": [ 1088.7880859375, 58.52699279785156, 1138.8216552734375, 163.15635681152344 ], "label": "person", "class_id": 1, "confidence": 0.35930925607681274 }
{ "bbox": [ 386.9186706542969, 535.6904296875, 430.4564208984375, 596.5166015625 ], "label": "backpack", "class_id": 27, "confidence": 0.3516789972782135 }
{ "bbox": [ 1182.6055908203125, 504.6381530761719, 1213.0966796875, 557.5219116210938 ], "label": "backpack", "class_id": 27, "confidence": 0.32999905943870544 }
{ "bbox": [ 847.664306640625, 61.6908073425293, 895.1400146484375, 193.88311767578125 ], "label": "person", "class_id": 1, "confidence": 0.3297492563724518 }
{ "bbox": [ 1206.7213134765625, 104.37005615234375, 1250.775146484375, 236.51177978515625 ], "label": "person", "class_id": 1, "confidence": 0.3188197910785675 }
{ "bbox": [ 1484.0390625, 556.1553344726562, 1533.7176513671875, 618.105224609375 ], "label": "handbag", "class_id": 31, "confidence": 0.3104104995727539 }
{ "bbox": [ 1481.638916015625, 536.0108032226562, 1514.6507568359375, 578.644775390625 ], "label": "handbag", "class_id": 31, "confidence": 0.30806535482406616 }
{ "bbox": [ 904.183349609375, 70.13058471679688, 946.8954467773438, 194.080322265625 ], "label": "person", "class_id": 1, "confidence": 0.305711030960083 }
{ "bbox": [ 1730.402587890625, 95.25686645507812, 1791.0164794921875, 193.89486694335938 ], "label": "person", "class_id": 1, "confidence": 0.29550591111183167 }
{ "bbox": [ 1432.6500244140625, 740.1583862304688, 1474.392822265625, 802.1760864257812 ], "label": "backpack", "class_id": 27, "confidence": 0.2953849732875824 }
{ "bbox": [ 1886.115966796875, 714.5997314453125, 1919.544189453125, 751.8941040039062 ], "label": "handbag", "class_id": 31, "confidence": 0.29517704248428345 }
{ "bbox": [ 1481.638916015625, 536.0108032226562, 1514.6507568359375, 578.644775390625 ], "label": "backpack", "class_id": 27, "confidence": 0.2873573303222656 }
{ "bbox": [ 1679.1790771484375, 19.376890182495117, 1739.140625, 152.9647674560547 ], "label": "person", "class_id": 1, "confidence": 0.28642737865448 }
{ "bbox": [ 407.1555480957031, 484.1490173339844, 489.44708251953125, 653.1427001953125 ], "label": "person", "class_id": 1, "confidence": 0.27322134375572205 }
{ "bbox": [ 1467.4644775390625, 363.66900634765625, 1515.344970703125, 485.3431701660156 ], "label": "person", "class_id": 1, "confidence": 0.25882694125175476 }
{ "bbox": [ 387.7037353515625, 558.943359375, 427.51300048828125, 599.34423828125 ], "label": "handbag", "class_id": 31, "confidence": 0.24956537783145905 }
{ "bbox": [ 1386.75927734375, 41.90290069580078, 1424.7803955078125, 180.5128173828125 ], "label": "person", "class_id": 1, "confidence": 0.2482987940311432 }
{ "bbox": [ 1587.3507080078125, 19.428668975830078, 1630.58056640625, 129.57455444335938 ], "label": "person", "class_id": 1, "confidence": 0.24422849714756012 }
{ "bbox": [ 770.3689575195312, 433.4539489746094, 801.5519409179688, 470.9991760253906 ], "label": "backpack", "class_id": 27, "confidence": 0.24420680105686188 }
{ "bbox": [ 1716.5869140625, 177.71131896972656, 1764.906982421875, 236.6005859375 ], "label": "backpack", "class_id": 27, "confidence": 0.24357126653194427 }
{ "bbox": [ 90.12738037109375, 127.80555725097656, 141.3280487060547, 246.38844299316406 ], "label": "person", "class_id": 1, "confidence": 0.23929929733276367 }
{ "bbox": [ 1217.0906982421875, 154.6529083251953, 1243.9566650390625, 192.82025146484375 ], "label": "handbag", "class_id": 31, "confidence": 0.2346617579460144 }
{ "bbox": [ 1145.9788818359375, 955.353271484375, 1207.149169921875, 1012.7095947265625 ], "label": "handbag", "class_id": 31, "confidence": 0.23451250791549683 }
{ "bbox": [ 1144.2115478515625, 911.6934204101562, 1210.0347900390625, 1010.2662353515625 ], "label": "handbag", "class_id": 31, "confidence": 0.23313133418560028 }
{ "bbox": [ 1682.155029296875, 42.728580474853516, 1717.4012451171875, 85.5181655883789 ], "label": "backpack", "class_id": 27, "confidence": 0.23278456926345825 }
{ "bbox": [ 984.7857055664062, 170.77835083007812, 1014.1322631835938, 211.3856201171875 ], "label": "backpack", "class_id": 27, "confidence": 0.22828608751296997 }
{ "bbox": [ 1716.5869140625, 177.71131896972656, 1764.906982421875, 236.6005859375 ], "label": "handbag", "class_id": 31, "confidence": 0.2252330332994461 }
{ "bbox": [ 240.5027618408203, 20.979854583740234, 298.7074279785156, 141.98751831054688 ], "label": "person", "class_id": 1, "confidence": 0.2225365787744522 }
{ "bbox": [ 733.4794311523438, 232.81201171875, 746.1201171875, 276.2023620605469 ], "label": "tie", "class_id": 32, "confidence": 0.2173660695552826 }
{ "bbox": [ 243.626953125, 501.9400329589844, 274.0120544433594, 586.9312133789062 ], "label": "handbag", "class_id": 31, "confidence": 0.21319645643234253 }
{ "bbox": [ 993.3316040039062, 136.20938110351562, 1027.6888427734375, 201.86135864257812 ], "label": "handbag", "class_id": 31, "confidence": 0.20854496955871582 }
{ "bbox": [ 721.6519775390625, -0.4729364812374115, 773.5230712890625, 88.1112060546875 ], "label": "person", "class_id": 1, "confidence": 0.20672853291034698 }
{ "bbox": [ 386.9186706542969, 535.6904296875, 430.4564208984375, 596.5166015625 ], "label": "handbag", "class_id": 31, "confidence": 0.20486953854560852 }
{ "bbox": [ 387.7037353515625, 558.943359375, 427.51300048828125, 599.34423828125 ], "label": "backpack", "class_id": 27, "confidence": 0.20338378846645355 }
{ "bbox": [ 1510.34033203125, 378.3916931152344, 1537.4075927734375, 423.373779296875 ], "label": "backpack", "class_id": 27, "confidence": 0.20247529447078705 }
{ "bbox": [ 1612.4608154296875, 16.751012802124023, 1661.528076171875, 126.91339874267578 ], "label": "person", "class_id": 1, "confidence": 0.19788700342178345 }
{ "bbox": [ 607.77392578125, 311.2635803222656, 630.51513671875, 354.1138000488281 ], "label": "backpack", "class_id": 27, "confidence": 0.1946074515581131 }
{ "bbox": [ 49.003883361816406, 840.3244018554688, 110.21122741699219, 918.168212890625 ], "label": "handbag", "class_id": 31, "confidence": 0.1897231489419937 }
{ "bbox": [ 1492.1395263671875, 378.5269775390625, 1522.082763671875, 427.1888732910156 ], "label": "backpack", "class_id": 27, "confidence": 0.18952950835227966 }
{ "bbox": [ 443.7960205078125, 579.0547485351562, 477.71636962890625, 612.700927734375 ], "label": "handbag", "class_id": 31, "confidence": 0.1871616542339325 }
{ "bbox": [ 1872.8194580078125, 676.8804931640625, 1919.490966796875, 750.5713500976562 ], "label": "handbag", "class_id": 31, "confidence": 0.1868421733379364 }
{ "bbox": [ 458.9429016113281, 512.1492309570312, 507.55181884765625, 567.943359375 ], "label": "backpack", "class_id": 27, "confidence": 0.18408805131912231 }
{ "bbox": [ 1015.6006469726562, 180.41879272460938, 1035.912109375, 212.3404083251953 ], "label": "handbag", "class_id": 31, "confidence": 0.18216942250728607 }
{ "bbox": [ 951.4501342773438, 252.431396484375, 974.5742797851562, 294.5617370605469 ], "label": "handbag", "class_id": 31, "confidence": 0.18057644367218018 }
{ "bbox": [ 243.626953125, 501.9400329589844, 274.0120544433594, 586.9312133789062 ], "label": "backpack", "class_id": 27, "confidence": 0.17901232838630676 }
{ "bbox": [ 1217.0906982421875, 154.6529083251953, 1243.9566650390625, 192.82025146484375 ], "label": "backpack", "class_id": 27, "confidence": 0.17458921670913696 }
{ "bbox": [ 1484.0390625, 556.1553344726562, 1533.7176513671875, 618.105224609375 ], "label": "backpack", "class_id": 27, "confidence": 0.17396876215934753 }
{ "bbox": [ 380.2286376953125, 2.8628933429718018, 427.85980224609375, 119.17540740966797 ], "label": "person", "class_id": 1, "confidence": 0.17183922231197357 }
{ "bbox": [ 469.35516357421875, 522.4736938476562, 512.6201171875, 576.8795776367188 ], "label": "handbag", "class_id": 31, "confidence": 0.17025406658649445 }
{ "bbox": [ 482.5613708496094, 535.099609375, 513.4620971679688, 576.6196899414062 ], "label": "backpack", "class_id": 27, "confidence": 0.1698049008846283 }
{ "bbox": [ 739.857666015625, 234.9354705810547, 765.076904296875, 283.8306579589844 ], "label": "backpack", "class_id": 27, "confidence": 0.16766580939292908 }
{ "bbox": [ 244.0348663330078, 542.2548217773438, 270.0650329589844, 586.3818359375 ], "label": "handbag", "class_id": 31, "confidence": 0.16682305932044983 }
{ "bbox": [ 1485.5474853515625, 567.45654296875, 1530.0679931640625, 619.0650634765625 ], "label": "handbag", "class_id": 31, "confidence": 0.16608889400959015 }
{ "bbox": [ 1267.60302734375, 68.56366729736328, 1292.2255859375, 92.78717041015625 ], "label": "handbag", "class_id": 31, "confidence": 0.15803495049476624 }
{ "bbox": [ 1177.9322509765625, 502.0583801269531, 1212.5750732421875, 557.5499267578125 ], "label": "handbag", "class_id": 31, "confidence": 0.15763655304908752 }
{ "bbox": [ 1104.9007568359375, 77.969482421875, 1130.53076171875, 114.8031234741211 ], "label": "backpack", "class_id": 27, "confidence": 0.1561351865530014 }
{ "bbox": [ 1596.572998046875, 47.309959411621094, 1619.293701171875, 83.06085968017578 ], "label": "backpack", "class_id": 27, "confidence": 0.1552073359489441 }
{ "bbox": [ 1150.545654296875, 520.8328857421875, 1169.9669189453125, 555.1107788085938 ], "label": "handbag", "class_id": 31, "confidence": 0.15485866367816925 }
{ "bbox": [ 1302.9097900390625, 1.4746811389923096, 1343.7745361328125, 104.49362182617188 ], "label": "person", "class_id": 1, "confidence": 0.15475210547447205 }
{ "bbox": [ 587.5300903320312, 308.42633056640625, 620.17138671875, 360.3193054199219 ], "label": "backpack", "class_id": 27, "confidence": 0.15443091094493866 }
{ "bbox": [ 727.8450927734375, 231.51458740234375, 749.2281494140625, 282.469482421875 ], "label": "backpack", "class_id": 27, "confidence": 0.1541636437177658 }
{ "bbox": [ 1398.7667236328125, 1.8708326816558838, 1432.196533203125, 43.755855560302734 ], "label": "backpack", "class_id": 27, "confidence": 0.1536927968263626 }
{ "bbox": [ 1269.396240234375, 43.898719787597656, 1309.7449951171875, 123.44756317138672 ], "label": "person", "class_id": 1, "confidence": 0.15336689352989197 }
{ "bbox": [ 107.52265930175781, 839.5398559570312, 142.13084411621094, 884.5982666015625 ], "label": "handbag", "class_id": 31, "confidence": 0.1532580554485321 }
{ "bbox": [ 1596.572998046875, 47.309959411621094, 1619.293701171875, 83.06085968017578 ], "label": "handbag", "class_id": 31, "confidence": 0.15285618603229523 }
{ "bbox": [ 1177.9322509765625, 502.0583801269531, 1212.5750732421875, 557.5499267578125 ], "label": "backpack", "class_id": 27, "confidence": 0.15164364874362946 }
{ "bbox": [ 1176.6544189453125, 145.7291259765625, 1210.0894775390625, 189.65003967285156 ], "label": "backpack", "class_id": 27, "confidence": 0.1491975635290146 }
{ "bbox": [ 418.8078308105469, 513.1279296875, 453.5569152832031, 554.073974609375 ], "label": "backpack", "class_id": 27, "confidence": 0.14782261848449707 }
{ "bbox": [ 1148.526611328125, 504.2064208984375, 1171.4620361328125, 553.9921264648438 ], "label": "handbag", "class_id": 31, "confidence": 0.14270198345184326 }
{ "bbox": [ 1481.4765625, 535.8668212890625, 1517.288818359375, 581.0314331054688 ], "label": "backpack", "class_id": 27, "confidence": 0.14265404641628265 }
{ "bbox": [ 718.7274169921875, 616.694091796875, 747.683349609375, 663.3373413085938 ], "label": "backpack", "class_id": 27, "confidence": 0.1417374610900879 }

result_image

result_image
Generated in

Run time and cost

This model runs on CPU hardware. We don't yet have enough runs of this model to provide performance information.

Readme

RF-DETR-COG

A serverless deployment of Roboflow’s state-of-the-art object detection model (RF-DETR) on Replicate.

Overview

This repository contains the code necessary to deploy the RF-DETR (Roboflow Detection Transformer) model as a serverless endpoint on Replicate. RF-DETR represents one of the most advanced object detection architectures available, combining the strengths of transformer-based models with efficient detection capabilities. Get more information about the model here.

How to Use Custom Models

Customizing the deployment with your own RF-DETR model requires only two simple steps:

  1. Add your model weights file to the root of this repository
  2. Update the model initialization in the code:
# Change this line in predict.py
self.model = RFDETRBase(pretrain_weights="your-custom-model.pth")
  1. Follow the Replicate deployment guide to publish your model

How to use with API:

Get more information about various available api from here.

Local Development and Testing

To test the model locally before deployment:

# Install cog if you haven't already
pip install cog

# Run a prediction with a local image
cog predict -i image=@/path/to/your/image.jpg

Requirements

  • Python 3.8+
  • PyTorch 1.10+
  • Cog
  • rfdetr

Citation

If you use RF-DETR in your research or applications, please cite the original paper:

@software{rf-detr,
  author = {Robinson, Isaac and Robicheaux, Peter and Popov, Matvei},
  license = {Apache-2.0},
  title = {RF-DETR},
  howpublished = {\url{https://github.com/roboflow/rf-detr}},
  year = {2025},
  note = {SOTA Real-Time Object Detection Model}
}

License

This project is licensed under the Apache-2.0 License - see the LICENSE file for details.