ultrafast-pycocotools 0.1.5__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.
Files changed (24) hide show
  1. ultrafast_pycocotools-0.1.5/Cargo.lock +362 -0
  2. ultrafast_pycocotools-0.1.5/Cargo.toml +29 -0
  3. ultrafast_pycocotools-0.1.5/LICENSE +25 -0
  4. ultrafast_pycocotools-0.1.5/PKG-INFO +335 -0
  5. ultrafast_pycocotools-0.1.5/README.md +305 -0
  6. ultrafast_pycocotools-0.1.5/pyproject.toml +48 -0
  7. ultrafast_pycocotools-0.1.5/python/ultrafast_pycocotools/__init__.py +64 -0
  8. ultrafast_pycocotools-0.1.5/python/ultrafast_pycocotools/_lvis.py +74 -0
  9. ultrafast_pycocotools-0.1.5/python/ultrafast_pycocotools/coco.py +592 -0
  10. ultrafast_pycocotools-0.1.5/python/ultrafast_pycocotools/cocoeval.py +835 -0
  11. ultrafast_pycocotools-0.1.5/python/ultrafast_pycocotools/integrations/__init__.py +1 -0
  12. ultrafast_pycocotools-0.1.5/python/ultrafast_pycocotools/integrations/rfdetr.py +76 -0
  13. ultrafast_pycocotools-0.1.5/python/ultrafast_pycocotools/mask.py +89 -0
  14. ultrafast_pycocotools-0.1.5/rust/ufcoco-core/Cargo.toml +13 -0
  15. ultrafast_pycocotools-0.1.5/rust/ufcoco-core/src/eval.rs +1769 -0
  16. ultrafast_pycocotools-0.1.5/rust/ufcoco-core/src/group.rs +291 -0
  17. ultrafast_pycocotools-0.1.5/rust/ufcoco-core/src/lib.rs +36 -0
  18. ultrafast_pycocotools-0.1.5/rust/ufcoco-core/src/rle.rs +1227 -0
  19. ultrafast_pycocotools-0.1.5/rust/ufcoco-py/Cargo.toml +26 -0
  20. ultrafast_pycocotools-0.1.5/rust/ufcoco-py/src/alloc.rs +92 -0
  21. ultrafast_pycocotools-0.1.5/rust/ufcoco-py/src/compact.rs +321 -0
  22. ultrafast_pycocotools-0.1.5/rust/ufcoco-py/src/json.rs +217 -0
  23. ultrafast_pycocotools-0.1.5/rust/ufcoco-py/src/lib.rs +888 -0
  24. ultrafast_pycocotools-0.1.5/rust/ufcoco-py/src/mask.rs +382 -0
@@ -0,0 +1,362 @@
1
+ # This file is automatically @generated by Cargo.
2
+ # It is not intended for manual editing.
3
+ version = 3
4
+
5
+ [[package]]
6
+ name = "autocfg"
7
+ version = "1.5.1"
8
+ source = "registry+https://github.com/rust-lang/crates.io-index"
9
+ checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53"
10
+
11
+ [[package]]
12
+ name = "crossbeam-deque"
13
+ version = "0.8.7"
14
+ source = "registry+https://github.com/rust-lang/crates.io-index"
15
+ checksum = "5181e0de7b61eb03a81e347d6dd8797bae9da5146707b51077e2d71a54ec0ceb"
16
+ dependencies = [
17
+ "crossbeam-epoch",
18
+ "crossbeam-utils",
19
+ ]
20
+
21
+ [[package]]
22
+ name = "crossbeam-epoch"
23
+ version = "0.9.20"
24
+ source = "registry+https://github.com/rust-lang/crates.io-index"
25
+ checksum = "2d6914041f254d6e9176c01941b21115dcfb7089e55135a35411081bd106ef3f"
26
+ dependencies = [
27
+ "crossbeam-utils",
28
+ ]
29
+
30
+ [[package]]
31
+ name = "crossbeam-utils"
32
+ version = "0.8.22"
33
+ source = "registry+https://github.com/rust-lang/crates.io-index"
34
+ checksum = "61803da095bee82a81bb1a452ecc25d3b2f1416d1897eb86430c6159ef717c17"
35
+
36
+ [[package]]
37
+ name = "either"
38
+ version = "1.17.0"
39
+ source = "registry+https://github.com/rust-lang/crates.io-index"
40
+ checksum = "9e5e8f6c15a24b9a3ee5efec809ccd006d3b30e8b3bb63c39af737c7f87daa1d"
41
+
42
+ [[package]]
43
+ name = "heck"
44
+ version = "0.5.0"
45
+ source = "registry+https://github.com/rust-lang/crates.io-index"
46
+ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
47
+
48
+ [[package]]
49
+ name = "itoa"
50
+ version = "1.0.18"
51
+ source = "registry+https://github.com/rust-lang/crates.io-index"
52
+ checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
53
+
54
+ [[package]]
55
+ name = "libc"
56
+ version = "0.2.189"
57
+ source = "registry+https://github.com/rust-lang/crates.io-index"
58
+ checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2"
59
+
60
+ [[package]]
61
+ name = "matrixmultiply"
62
+ version = "0.3.11"
63
+ source = "registry+https://github.com/rust-lang/crates.io-index"
64
+ checksum = "3f607c237553f086e7043417a51df26b2eb899d3caff94e6a67592ff992fedc7"
65
+ dependencies = [
66
+ "autocfg",
67
+ "rawpointer",
68
+ ]
69
+
70
+ [[package]]
71
+ name = "memchr"
72
+ version = "2.8.3"
73
+ source = "registry+https://github.com/rust-lang/crates.io-index"
74
+ checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98"
75
+
76
+ [[package]]
77
+ name = "ndarray"
78
+ version = "0.16.1"
79
+ source = "registry+https://github.com/rust-lang/crates.io-index"
80
+ checksum = "882ed72dce9365842bf196bdeedf5055305f11fc8c03dee7bb0194a6cad34841"
81
+ dependencies = [
82
+ "matrixmultiply",
83
+ "num-complex",
84
+ "num-integer",
85
+ "num-traits",
86
+ "portable-atomic",
87
+ "portable-atomic-util",
88
+ "rawpointer",
89
+ ]
90
+
91
+ [[package]]
92
+ name = "num-complex"
93
+ version = "0.4.6"
94
+ source = "registry+https://github.com/rust-lang/crates.io-index"
95
+ checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495"
96
+ dependencies = [
97
+ "num-traits",
98
+ ]
99
+
100
+ [[package]]
101
+ name = "num-integer"
102
+ version = "0.1.47"
103
+ source = "registry+https://github.com/rust-lang/crates.io-index"
104
+ checksum = "7ce2d95d4b3734dc35aa2f45e1aa22cd416814592a4f9d9205e11affd5b8e10b"
105
+ dependencies = [
106
+ "num-traits",
107
+ ]
108
+
109
+ [[package]]
110
+ name = "num-traits"
111
+ version = "0.2.19"
112
+ source = "registry+https://github.com/rust-lang/crates.io-index"
113
+ checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
114
+ dependencies = [
115
+ "autocfg",
116
+ ]
117
+
118
+ [[package]]
119
+ name = "numpy"
120
+ version = "0.29.0"
121
+ source = "registry+https://github.com/rust-lang/crates.io-index"
122
+ checksum = "6a5b15d63a5ff39e378daed0e1340d3a5964703ea9712eb09a0dc66fade996f4"
123
+ dependencies = [
124
+ "libc",
125
+ "ndarray",
126
+ "num-complex",
127
+ "num-integer",
128
+ "num-traits",
129
+ "pyo3",
130
+ "pyo3-build-config",
131
+ "rustc-hash",
132
+ ]
133
+
134
+ [[package]]
135
+ name = "once_cell"
136
+ version = "1.21.4"
137
+ source = "registry+https://github.com/rust-lang/crates.io-index"
138
+ checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
139
+
140
+ [[package]]
141
+ name = "portable-atomic"
142
+ version = "1.15.0"
143
+ source = "registry+https://github.com/rust-lang/crates.io-index"
144
+ checksum = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85"
145
+
146
+ [[package]]
147
+ name = "portable-atomic-util"
148
+ version = "0.2.7"
149
+ source = "registry+https://github.com/rust-lang/crates.io-index"
150
+ checksum = "c2a106d1259c23fac8e543272398ae0e3c0b8d33c88ed73d0cc71b0f1d902618"
151
+ dependencies = [
152
+ "portable-atomic",
153
+ ]
154
+
155
+ [[package]]
156
+ name = "proc-macro2"
157
+ version = "1.0.107"
158
+ source = "registry+https://github.com/rust-lang/crates.io-index"
159
+ checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"
160
+ dependencies = [
161
+ "unicode-ident",
162
+ ]
163
+
164
+ [[package]]
165
+ name = "pyo3"
166
+ version = "0.29.2"
167
+ source = "registry+https://github.com/rust-lang/crates.io-index"
168
+ checksum = "4688ddedf473e32662b9b067670129a8afb8c18e351482c70d62ba4a88171e8b"
169
+ dependencies = [
170
+ "libc",
171
+ "once_cell",
172
+ "portable-atomic",
173
+ "pyo3-build-config",
174
+ "pyo3-ffi",
175
+ "pyo3-macros",
176
+ ]
177
+
178
+ [[package]]
179
+ name = "pyo3-build-config"
180
+ version = "0.29.2"
181
+ source = "registry+https://github.com/rust-lang/crates.io-index"
182
+ checksum = "f41027e41b4bd03f6e60f9f417fe24a6341a6bb744edd62b6f709f2a52ea30e9"
183
+ dependencies = [
184
+ "target-lexicon",
185
+ ]
186
+
187
+ [[package]]
188
+ name = "pyo3-ffi"
189
+ version = "0.29.2"
190
+ source = "registry+https://github.com/rust-lang/crates.io-index"
191
+ checksum = "e591a95526fead067432c3b3a33fc74770b87b1e04e73671090d9c2055a2b327"
192
+ dependencies = [
193
+ "libc",
194
+ "pyo3-build-config",
195
+ ]
196
+
197
+ [[package]]
198
+ name = "pyo3-macros"
199
+ version = "0.29.2"
200
+ source = "registry+https://github.com/rust-lang/crates.io-index"
201
+ checksum = "73225868fc1cd84eef2c3c230ddb91273bf1de46aeb8a4248da76d32a0924a1c"
202
+ dependencies = [
203
+ "proc-macro2",
204
+ "pyo3-macros-backend",
205
+ "quote",
206
+ "syn 2.0.119",
207
+ ]
208
+
209
+ [[package]]
210
+ name = "pyo3-macros-backend"
211
+ version = "0.29.2"
212
+ source = "registry+https://github.com/rust-lang/crates.io-index"
213
+ checksum = "571575aa3749fa6216757dd47d2a3e7ef360f329a40f0666a9fbd14889024952"
214
+ dependencies = [
215
+ "heck",
216
+ "proc-macro2",
217
+ "quote",
218
+ "syn 2.0.119",
219
+ ]
220
+
221
+ [[package]]
222
+ name = "quote"
223
+ version = "1.0.47"
224
+ source = "registry+https://github.com/rust-lang/crates.io-index"
225
+ checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"
226
+ dependencies = [
227
+ "proc-macro2",
228
+ ]
229
+
230
+ [[package]]
231
+ name = "rawpointer"
232
+ version = "0.2.1"
233
+ source = "registry+https://github.com/rust-lang/crates.io-index"
234
+ checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3"
235
+
236
+ [[package]]
237
+ name = "rayon"
238
+ version = "1.12.0"
239
+ source = "registry+https://github.com/rust-lang/crates.io-index"
240
+ checksum = "fb39b166781f92d482534ef4b4b1b2568f42613b53e5b6c160e24cfbfa30926d"
241
+ dependencies = [
242
+ "either",
243
+ "rayon-core",
244
+ ]
245
+
246
+ [[package]]
247
+ name = "rayon-core"
248
+ version = "1.13.0"
249
+ source = "registry+https://github.com/rust-lang/crates.io-index"
250
+ checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91"
251
+ dependencies = [
252
+ "crossbeam-deque",
253
+ "crossbeam-utils",
254
+ ]
255
+
256
+ [[package]]
257
+ name = "rustc-hash"
258
+ version = "2.1.3"
259
+ source = "registry+https://github.com/rust-lang/crates.io-index"
260
+ checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d"
261
+
262
+ [[package]]
263
+ name = "serde"
264
+ version = "1.0.229"
265
+ source = "registry+https://github.com/rust-lang/crates.io-index"
266
+ checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba"
267
+ dependencies = [
268
+ "serde_core",
269
+ "serde_derive",
270
+ ]
271
+
272
+ [[package]]
273
+ name = "serde_core"
274
+ version = "1.0.229"
275
+ source = "registry+https://github.com/rust-lang/crates.io-index"
276
+ checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48"
277
+ dependencies = [
278
+ "serde_derive",
279
+ ]
280
+
281
+ [[package]]
282
+ name = "serde_derive"
283
+ version = "1.0.229"
284
+ source = "registry+https://github.com/rust-lang/crates.io-index"
285
+ checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348"
286
+ dependencies = [
287
+ "proc-macro2",
288
+ "quote",
289
+ "syn 3.0.3",
290
+ ]
291
+
292
+ [[package]]
293
+ name = "serde_json"
294
+ version = "1.0.151"
295
+ source = "registry+https://github.com/rust-lang/crates.io-index"
296
+ checksum = "c841b55ecdae098c80dcae9cf767f6f8a0c2cdb3416bbef72181df4d0fe73f14"
297
+ dependencies = [
298
+ "itoa",
299
+ "memchr",
300
+ "serde",
301
+ "serde_core",
302
+ "zmij",
303
+ ]
304
+
305
+ [[package]]
306
+ name = "syn"
307
+ version = "2.0.119"
308
+ source = "registry+https://github.com/rust-lang/crates.io-index"
309
+ checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297"
310
+ dependencies = [
311
+ "proc-macro2",
312
+ "quote",
313
+ "unicode-ident",
314
+ ]
315
+
316
+ [[package]]
317
+ name = "syn"
318
+ version = "3.0.3"
319
+ source = "registry+https://github.com/rust-lang/crates.io-index"
320
+ checksum = "53e9bae58849f64dfa4f5d5ae372c8341f7305f82a3868709269343628b659a3"
321
+ dependencies = [
322
+ "proc-macro2",
323
+ "quote",
324
+ "unicode-ident",
325
+ ]
326
+
327
+ [[package]]
328
+ name = "target-lexicon"
329
+ version = "0.13.5"
330
+ source = "registry+https://github.com/rust-lang/crates.io-index"
331
+ checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca"
332
+
333
+ [[package]]
334
+ name = "ufcoco-core"
335
+ version = "0.1.5"
336
+ dependencies = [
337
+ "rayon",
338
+ ]
339
+
340
+ [[package]]
341
+ name = "ufcoco-py"
342
+ version = "0.1.5"
343
+ dependencies = [
344
+ "numpy",
345
+ "pyo3",
346
+ "rayon",
347
+ "serde",
348
+ "serde_json",
349
+ "ufcoco-core",
350
+ ]
351
+
352
+ [[package]]
353
+ name = "unicode-ident"
354
+ version = "1.0.24"
355
+ source = "registry+https://github.com/rust-lang/crates.io-index"
356
+ checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
357
+
358
+ [[package]]
359
+ name = "zmij"
360
+ version = "1.0.23"
361
+ source = "registry+https://github.com/rust-lang/crates.io-index"
362
+ checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b"
@@ -0,0 +1,29 @@
1
+ [workspace]
2
+ members = ["rust/ufcoco-core", "rust/ufcoco-py"]
3
+ resolver = "2"
4
+
5
+ [workspace.package]
6
+ version = "0.1.5"
7
+ edition = "2021"
8
+ rust-version = "1.75"
9
+ license = "BSD-2-Clause"
10
+ repository = "https://github.com/developer0hye/ultrafast-pycocotools"
11
+
12
+ [workspace.dependencies]
13
+ rayon = "1.10"
14
+ serde = { version = "1", features = ["derive"] }
15
+ # `float_roundtrip` is not optional for us. serde_json's default number parser
16
+ # takes a fast path that is off by one ULP on values like 32002.703, and an
17
+ # annotation's `area` decides its small/medium/large bucket — a one-ULP shift
18
+ # on a value sitting near 32^2 moves AP_small. Caught by
19
+ # tests/test_json_loader.py against real COCO annotations.
20
+ serde_json = { version = "1", features = ["float_roundtrip"] }
21
+
22
+ # Equivalence with pycocotools is decided by floating-point details, so the
23
+ # release profile must not enable anything that lets LLVM reassociate FP math
24
+ # (no fast-math flags anywhere). opt-level/lto/codegen-units are all
25
+ # value-preserving.
26
+ [profile.release]
27
+ opt-level = 3
28
+ lto = "thin"
29
+ codegen-units = 1
@@ -0,0 +1,25 @@
1
+ BSD 2-Clause License
2
+
3
+ Copyright (c) 2026, Yonghye Kwon
4
+ All rights reserved.
5
+
6
+ Redistribution and use in source and binary forms, with or without
7
+ modification, are permitted provided that the following conditions are met:
8
+
9
+ 1. Redistributions of source code must retain the above copyright notice, this
10
+ list of conditions and the following disclaimer.
11
+
12
+ 2. Redistributions in binary form must reproduce the above copyright notice,
13
+ this list of conditions and the following disclaimer in the documentation
14
+ and/or other materials provided with the distribution.
15
+
16
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
20
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
22
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
23
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.