rfdetr-plus 0.0.0.dev0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- rfdetr_plus-0.0.0.dev0/LICENSE +93 -0
- rfdetr_plus-0.0.0.dev0/PKG-INFO +98 -0
- rfdetr_plus-0.0.0.dev0/README.md +67 -0
- rfdetr_plus-0.0.0.dev0/pyproject.toml +117 -0
- rfdetr_plus-0.0.0.dev0/setup.cfg +4 -0
- rfdetr_plus-0.0.0.dev0/src/rfdetr_plus/__init__.py +5 -0
- rfdetr_plus-0.0.0.dev0/src/rfdetr_plus/models/__init__.py +0 -0
- rfdetr_plus-0.0.0.dev0/src/rfdetr_plus/models/detection.py +87 -0
- rfdetr_plus-0.0.0.dev0/src/rfdetr_plus/models/downloads.py +15 -0
- rfdetr_plus-0.0.0.dev0/src/rfdetr_plus/py.typed +0 -0
- rfdetr_plus-0.0.0.dev0/src/rfdetr_plus.egg-info/PKG-INFO +98 -0
- rfdetr_plus-0.0.0.dev0/src/rfdetr_plus.egg-info/SOURCES.txt +14 -0
- rfdetr_plus-0.0.0.dev0/src/rfdetr_plus.egg-info/dependency_links.txt +1 -0
- rfdetr_plus-0.0.0.dev0/src/rfdetr_plus.egg-info/requires.txt +1 -0
- rfdetr_plus-0.0.0.dev0/src/rfdetr_plus.egg-info/top_level.txt +1 -0
- rfdetr_plus-0.0.0.dev0/tests/test_version.py +14 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Platform Model License 1.0 (PML-1.0)
|
|
2
|
+
Copyright (c) 2026 Roboflow, Inc
|
|
3
|
+
|
|
4
|
+
This license applies to the software, model weights, checkpoints, artifacts, and
|
|
5
|
+
associated documentation that are made available under this license (the "Software").
|
|
6
|
+
|
|
7
|
+
1. Platform Plan Required
|
|
8
|
+
|
|
9
|
+
You may only use, reproduce, modify, or distribute the Software if you (and any entity
|
|
10
|
+
that you represent) have accepted and are complying with the terms (including pricing,
|
|
11
|
+
usage limits, and other usage metrics) of a separate platform plan, subscription, order
|
|
12
|
+
form, or other agreement with the Software's provider that governs your access to and
|
|
13
|
+
use of the provider's platform and/or models (collectively, the "Platform Agreement").
|
|
14
|
+
|
|
15
|
+
2. Good Standing Requirement
|
|
16
|
+
|
|
17
|
+
If your account is terminated, suspended, or otherwise not in good standing under the
|
|
18
|
+
Platform Agreement (including, for example, non-payment on a paid plan or exceeding
|
|
19
|
+
usage limits on a free or paid plan), then you have no license to use the Software
|
|
20
|
+
unless and until your account returns to good standing, and you must immediately cease
|
|
21
|
+
all use of the Software. Upon request, you must certify in writing that all use has
|
|
22
|
+
ceased and all copies in your control (other than archival copies required by law) have
|
|
23
|
+
been deleted or disabled. Rights automatically reinstate upon return to good standing.
|
|
24
|
+
|
|
25
|
+
3. Modifications & Patches
|
|
26
|
+
|
|
27
|
+
You may modify the Software and publish patches to the Software. Any distribution of the
|
|
28
|
+
Software or any modified version of the Software must remain subject to, and in compliance
|
|
29
|
+
with, the Platform Agreement.
|
|
30
|
+
|
|
31
|
+
4. Usage Tracking and Reporting
|
|
32
|
+
|
|
33
|
+
The Software may include license checks, usage tracking, metering, telemetry, reporting,
|
|
34
|
+
watermarking, or other mechanisms to measure, report, or enforce plan entitlements,
|
|
35
|
+
pricing, or usage metrics ("Usage Tracking").
|
|
36
|
+
|
|
37
|
+
You may not alter, bypass, disable, interfere with, or circumvent Usage Tracking, and you
|
|
38
|
+
may not remove or obscure any functionality that is protected by or used to enforce
|
|
39
|
+
entitlements, pricing, or plan limitations, except as expressly permitted by the provider
|
|
40
|
+
in writing.
|
|
41
|
+
|
|
42
|
+
If you use the Software in an environment, workflow, or deployment context that does not
|
|
43
|
+
include Usage Tracking, you are responsible for accurately tracking and reporting your
|
|
44
|
+
usage as required by the Platform Agreement and ensuring your usage remains within its
|
|
45
|
+
limits and terms.
|
|
46
|
+
|
|
47
|
+
5. No Reverse Engineering / No Extraction of Provider Base Weights
|
|
48
|
+
|
|
49
|
+
You may not reverse engineer, decompile, disassemble, or otherwise attempt to derive the
|
|
50
|
+
Software or any portion of the Software, nor may you attempt to extract, reconstruct, or
|
|
51
|
+
otherwise obtain the provider's pre-training checkpoint weights or parameters used to
|
|
52
|
+
create, train, initialize, distill, or fine-tune the Software (the "Base Weights"), except
|
|
53
|
+
to the extent such restriction is prohibited by applicable law.
|
|
54
|
+
|
|
55
|
+
6. Third-Party Components
|
|
56
|
+
|
|
57
|
+
For all third-party components incorporated into or required to use the Software,
|
|
58
|
+
those components are licensed under the original license provided by the owner of the
|
|
59
|
+
applicable component, and you must comply with those licenses in addition to this license.
|
|
60
|
+
In the event of a conflict between this license and an upstream license of a
|
|
61
|
+
third-party component included in the Software, the upstream license governs your use
|
|
62
|
+
of that component.
|
|
63
|
+
|
|
64
|
+
7. Required Notice
|
|
65
|
+
|
|
66
|
+
You must include the full text of this license with all copies or substantial portions
|
|
67
|
+
of the Software and retain all attribution, copyright, and license notices contained in
|
|
68
|
+
the Software. No rights to provider's names, logos, or trademarks are granted, except to
|
|
69
|
+
the extent necessary to comply with this provision.
|
|
70
|
+
|
|
71
|
+
8. Export Compliance
|
|
72
|
+
|
|
73
|
+
You represent that you are not, and will not permit the Software to be used by, any party
|
|
74
|
+
or in any jurisdiction subject to trade or economic sanctions or export restrictions where
|
|
75
|
+
such use would be prohibited by applicable law.
|
|
76
|
+
|
|
77
|
+
9. Disclaimer
|
|
78
|
+
|
|
79
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
|
80
|
+
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
|
81
|
+
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
|
82
|
+
FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
83
|
+
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
84
|
+
DEALINGS IN THE SOFTWARE.
|
|
85
|
+
|
|
86
|
+
10. Miscellaneous
|
|
87
|
+
|
|
88
|
+
This license is governed by the laws specified in the Platform Agreement, and any disputes
|
|
89
|
+
will be resolved as provided therein. This license (together with the Platform Agreement)
|
|
90
|
+
is the entire agreement concerning the Software's licensing. You may not assign this
|
|
91
|
+
license except as permitted under the Platform Agreement. If any provision is
|
|
92
|
+
unenforceable, it will be modified to the minimum extent necessary to make it enforceable.
|
|
93
|
+
All rights not expressly granted are reserved. No implied licenses are granted.
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: rfdetr-plus
|
|
3
|
+
Version: 0.0.0.dev0
|
|
4
|
+
Summary: RF-DETR+ Extension Package
|
|
5
|
+
Author-email: "Roboflow, Inc" <peter@roboflow.com>
|
|
6
|
+
License-Expression: LicenseRef-PML-1.0
|
|
7
|
+
Project-URL: Homepage, https://github.com/roboflow/rf-detr-plus
|
|
8
|
+
Keywords: machine-learning,deep-learning,vision,ML,DL,AI,DETR,RF-DETR,Roboflow
|
|
9
|
+
Classifier: Development Status :: 3 - Alpha
|
|
10
|
+
Classifier: Intended Audience :: Developers
|
|
11
|
+
Classifier: Intended Audience :: Education
|
|
12
|
+
Classifier: Intended Audience :: Science/Research
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
19
|
+
Classifier: Topic :: Software Development
|
|
20
|
+
Classifier: Topic :: Scientific/Engineering
|
|
21
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
22
|
+
Classifier: Typing :: Typed
|
|
23
|
+
Classifier: Operating System :: POSIX
|
|
24
|
+
Classifier: Operating System :: Unix
|
|
25
|
+
Classifier: Operating System :: MacOS
|
|
26
|
+
Requires-Python: >=3.10
|
|
27
|
+
Description-Content-Type: text/markdown
|
|
28
|
+
License-File: LICENSE
|
|
29
|
+
Requires-Dist: rfdetr
|
|
30
|
+
Dynamic: license-file
|
|
31
|
+
|
|
32
|
+
# RF-DETR+
|
|
33
|
+
|
|
34
|
+
Extension package for [RF-DETR](https://github.com/roboflow/rf-detr) containing Platform Model License (PML) code.
|
|
35
|
+
|
|
36
|
+
## Installation
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
pip install rfdetr-plus
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Or for development:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
pip install -e ".[tests]"
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Structure
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
rf-detr-plus/
|
|
52
|
+
├── .github/
|
|
53
|
+
│ ├── workflows/ # CI/CD pipelines
|
|
54
|
+
│ └── ISSUE_TEMPLATE/ # Issue templates
|
|
55
|
+
├── src/
|
|
56
|
+
│ └── rfdetr_plus/ # Main package
|
|
57
|
+
│ ├── __init__.py
|
|
58
|
+
│ └── py.typed
|
|
59
|
+
├── tests/ # Test suite
|
|
60
|
+
├── .codecov.yml
|
|
61
|
+
├── .gitignore
|
|
62
|
+
├── .pre-commit-config.yaml
|
|
63
|
+
├── CONTRIBUTING.md
|
|
64
|
+
├── LICENSE
|
|
65
|
+
├── README.md
|
|
66
|
+
└── pyproject.toml
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Development
|
|
70
|
+
|
|
71
|
+
### Code Quality
|
|
72
|
+
|
|
73
|
+
We use `pre-commit` to ensure code quality:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
pre-commit install
|
|
77
|
+
pre-commit run --all-files
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Tests
|
|
81
|
+
|
|
82
|
+
[`pytest`](https://docs.pytest.org/) is used to run tests:
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
pytest tests/ -v
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### License Headers
|
|
89
|
+
|
|
90
|
+
All Python files must include the following license header:
|
|
91
|
+
|
|
92
|
+
```python
|
|
93
|
+
# ------------------------------------------------------------------------
|
|
94
|
+
# RF-DETR+
|
|
95
|
+
# Copyright (c) 2026 Roboflow, Inc. All Rights Reserved.
|
|
96
|
+
# Licensed under the Platform Model License 1.0 [see LICENSE for details]
|
|
97
|
+
# ------------------------------------------------------------------------
|
|
98
|
+
```
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# RF-DETR+
|
|
2
|
+
|
|
3
|
+
Extension package for [RF-DETR](https://github.com/roboflow/rf-detr) containing Platform Model License (PML) code.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install rfdetr-plus
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Or for development:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
pip install -e ".[tests]"
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Structure
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
rf-detr-plus/
|
|
21
|
+
├── .github/
|
|
22
|
+
│ ├── workflows/ # CI/CD pipelines
|
|
23
|
+
│ └── ISSUE_TEMPLATE/ # Issue templates
|
|
24
|
+
├── src/
|
|
25
|
+
│ └── rfdetr_plus/ # Main package
|
|
26
|
+
│ ├── __init__.py
|
|
27
|
+
│ └── py.typed
|
|
28
|
+
├── tests/ # Test suite
|
|
29
|
+
├── .codecov.yml
|
|
30
|
+
├── .gitignore
|
|
31
|
+
├── .pre-commit-config.yaml
|
|
32
|
+
├── CONTRIBUTING.md
|
|
33
|
+
├── LICENSE
|
|
34
|
+
├── README.md
|
|
35
|
+
└── pyproject.toml
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Development
|
|
39
|
+
|
|
40
|
+
### Code Quality
|
|
41
|
+
|
|
42
|
+
We use `pre-commit` to ensure code quality:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
pre-commit install
|
|
46
|
+
pre-commit run --all-files
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Tests
|
|
50
|
+
|
|
51
|
+
[`pytest`](https://docs.pytest.org/) is used to run tests:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
pytest tests/ -v
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### License Headers
|
|
58
|
+
|
|
59
|
+
All Python files must include the following license header:
|
|
60
|
+
|
|
61
|
+
```python
|
|
62
|
+
# ------------------------------------------------------------------------
|
|
63
|
+
# RF-DETR+
|
|
64
|
+
# Copyright (c) 2026 Roboflow, Inc. All Rights Reserved.
|
|
65
|
+
# Licensed under the Platform Model License 1.0 [see LICENSE for details]
|
|
66
|
+
# ------------------------------------------------------------------------
|
|
67
|
+
```
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=42", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "rfdetr-plus"
|
|
7
|
+
version = "0.0.0.dev0"
|
|
8
|
+
description = "RF-DETR+ Extension Package"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
authors = [
|
|
11
|
+
{name = "Roboflow, Inc", email = "peter@roboflow.com"}
|
|
12
|
+
]
|
|
13
|
+
license = "LicenseRef-PML-1.0"
|
|
14
|
+
license-files = ["LICENSE"]
|
|
15
|
+
requires-python = ">=3.10"
|
|
16
|
+
classifiers = [
|
|
17
|
+
"Development Status :: 3 - Alpha",
|
|
18
|
+
"Intended Audience :: Developers",
|
|
19
|
+
"Intended Audience :: Education",
|
|
20
|
+
"Intended Audience :: Science/Research",
|
|
21
|
+
"Programming Language :: Python :: 3",
|
|
22
|
+
"Programming Language :: Python :: 3.10",
|
|
23
|
+
"Programming Language :: Python :: 3.11",
|
|
24
|
+
"Programming Language :: Python :: 3.12",
|
|
25
|
+
"Programming Language :: Python :: 3.13",
|
|
26
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
27
|
+
"Topic :: Software Development",
|
|
28
|
+
"Topic :: Scientific/Engineering",
|
|
29
|
+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
|
30
|
+
"Typing :: Typed",
|
|
31
|
+
"Operating System :: POSIX",
|
|
32
|
+
"Operating System :: Unix",
|
|
33
|
+
"Operating System :: MacOS"
|
|
34
|
+
]
|
|
35
|
+
keywords = ["machine-learning", "deep-learning", "vision", "ML", "DL", "AI", "DETR", "RF-DETR", "Roboflow"]
|
|
36
|
+
|
|
37
|
+
dependencies = [
|
|
38
|
+
"rfdetr",
|
|
39
|
+
]
|
|
40
|
+
|
|
41
|
+
[project.optional-dependencies]
|
|
42
|
+
|
|
43
|
+
[dependency-groups]
|
|
44
|
+
build = [
|
|
45
|
+
"twine>=5.1.1",
|
|
46
|
+
"wheel>=0.40",
|
|
47
|
+
"build>=0.10"
|
|
48
|
+
]
|
|
49
|
+
|
|
50
|
+
tests = [
|
|
51
|
+
"pytest>=7.2.2,<9",
|
|
52
|
+
"pytest-cov>=4,<8",
|
|
53
|
+
]
|
|
54
|
+
|
|
55
|
+
docs = [
|
|
56
|
+
"mkdocs-material[imaging]>=9.7",
|
|
57
|
+
"mkdocstrings>=0.25.2,<0.30.0",
|
|
58
|
+
"mkdocstrings-python>=1.10.9",
|
|
59
|
+
"mike>=2.0.0",
|
|
60
|
+
"mkdocs-jupyter>=0.24.3",
|
|
61
|
+
"mkdocs-git-committers-plugin-2>=2.4.1; python_version >= '3.8' and python_version < '4'",
|
|
62
|
+
"mkdocs-git-revision-date-localized-plugin>=1.2.4"
|
|
63
|
+
]
|
|
64
|
+
|
|
65
|
+
dev = [
|
|
66
|
+
"pre-commit",
|
|
67
|
+
]
|
|
68
|
+
|
|
69
|
+
[project.urls]
|
|
70
|
+
Homepage = "https://github.com/roboflow/rf-detr-plus"
|
|
71
|
+
|
|
72
|
+
[tool.setuptools]
|
|
73
|
+
package-dir = {"" = "src"}
|
|
74
|
+
include-package-data = false
|
|
75
|
+
|
|
76
|
+
[tool.setuptools.packages.find]
|
|
77
|
+
where = ["src"]
|
|
78
|
+
include = ["rfdetr_plus*"]
|
|
79
|
+
|
|
80
|
+
[tool.setuptools.package-data]
|
|
81
|
+
rfdetr_plus = ["py.typed"]
|
|
82
|
+
|
|
83
|
+
[tool.ruff]
|
|
84
|
+
line-length = 120
|
|
85
|
+
target-version = "py310"
|
|
86
|
+
|
|
87
|
+
[tool.ruff.lint]
|
|
88
|
+
select = [
|
|
89
|
+
"E", # pycodestyle errors
|
|
90
|
+
"W", # pycodestyle warnings
|
|
91
|
+
"F", # pyflakes
|
|
92
|
+
]
|
|
93
|
+
extend-select = [
|
|
94
|
+
"I", # isort
|
|
95
|
+
]
|
|
96
|
+
ignore = [
|
|
97
|
+
"E501", # line too long
|
|
98
|
+
"E722", # do not use bare `except`
|
|
99
|
+
"E741", # ambiguous variable name
|
|
100
|
+
"F401", # imported but unused
|
|
101
|
+
"F403", # `from ... import *` used
|
|
102
|
+
"F405", # may be undefined from star imports
|
|
103
|
+
"E721", # use `is` for type comparisons
|
|
104
|
+
"F821", # undefined name
|
|
105
|
+
]
|
|
106
|
+
|
|
107
|
+
[tool.pytest.ini_options]
|
|
108
|
+
addopts = [
|
|
109
|
+
"-v", # verbose output
|
|
110
|
+
"--color=yes", # colored output
|
|
111
|
+
]
|
|
112
|
+
markers = [
|
|
113
|
+
"gpu: tests that require GPU or are slow on CPU",
|
|
114
|
+
]
|
|
115
|
+
|
|
116
|
+
[tool.codespell]
|
|
117
|
+
skip = "*.pth"
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# ------------------------------------------------------------------------
|
|
2
|
+
# RF-DETR+
|
|
3
|
+
# Copyright (c) 2026 Roboflow, Inc. All Rights Reserved.
|
|
4
|
+
# Licensed under the Platform Model License 1.0 [see LICENSE for details]
|
|
5
|
+
# ------------------------------------------------------------------------
|
|
File without changes
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# ------------------------------------------------------------------------
|
|
2
|
+
# Platform Model License 1.0 (PML-1.0)
|
|
3
|
+
# Copyright (c) 2026 Roboflow, Inc. All Rights Reserved.
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the Platform Model License 1.0.
|
|
6
|
+
# Use, modification, and distribution of code and checkpoints require
|
|
7
|
+
# an active Roboflow platform plan or agreement.
|
|
8
|
+
#
|
|
9
|
+
# See the LICENSE.platform file for full terms and conditions.
|
|
10
|
+
# ------------------------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
from typing import Any, Literal
|
|
13
|
+
|
|
14
|
+
from rfdetr.config import ModelConfig, TrainConfig
|
|
15
|
+
from rfdetr.detr import RFDETR
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class RFDETRXLargeConfig(ModelConfig):
|
|
19
|
+
encoder: Literal["dinov2_windowed_base"] = "dinov2_windowed_base"
|
|
20
|
+
hidden_dim: int = 512
|
|
21
|
+
dec_layers: int = 5
|
|
22
|
+
sa_nheads: int = 16
|
|
23
|
+
ca_nheads: int = 32
|
|
24
|
+
dec_n_points: int = 4
|
|
25
|
+
num_windows: int = 1
|
|
26
|
+
patch_size: int = 20
|
|
27
|
+
projector_scale: list[Literal["P4",]] = ["P4"]
|
|
28
|
+
out_feature_indexes: list[int] = [3, 6, 9, 12]
|
|
29
|
+
num_classes: int = 365
|
|
30
|
+
positional_encoding_size: int = 700 // 20
|
|
31
|
+
resolution: int = 700
|
|
32
|
+
pretrain_weights: str = "rf-detr-xlarge.pth"
|
|
33
|
+
license: str = "PML-1.0"
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class RFDETR2XLargeConfig(ModelConfig):
|
|
37
|
+
encoder: Literal["dinov2_windowed_base"] = "dinov2_windowed_base"
|
|
38
|
+
hidden_dim: int = 512
|
|
39
|
+
dec_layers: int = 5
|
|
40
|
+
sa_nheads: int = 16
|
|
41
|
+
ca_nheads: int = 32
|
|
42
|
+
dec_n_points: int = 4
|
|
43
|
+
num_windows: int = 2
|
|
44
|
+
patch_size: int = 20
|
|
45
|
+
projector_scale: list[Literal["P4",]] = ["P4"]
|
|
46
|
+
out_feature_indexes: list[int] = [3, 6, 9, 12]
|
|
47
|
+
num_classes: int = 365
|
|
48
|
+
positional_encoding_size: int = 880 // 20
|
|
49
|
+
resolution: int = 880
|
|
50
|
+
pretrain_weights: str = "rf-detr-xxlarge.pth"
|
|
51
|
+
license: str = "PML-1.0"
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
class RFDETRXLarge(RFDETR):
|
|
55
|
+
size: Literal["rfdetr-xlarge"] = "rfdetr-xlarge"
|
|
56
|
+
|
|
57
|
+
def __init__(self, accept_platform_model_license: bool = False, **kwargs: Any) -> None:
|
|
58
|
+
if accept_platform_model_license is not True:
|
|
59
|
+
raise ValueError(
|
|
60
|
+
"You must accept the platform model license (LICENSE.platform) to use this model. "
|
|
61
|
+
"You can do this by setting accept_platform_model_license=True when initializing the model."
|
|
62
|
+
)
|
|
63
|
+
super().__init__(**kwargs)
|
|
64
|
+
|
|
65
|
+
def get_model_config(self, **kwargs: Any) -> RFDETRXLargeConfig:
|
|
66
|
+
return RFDETRXLargeConfig(**kwargs)
|
|
67
|
+
|
|
68
|
+
def get_train_config(self, **kwargs: Any) -> TrainConfig:
|
|
69
|
+
return TrainConfig(**kwargs)
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
class RFDETR2XLarge(RFDETR):
|
|
73
|
+
size: Literal["rfdetr-2xlarge"] = "rfdetr-2xlarge"
|
|
74
|
+
|
|
75
|
+
def __init__(self, accept_platform_model_license: bool = False, **kwargs: Any) -> None:
|
|
76
|
+
if accept_platform_model_license is not True:
|
|
77
|
+
raise ValueError(
|
|
78
|
+
"You must accept the platform model license (LICENSE.platform) to use this model. "
|
|
79
|
+
"You can do this by setting accept_platform_model_license=True when initializing the model."
|
|
80
|
+
)
|
|
81
|
+
super().__init__(**kwargs)
|
|
82
|
+
|
|
83
|
+
def get_model_config(self, **kwargs: Any) -> RFDETR2XLargeConfig:
|
|
84
|
+
return RFDETR2XLargeConfig(**kwargs)
|
|
85
|
+
|
|
86
|
+
def get_train_config(self, **kwargs: Any) -> TrainConfig:
|
|
87
|
+
return TrainConfig(**kwargs)
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# ------------------------------------------------------------------------
|
|
2
|
+
# Platform Model License 1.0 (PML-1.0)
|
|
3
|
+
# Copyright (c) 2026 Roboflow, Inc. All Rights Reserved.
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the Platform Model License 1.0.
|
|
6
|
+
# Use, modification, and distribution of code and checkpoints require
|
|
7
|
+
# an active Roboflow platform plan or agreement.
|
|
8
|
+
#
|
|
9
|
+
# See the LICENSE.platform file for full terms and conditions.
|
|
10
|
+
# ------------------------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
_PLATFORM_MODELS = {
|
|
13
|
+
"rf-detr-xlarge.pth": "https://storage.googleapis.com/rfdetr/platform-licensed/rf-detr-xlarge.pth",
|
|
14
|
+
"rf-detr-xxlarge.pth": "https://storage.googleapis.com/rfdetr/platform-licensed/rf-detr-xxlarge.pth",
|
|
15
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: rfdetr-plus
|
|
3
|
+
Version: 0.0.0.dev0
|
|
4
|
+
Summary: RF-DETR+ Extension Package
|
|
5
|
+
Author-email: "Roboflow, Inc" <peter@roboflow.com>
|
|
6
|
+
License-Expression: LicenseRef-PML-1.0
|
|
7
|
+
Project-URL: Homepage, https://github.com/roboflow/rf-detr-plus
|
|
8
|
+
Keywords: machine-learning,deep-learning,vision,ML,DL,AI,DETR,RF-DETR,Roboflow
|
|
9
|
+
Classifier: Development Status :: 3 - Alpha
|
|
10
|
+
Classifier: Intended Audience :: Developers
|
|
11
|
+
Classifier: Intended Audience :: Education
|
|
12
|
+
Classifier: Intended Audience :: Science/Research
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
19
|
+
Classifier: Topic :: Software Development
|
|
20
|
+
Classifier: Topic :: Scientific/Engineering
|
|
21
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
22
|
+
Classifier: Typing :: Typed
|
|
23
|
+
Classifier: Operating System :: POSIX
|
|
24
|
+
Classifier: Operating System :: Unix
|
|
25
|
+
Classifier: Operating System :: MacOS
|
|
26
|
+
Requires-Python: >=3.10
|
|
27
|
+
Description-Content-Type: text/markdown
|
|
28
|
+
License-File: LICENSE
|
|
29
|
+
Requires-Dist: rfdetr
|
|
30
|
+
Dynamic: license-file
|
|
31
|
+
|
|
32
|
+
# RF-DETR+
|
|
33
|
+
|
|
34
|
+
Extension package for [RF-DETR](https://github.com/roboflow/rf-detr) containing Platform Model License (PML) code.
|
|
35
|
+
|
|
36
|
+
## Installation
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
pip install rfdetr-plus
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Or for development:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
pip install -e ".[tests]"
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Structure
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
rf-detr-plus/
|
|
52
|
+
├── .github/
|
|
53
|
+
│ ├── workflows/ # CI/CD pipelines
|
|
54
|
+
│ └── ISSUE_TEMPLATE/ # Issue templates
|
|
55
|
+
├── src/
|
|
56
|
+
│ └── rfdetr_plus/ # Main package
|
|
57
|
+
│ ├── __init__.py
|
|
58
|
+
│ └── py.typed
|
|
59
|
+
├── tests/ # Test suite
|
|
60
|
+
├── .codecov.yml
|
|
61
|
+
├── .gitignore
|
|
62
|
+
├── .pre-commit-config.yaml
|
|
63
|
+
├── CONTRIBUTING.md
|
|
64
|
+
├── LICENSE
|
|
65
|
+
├── README.md
|
|
66
|
+
└── pyproject.toml
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Development
|
|
70
|
+
|
|
71
|
+
### Code Quality
|
|
72
|
+
|
|
73
|
+
We use `pre-commit` to ensure code quality:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
pre-commit install
|
|
77
|
+
pre-commit run --all-files
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Tests
|
|
81
|
+
|
|
82
|
+
[`pytest`](https://docs.pytest.org/) is used to run tests:
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
pytest tests/ -v
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### License Headers
|
|
89
|
+
|
|
90
|
+
All Python files must include the following license header:
|
|
91
|
+
|
|
92
|
+
```python
|
|
93
|
+
# ------------------------------------------------------------------------
|
|
94
|
+
# RF-DETR+
|
|
95
|
+
# Copyright (c) 2026 Roboflow, Inc. All Rights Reserved.
|
|
96
|
+
# Licensed under the Platform Model License 1.0 [see LICENSE for details]
|
|
97
|
+
# ------------------------------------------------------------------------
|
|
98
|
+
```
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.md
|
|
3
|
+
pyproject.toml
|
|
4
|
+
src/rfdetr_plus/__init__.py
|
|
5
|
+
src/rfdetr_plus/py.typed
|
|
6
|
+
src/rfdetr_plus.egg-info/PKG-INFO
|
|
7
|
+
src/rfdetr_plus.egg-info/SOURCES.txt
|
|
8
|
+
src/rfdetr_plus.egg-info/dependency_links.txt
|
|
9
|
+
src/rfdetr_plus.egg-info/requires.txt
|
|
10
|
+
src/rfdetr_plus.egg-info/top_level.txt
|
|
11
|
+
src/rfdetr_plus/models/__init__.py
|
|
12
|
+
src/rfdetr_plus/models/detection.py
|
|
13
|
+
src/rfdetr_plus/models/downloads.py
|
|
14
|
+
tests/test_version.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
rfdetr
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
rfdetr_plus
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# ------------------------------------------------------------------------
|
|
2
|
+
# RF-DETR+
|
|
3
|
+
# Copyright (c) 2026 Roboflow, Inc. All Rights Reserved.
|
|
4
|
+
# Licensed under the Platform Model License 1.0 [see LICENSE for details]
|
|
5
|
+
# ------------------------------------------------------------------------
|
|
6
|
+
"""Test basic package functionality."""
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def test_version() -> None:
|
|
10
|
+
"""Test that the package version is accessible."""
|
|
11
|
+
from rfdetr_plus import __version__
|
|
12
|
+
|
|
13
|
+
assert isinstance(__version__, str)
|
|
14
|
+
assert len(__version__) > 0
|