bd commited on
Commit ·
f6d09c1
0
Parent(s):
RC1
Browse filesFiles changed (19)
- .gitattributesAdded+2
- .gitignoreAdded+17
- .python-versionAdded+1
- LICENSEAdded+21
- LICENSE-APACHE-2.0.txtAdded+202
- LICENSE-DINOv3.mdAdded+66
- NOTICE.mdAdded+47
- README.mdAdded+166
- assets/demo.webpAdded
- data.pyAdded+648
- models.pyAdded+64
- predict_onnx.pyAdded+96
- pyproject.tomlAdded+30
- targets.pyAdded+33
- test_training.pyAdded+610
- train.pyAdded+1108
- uv.lockAdded+659
- weights/grid16.onnxAdded+3
- weights/grid9.onnxAdded+3
12*.onnx filter=lfs diff=lfs merge=lfs -text*.webp filter=lfs diff=lfs merge=lfs -text1234567891011121314151617.DS_Store.venv/__pycache__/dataset1/dataset2/dataset3/dataset4/runs/.cache/*.ptdata/.idea/.ruff_cache/.env.env.*!.env.example:memory:.ses13.11123456789101112131415161718192021MIT License
Copyright (c) 2026 RC1 contributors
Permission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in allcopies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THESOFTWARE.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566# DINOv3 License
*Last Updated: August 19, 2025*
**“Agreement”** means the terms and conditions for use, reproduction, distribution and modification of the DINO Materials set forth herein.
**“DINO Materials”** means, collectively, Documentation and the models, software and algorithms, including machine-learning model code, trained model weights, inference-enabling code, training-enabling code, fine-tuning enabling code, and other elements of the foregoing distributed by Meta and made available under this Agreement.
**“Documentation”** means the specifications, manuals and documentation accompanyingDINO Materials distributed by Meta.
**“Licensee”** or **“you”** means you, or your employer or any other person or entity (if you are entering into this Agreement on such person or entity’s behalf), of the age required under applicable laws, rules or regulations to provide legal consent and that has legal authority to bind your employer or such other person or entity if you are entering in this Agreement on their behalf.
**“Meta”** or **“we”** means Meta Platforms Ireland Limited (if you are located in or, if you are an entity, your principal place of business is in the EEA or Switzerland) or Meta Platforms, Inc. (if you are located outside of the EEA or Switzerland).
**“Sanctions”** means any economic or trade sanctions or restrictions administered or enforced by the United States (including the Office of Foreign Assets Control of the U.S. Department of the Treasury (“OFAC”), the U.S. Department of State and the U.S. Department of Commerce), the United Nations, the European Union, or the United Kingdom.
**“Trade Controls”** means any of the following: Sanctions and applicable export and import controls.
By clicking “I Accept” below or by using or distributing any portion or element of the DINO Materials, you agree to be bound by this Agreement.
## 1. License Rights and Redistribution.
a. <ins>Grant of Rights</ins>. You are granted a non-exclusive, worldwide, non-transferable and royalty-free limited license under Meta’s intellectual property or other rights owned by Meta embodied in the DINO Materials to use, reproduce, distribute, copy, create derivative works of, and make modifications to the DINO Materials.
b. <ins>Redistribution and Use</ins>.
i. Distribution of DINO Materials, and any derivative works thereof, are subject to the terms of this Agreement. If you distribute or make the DINO Materials, or any derivative works thereof, available to a third party, you may only do so under the terms of this Agreement and you shall provide a copy of this Agreement with any such DINO Materials.
ii. If you submit for publication the results of research you perform on, using, or otherwise in connection with DINO Materials, you must acknowledge the use of DINO Materials in your publication.
iii. Your use of the DINO Materials must comply with applicable laws and regulations, including Trade Control Laws and applicable privacy and data protection laws.
iv. Your use of the DINO Materials will not involve or encourage others to reverse engineer, decompile or discover the underlying components of the DINO Materials.
v. You are not the target of Trade Controls and your use of DINO Materials must comply with Trade Controls. You agree not to use, or permit others to use, DINO Materials for any activities subject to the International Traffic in Arms Regulations (ITAR) or end uses prohibited by Trade Controls, including those related to military or warfare purposes, nuclear industries or applications, espionage, or the development or use of guns or illegal weapons.
## 2. User Support.
Your use of the DINO Materials is done at your own discretion; Meta does not process any information nor provide any service in relation to such use. Meta is under no obligation to provide any support services for the DINO Materials. Any support provided is “as is”, “with all faults”, and without warranty of any kind.
## 3. Disclaimer of Warranty.
UNLESS REQUIRED BY APPLICABLE LAW, THE DINO MATERIALS AND ANY OUTPUT AND RESULTS THEREFROM ARE PROVIDED ON AN “AS IS” BASIS, WITHOUT WARRANTIES OF ANY KIND, AND META DISCLAIMS ALL WARRANTIES OF ANY KIND, BOTH EXPRESS AND IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. YOU ARE SOLELY RESPONSIBLE FOR DETERMINING THE APPROPRIATENESS OF USING OR REDISTRIBUTING THE DINO MATERIALS AND ASSUME ANY RISKS ASSOCIATED WITH YOUR USE OF THE DINO MATERIALS AND ANY OUTPUT AND RESULTS.
## 4. Limitation of Liability.
IN NO EVENT WILL META OR ITS AFFILIATES BE LIABLE UNDER ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, TORT, NEGLIGENCE, PRODUCTS LIABILITY, OR OTHERWISE, ARISING OUT OF THIS AGREEMENT, FOR ANY LOST PROFITS OR ANY DIRECT OR INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL, EXEMPLARY OR PUNITIVE DAMAGES, EVEN IF META OR ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF ANY OF THE FOREGOING.
## 5. Intellectual Property.
a. Subject to Meta’s ownership of DINO Materials and derivatives made by or for Meta, with respect to any derivative works and modifications of the DINO Materials that are made by you, as between you and Meta, you are and will be the owner of such derivative works and modifications.
b. If you institute litigation or other proceedings against Meta or any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the DINO Materials, outputs or results, or any portion of any of the foregoing, constitutes infringement of intellectual property or other rights owned or licensable by you, then any licenses granted to you under this Agreement shall terminate as of the date such litigation or claim is filed or instituted. You will indemnify and hold harmless Meta from and against any claim by any third party arising out of or related to your use or distribution of the DINO Materials.
## 6. Term and Termination.
The term of this Agreement will commence upon your acceptance of this Agreement or access to the DINO Materials and will continue in full force and effect until terminated in accordance with the terms and conditions herein. Meta may terminate this Agreement if you are in breach of any term or condition of this Agreement. Upon termination of this Agreement, you shall delete and cease use of the DINO Materials. Sections 3, 4 and 7 shall survive the termination of this Agreement.
## 7. Governing Law and Jurisdiction.
This Agreement will be governed and construed under the laws of the State of California without regard to choice of law principles, and the UN Convention on Contracts for the International Sale of Goods does not apply to this Agreement. The courts of California shall have exclusive jurisdiction of any dispute arising out of this Agreement.
## 8. Modifications and Amendments.
Meta may modify this Agreement from time to time; provided that they are similar in spirit to the current version of the Agreement, but may differ in detail to address new problems or concerns. All such changes will be effective immediately. Your continued use of the DINO Materials after any modification to this Agreement constitutes your agreement to such modification. Except as provided in this Agreement, no modification or addition to any provision of this Agreement will be binding unless it is in writing and signed by an authorized representative of both you and Meta.1234567891011121314151617181920212223242526272829303132333435363738394041424344454647# Licenses and notices
RC1 contains files under three different licenses. Check which one applies tothe file you use.
| Files | License | License text || --- | --- | --- || Source code (`*.py`), documentation and other repository files, except those listed below | MIT | [LICENSE](LICENSE) || `weights/grid9.onnx` | MIT for RC1's fine-tuning, plus Apache-2.0 for the pretrained backbone it was fine-tuned from | [LICENSE](LICENSE), [LICENSE-APACHE-2.0.txt](LICENSE-APACHE-2.0.txt) || `weights/grid16.onnx` | DINOv3 License | [LICENSE-DINOv3.md](LICENSE-DINOv3.md) || Third-party imagery in `assets/demo.webp` | Excluded from RC1’s license grants | — |
## `weights/grid16.onnx`: built with DINOv3
`weights/grid16.onnx` is a fine-tuned derivative of[`timm/convnext_tiny.dinov3_lvd1689m`](https://huggingface.co/timm/convnext_tiny.dinov3_lvd1689m),which is a DINOv3 model released by Meta. Under the DINOv3 License, it isdistributed **only under the terms of the DINOv3 License**, not the MITLicense. A copy of that license is in [LICENSE-DINOv3.md](LICENSE-DINOv3.md).
If you use or redistribute `grid16.onnx`, the DINOv3 License applies to you.Among other terms, it requires that you:
- Include a copy of the DINOv3 License with anything you distribute.- Acknowledge the use of DINOv3 in any research publications.- Comply with applicable laws, including trade controls, and not use it for the prohibited end uses listed in the license.
The bullets above are a summary; the license text is what governs.
DINOv3 is licensed under the DINOv3 License, Copyright © Meta Platforms, Inc.All Rights Reserved.
## `weights/grid9.onnx`: MobileNetV4 backbone
`weights/grid9.onnx` is fine-tuned from[`timm/mobilenetv4_conv_medium.e250_r384_in12k_ft_in1k`](https://huggingface.co/timm/mobilenetv4_conv_medium.e250_r384_in12k_ft_in1k),a MobileNetV4 checkpoint trained and published by the[timm](https://github.com/huggingface/pytorch-image-models) project under theApache License 2.0. A copy of that license is in[LICENSE-APACHE-2.0.txt](LICENSE-APACHE-2.0.txt). RC1 modified the weights byfine-tuning them for reCAPTCHA v2 grid cells and replacing the classifier head.
## Training data
None of these licenses cover the source images in the training dataset,[recaptcha-67k](https://huggingface.co/datasets/bxding/recaptcha-67k).123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166---license: otherlicense_name: mit-apache-2.0-dinov3license_link: https://huggingface.co/bxding/RC1/blob/main/NOTICE.mdlibrary_name: onnxpipeline_tag: image-classificationbase_model: - timm/mobilenetv4_conv_medium.e250_r384_in12k_ft_in1k - timm/convnext_tiny.dinov3_lvd1689mdatasets: - bxding/recaptcha-67ktags: - computer-vision - image-classification - onnx---
# recaptcha-classifier (RC1)
RC1 is a pair of small, fast image recognition models that select the matchingcells in reCAPTCHA v2 image grids. The 3×3 model classifies each of the ninecells separately, while the 4×4 model processes the whole grid at once. Bothrun locally on a CPU with ONNX Runtime. On my $2 VPS, the 3×3 model processesabout **9 grids per second** using two CPU threads.

*Inference in this demo ran on my $2 VPS. The left window shows a 4×4 grid andthe right window shows a 3×3 grid.*
## Models
| Model | Backbone | Input | Supported targets || --- | --- | --- | --- || `grid9.onnx` | MobileNetV4 (`mobilenetv4_conv_medium.e250_r384_in12k_ft_in1k`) | Nine cells from a 3×3 grid, each resized to 224×224 | bicycle, bus, car, crosswalk, fire hydrant, motorcycle\*, parking meter\*, stairs\*, traffic light\* || `grid16.onnx` | ConvNeXt Tiny (`convnext_tiny.dinov3_lvd1689m`) | One 4×4 grid image, resized to 448×448 | bicycle, bus, chimney\*, crosswalk, fire hydrant, motorcycle, parking meter\*, stairs, taxi\*, tractor, traffic light |
`grid16.onnx` is built with DINOv3 and is distributed under the[DINOv3 License](LICENSE-DINOv3.md), not the MIT License. See [License](#license).
\* These targets are rare. Across all splits, the 3×3 dataset has 14 gridsfor motorcycle, 7 for traffic light, 2 for parking meter, and 1 for stairs.The 4×4 dataset has 7 grids for parking meter, 13 for chimney, and 108 for taxi.
Each model outputs a probability for every cell. The inference script selectsthe cells at or above one tuned threshold per model: 0.475 for `grid9.onnx`and 0.45 for `grid16.onnx`. The threshold is stored in the model file.
## Evaluation
Accuracy of the released ONNX models on[recaptcha-67k](https://huggingface.co/datasets/bxding/recaptcha-67k).*Exact* means every cell prediction matched the reference label.
| Model | Split | Grids | Exact | Cell precision | Cell recall | Cell F1 || --- | --- | ---: | ---: | ---: | ---: | ---: || `grid9.onnx` | `review` | 300 | 81.0% | 0.978 | 0.948 | 0.963 || `grid9.onnx` | `test` (random 600) | 600 | 82.5% | 0.976 | 0.958 | 0.967 || `grid16.onnx` | `review` | 282 | 63.5% | 0.915 | 0.939 | 0.927 || `grid16.onnx` | `test` (random 600) | 600 | 65.7% | 0.944 | 0.948 | 0.946 |
These numbers measure agreement with model-generated labels, not livechallenge pass rates:
- The `test` labels come from the same labelers RC1 was trained on: Qwen for 3×3 and SAM 3 for 4×4.- The `review` labels were checked by Claude Opus 5.5, not by humans.- The original machine labels exactly matched Claude’s review on 81.3% of 3×3 grids and 70.6% of 4×4 grids.
Among 4×4 targets with at least 10 reviewed grids, exact agreement was lowestfor stairs (10/18), traffic lights (29/48), and motorcycles (52/86).
## Running inference
Requires Python 3.11 or newer. From this directory, install the dependenciesand run the prediction script:
```shpython -m pip install onnxruntime numpy pillowpython predict_onnx.py --model weights/grid16.onnx --image challenge.jpg --target buses```
Use `weights/grid9.onnx` for 3×3 grids and `weights/grid16.onnx` for 4×4 grids.
The script prints JSON with a probability for each cell and a `selected_cells`list. Cells are numbered from 0, left to right and then top to bottom.
To limit the number of CPU threads, pass `--threads`. For all options, run`python predict_onnx.py --help`.
## Benchmarks
Approximate CPU throughput once the model is loaded. Times include imageloading and preprocessing.
| Machine | CPU threads | 3×3 grids/sec | 4×4 grids/sec || --- | ---: | ---: | ---: || Apple M2 Pro | 4 | ~10 | ~7 || $2 VPS | 2 | ~9 | ~4 |
## Training and export
Training requires Python 3.11, [uv](https://docs.astral.sh/uv/), and a localcopy of the recaptcha-67k dataset. From this directory:
```sh# Install dependenciesuv sync --locked
# Prepare the datasetuv run python train.py prepare --data /path/to/recaptcha-67k --output runs/rc
# Train the 3×3 and 4×4 modelsuv run python train.py train --manifest runs/rc/split.json --output runs/rc --tiles 9uv run python train.py train --manifest runs/rc/split.json --output runs/rc --tiles 16 --backbone convnext_tiny.dinov3_lvd1689m
# Export to ONNXuv run --group export python train.py export --checkpoint runs/rc/grid9/best.pt
# Run testsuv run --group export python -m unittest test_training```
Notes:
- Training uses a GPU if one is available. On CUDA, add `--amp` to reduce memory usage.- The `prepare` step keeps the dataset's existing splits and leaves out the `excluded` split.- All training outputs are written locally to `runs/`.- For dataset and training options, run `python train.py --help` or add `--help` to any subcommand.
## Roadmap
- Improve 4×4 accuracy, which trails both the 3×3 model and the SAM 3 labels it was trained on.- Improve chimney and parking meter recognition with more training data.- Add training data and model support for bridges.
## Disclaimer
RC1 was created for educational and research purposes. It is not affiliatedwith or endorsed by Google or reCAPTCHA. Users are responsible for complyingwith all applicable laws and terms of service.
## License
RC1's files are under three licenses. [NOTICE.md](NOTICE.md) has the details.
| Files | License || --- | --- || Source code and documentation | [MIT](LICENSE) || `weights/grid9.onnx` | [MIT](LICENSE), plus [Apache-2.0](LICENSE-APACHE-2.0.txt) for its pretrained [MobileNetV4 backbone](https://huggingface.co/timm/mobilenetv4_conv_medium.e250_r384_in12k_ft_in1k) || `weights/grid16.onnx` | [DINOv3 License](LICENSE-DINOv3.md) only |
`grid16.onnx` is fine-tuned from Meta's[DINOv3 ConvNeXt Tiny](https://huggingface.co/timm/convnext_tiny.dinov3_lvd1689m)(built with DINOv3). The DINOv3 License requires derivatives to be distributedunder its own terms, so the MIT License does not apply to this file. Anyone whouses or redistributes it must follow the DINOv3 License, including its tradecontrol and use restrictions.
Third-party imagery in the training dataset and demo is outside the scope ofthese licenses.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648"""Validate examples, group duplicates, and load target-specific labels."""
import hashlibimport jsonimport osimport randomimport refrom collections import Counter, defaultdictfrom functools import partialfrom multiprocessing import Poolfrom pathlib import Path
import torchfrom PIL import Imagefrom torch.utils.data import Datasetfrom torchvision import transforms as T
from targets import ALIASES, BACKGROUND, target_name # noqa: F401 (re-exported)
def read_rgb(path): with Image.open(path) as image: return image.convert("RGB")
def pixel_hash(path): image = read_rgb(path) return hashlib.sha256(str(image.size).encode() + image.tobytes()).hexdigest()
def average_hash(path): """Survives rescaling and pixel noise, so noisy copies of a tile group together.""" with Image.open(path) as image: return _average_hash(image)
def _average_hash(image): pixels = image.convert("L").resize((8, 8), Image.Resampling.BOX).tobytes() mean = sum(pixels) / 64 return "a" + format(int("".join("1" if v > mean else "0" for v in pixels), 2), "016x")
GRID_SIZES = {"3x3": 9, "4x4": 16}IMAGE_NAMES = ("image.jpg", "image.jpeg", "image.png", "image.webp")
def grid_boxes(width, height, tiles): """Cell boxes, left to right then top to bottom, with edges rounded like the labeling tools.""" n = int(tiles**0.5) xs = [round(width * i / n) for i in range(n + 1)] ys = [round(height * i / n) for i in range(n + 1)] return [(xs[c], ys[r], xs[c + 1], ys[r + 1]) for r in range(n) for c in range(n)]
def image_hash(image): return hashlib.sha256(str(image.size).encode() + image.tobytes()).hexdigest()
def record_image_path(root, record): """Locate a full image from either a published dataset or a legacy manifest.""" if "image_path" in record: return Path(root) / record["image_path"] return Path(root) / record["id"] / record.get("image", "full_images.png")
def prepare_jsonl(root, output): """Import the published dataset's existing splits without reshuffling them.""" root = Path(root).resolve() data = root / "data" if (root / "data" / "3x3").is_dir() else root records, counts = [], Counter() for grid, tiles in GRID_SIZES.items(): for split in ("train", "validation", "test", "review", "excluded"): metadata = data / grid / split / "metadata.jsonl" if not metadata.is_file(): raise ValueError(f"Missing dataset metadata: {metadata}") with metadata.open() as source: for line_number, line in enumerate(source, 1): try: row = json.loads(line) if row["grid"] != grid or not isinstance(row["target"], str): raise ValueError("invalid grid or target") answers, uncertain = row["correct_answers"], row["uncertain_cells"] if any(not isinstance(x, list) for x in (answers, uncertain)) or any( type(i) is not int or not 0 <= i < tiles for i in answers + uncertain ): raise ValueError("invalid cell indices") path = (metadata.parent / row["file_name"]).resolve() if not path.is_relative_to(metadata.parent.resolve()) or not path.is_file(): raise ValueError("invalid or missing image") counts[split] += 1 if split == "excluded": continue record = { "id": row["id"], "tiles": tiles, "target": target_name(row["target"]), "answers": sorted(set(answers)), "uncertain": sorted(set(uncertain)), "image_path": str(path.relative_to(data)), "tile_files": False, "label_source": row.get("label_source"), "split": "val" if split == "validation" else split, } if split == "review" and isinstance(row.get("machine_answers"), list): record["labeler_answers"] = row["machine_answers"] records.append(record) except (KeyError, TypeError, ValueError, json.JSONDecodeError) as exc: raise ValueError(f"Invalid record in {metadata}:{line_number}: {exc}") from exc if not records: raise ValueError(f"No labeled examples in {data}") manifest = {"root": str(data), "records": records} output = Path(output) output.mkdir(parents=True, exist_ok=True) (output / "split.json").write_text(json.dumps(manifest, indent=2) + "\n") summary = {"splits": dict(counts), "uncertain_cells": sum(len(r["uncertain"]) for r in records)} (output / "data_summary.json").write_text(json.dumps(summary, indent=2) + "\n") return manifest, summary
def _scan_labeled(directory, sam=False): """One <item>/{image.jpg, metadata.json} folder: (record, None) or (None, reason). With sam, 4x4 answers come from <item>/sam.json instead.""" try: info = json.loads((directory / "metadata.json").read_text()) except (OSError, json.JSONDecodeError): return None, "unreadable metadata.json" if not isinstance(info, dict): return None, "invalid metadata.json" if not isinstance(info.get("target"), str) or not info["target"].strip(): return None, "invalid target" n = GRID_SIZES.get(str(info.get("grid", "")).lower()) if n is None: return None, "unknown grid" if sam and n == 16: try: label = json.loads((directory / "sam.json").read_text()) except (OSError, json.JSONDecodeError): return None, "no sam.json" if not isinstance(label, dict) or not {"correct_answers", "model"} <= label.keys(): return None, "invalid sam.json" # SAM gives no uncertain cells; its cutoffs were tuned on reference grids. info = { **info, "correct_answers": label["correct_answers"], "uncertain_cells": [], "label_source": f"{label['model']}:sam", } if "correct_answers" not in info: return None, "not labeled" answers, uncertain = info["correct_answers"], info.get("uncertain_cells", []) if ( not isinstance(answers, list) or not isinstance(uncertain, list) or any(type(i) is not int or not 0 <= i < n for i in answers + uncertain) ): return None, "invalid answers" path = next((directory / name for name in IMAGE_NAMES if (directory / name).exists()), None) if path is None: return None, "no image" try: image = read_rgb(path) except OSError: return None, "unreadable image" hashes = [image_hash(image)] if n == 9: # Separate photos get reused across grids; hashing each keeps reused photos in one split. hashes += [image_hash(image.crop(box)) for box in grid_boxes(*image.size, n)] return { "id": directory.name, "tiles": n, "target": target_name(info["target"]), "answers": sorted(set(answers)), "uncertain": sorted(set(uncertain)), "image": path.name, "tile_files": False, "label_source": info.get("label_source"), "hashes": hashes, }, None
def scan(root, workers=8, sam=False): """Answer-key folders (info.json + full_images.png + tile_N.png) and labeled <item>/{image.jpg, metadata.json} folders. Returns (records, {skip reason: count}).""" if workers < 1: raise ValueError("Scanning workers must be positive") directories = sorted( p for p in Path(root).iterdir() if p.is_dir() and not p.name.startswith(".") ) labeled = [d for d in directories if not (d / "info.json").exists()] records, skipped = [], Counter() if labeled: with Pool(workers) as pool: for record, reason in pool.imap(partial(_scan_labeled, sam=sam), labeled, chunksize=64): if record: records.append(record) else: skipped[reason] += 1 for directory in directories: if not (directory / "info.json").exists(): continue info = json.loads((directory / "info.json").read_text()) indices = sorted(int(p.stem.split("_")[1]) for p in directory.glob("tile_*.png")) n = len(indices) if n not in (9, 16) or indices != list(range(n)): raise ValueError(f"Invalid tiles: {directory}") answers = info["correct_answers"] if ( not isinstance(answers, list) or any(type(i) is not int or not 0 <= i < n for i in answers) or len(set(answers)) != len(answers) ): raise ValueError(f"Invalid answers: {directory}") paths = [directory / "full_images.png"] + [directory / f"tile_{i}.png" for i in range(n)] records.append( { "id": directory.name, "tiles": n, "target": target_name(info["keyword"]), "answers": sorted(answers), "hashes": [pixel_hash(p) for p in paths], } ) if not records: raise ValueError(f"No labeled examples in {root} ({dict(skipped)})") records.sort(key=lambda r: r["id"]) return records, dict(skipped)
def split_records(records, seed, holdouts=("val", "test"), review=()): """Records whose id is in review go to a "review" split; unreviewed records sharing an image or tile with them get split "dropped" so nothing they show leaks into training.""" # Connected components prevent leakage even when only one tile is repeated. review = set(review) parent = list(range(len(records)))
def find(i): while parent[i] != i: parent[i] = parent[parent[i]] i = parent[i] return i
seen = {} for i, record in enumerate(records): for digest in record["hashes"]: if digest in seen: parent[find(i)] = find(seen[digest]) seen[digest] = i groups = defaultdict(list) for i, record in enumerate(records): groups[find(i)].append(record) strata = defaultdict(list) for group in groups.values(): if review and any(r.get("id") in review for r in group): for record in group: record["split"] = "review" if record.get("id") in review else "dropped" continue strata[tuple(sorted({(r["tiles"], r["target"]) for r in group}))].append(group) rng = random.Random(seed) for key in sorted(strata): items = strata[key] rng.shuffle(items) # Fewer than three independent examples cannot support three splits. holdout = max(1, round(len(items) * 0.1)) if len(items) >= len(holdouts) + 1 else 0 for i, group in enumerate(items): split = holdouts[i // holdout] if i < holdout * len(holdouts) else "train" for record in group: record["split"] = split return records
def prepare(root, output, seed=42, workers=8, sam=False, review_keys=()): """review_keys: reference answer files ({"items": {id: {"answers": [...]}}}). Those grids get the reviewed answers and their own "review" split, never used for training or selection.""" output = Path(output) output.mkdir(parents=True, exist_ok=True) records, skipped = scan(root, workers, sam) review = {} for path in review_keys: review.update(json.loads(Path(path).read_text())["items"]) for record in records: if record["id"] in review: # Keep the machine label so evaluation can score the labeler on the same grids. record.update( labeler_answers=record["answers"], answers=review[record["id"]]["answers"], uncertain=[], label_source="review", ) # Quarantine contradictory answer keys without changing source files. duplicates = defaultdict(list) for record in records: if record["id"] in review: continue key = (record["hashes"][0], record["target"], record["tiles"]) duplicates[key].append(record) excluded = [ r for group in duplicates.values() if len({tuple(r["answers"]) for r in group}) > 1 for r in group ] excluded_ids = {r["id"] for r in excluded} records = split_records( [r for r in records if r["id"] not in excluded_ids], seed, review=review ) dropped = sum(r["split"] == "dropped" for r in records) records = [r for r in records if r["split"] != "dropped"] manifest = { "seed": seed, "root": str(Path(root).resolve()), "records": records, "excluded_conflicting_labels": excluded, } (output / "label_conflicts.json").write_text(json.dumps(excluded, indent=2) + "\n") (output / "split.json").write_text(json.dumps(manifest, indent=2) + "\n") counts = {} for n in (9, 16): counts[str(n)] = { target: dict( Counter(r["split"] for r in records if r["tiles"] == n and r["target"] == target) ) for target in sorted({r["target"] for r in records if r["tiles"] == n}) } counts["skipped"] = skipped counts["excluded_conflicting_labels"] = len(excluded) counts["dropped_sharing_images_with_review"] = dropped counts["uncertain_cells"] = sum(len(r.get("uncertain", [])) for r in records) (output / "data_summary.json").write_text(json.dumps(counts, indent=2) + "\n") return manifest, counts
def _file_hashes(path): with Image.open(path) as image: width, height = image.size thumbnail = image.convert("L").resize((32, 32), Image.Resampling.BOX).tobytes() return str(path), pixel_hash(path), average_hash(path), max(width, height), thumbnail
def _held_out_hashes(item): root, record = item directory = root / record["id"] image = read_rgb(record_image_path(root, record)) pictures = [image] if record.get("tile_files", True): pictures.extend(read_rgb(directory / f"tile_{i}.png") for i in range(record["tiles"])) else: pictures.extend(image.crop(box) for box in grid_boxes(*image.size, record["tiles"])) return [ ( _average_hash(picture), picture.convert("L").resize((32, 32), Image.Resampling.BOX).tobytes(), ) for picture in pictures ]
def same_picture(a, b, tolerance=12): """Average hashes collide for similar layouts; confirm with a 32x32 mean absolute difference.""" return sum(abs(x - y) for x, y in zip(a, b)) / len(a) < tolerance
IMAGE_SUFFIXES = (".png", ".jpg", ".jpeg", ".webp")# One YOLO box: class id, then centre x/y and width/height with six decimals. Some files# lost their line breaks, gluing the next class id onto the previous number.BOX = re.compile(r"(\d+)\s*(\d\.\d{6})\s+(\d\.\d{6})\s+(\d\.\d{6})\s+(\d\.\d{6})")
def label_file(path): """YOLO layout: <root>/images/<Class>/x.png pairs with <root>/labels/<Class>/x.txt.""" parts = path.parts if "images" not in parts: return None i = len(parts) - 1 - parts[::-1].index("images") candidate = Path(*parts[:i], "labels", *parts[i + 1 :]).with_suffix(".txt") return candidate if candidate.exists() else None
def box_classes(path): return sorted({int(match[0]) for match in BOX.findall(path.read_text())})
def scan_folders(roots): """Images labeled by their parent folder; <split>/ and images/ levels are ignored.
YOLO class ids are mapped to the folder where each id appears most often, so boxes for other classes add those targets to an image. """ paths, labels, boxes = [], [], [] for root in roots: for path in sorted(Path(root).rglob("*")): if path.suffix.lower() in IMAGE_SUFFIXES and not path.name.startswith("."): paths.append(path) labels.append(target_name(path.parent.name)) label = label_file(path) boxes.append(box_classes(label) if label else []) votes = defaultdict(Counter) for label, ids in zip(labels, boxes): for i in ids: votes[i][label] += 1 id_names = {i: counts.most_common(1)[0][0] for i, counts in votes.items()} targets = [sorted({label, *(id_names[i] for i in ids)}) for label, ids in zip(labels, boxes)] return paths, targets, {str(i): name for i, name in sorted(id_names.items())}
def prepare_folders(roots, old_manifest, output, seed=42, workers=8): """Merge exact copies, group near-copies, and re-split one or more class-folder datasets.
The folders' own train/val divisions are ignored because many images appear in both. Images resembling held-out grids of the old dataset are dropped. """ roots = [Path(r).resolve() for r in ([roots] if isinstance(roots, (str, Path)) else roots)] base = Path(os.path.commonpath(roots)) if len(roots) > 1 else roots[0] output = Path(output) output.mkdir(parents=True, exist_ok=True) paths, path_targets, id_names = scan_folders(roots) old = json.loads(Path(old_manifest).read_text()) old_root = Path(old["root"]) held_out = [(old_root, record) for record in old["records"] if record["split"] != "train"] with Pool(workers) as pool: hashed = pool.map(_file_hashes, paths, chunksize=64) held_out_hashes = defaultdict(list) for pictures in pool.map(_held_out_hashes, held_out, chunksize=64): for ahash, thumbnail in pictures: held_out_hashes[ahash].append(thumbnail) by_pixels, thumbnails = {}, {} sources = Counter() for path, labels, (_, digest, ahash, side, thumbnail) in zip(paths, path_targets, hashed): thumbnails[digest] = thumbnail relative = path.relative_to(base) if digest not in by_pixels: sources[relative.parts[0] if len(roots) > 1 else roots[0].name] += 1 record = by_pixels.setdefault( digest, { "path": str(relative), "targets": [], "kind": "full" if side >= 400 else "tile", "tiles": "full" if side >= 400 else "tile", "hashes": [digest, ahash], }, ) record["targets"].extend(t for t in labels if t not in record["targets"]) records, leaked, conflicts = [], [], [] for record in by_pixels.values(): record["targets"].sort() if any( same_picture(thumbnails[record["hashes"][0]], other) for other in held_out_hashes.get(record["hashes"][1], []) ): leaked.append(record["path"]) else: if BACKGROUND in record["targets"] and len(record["targets"]) > 1: # Images moved out of "Other" into a target folder mostly do show that target. conflicts.append(record["path"]) record["targets"].remove(BACKGROUND) record["target"] = record["targets"][0] records.append(record) if not records: raise ValueError("No folder images remain after excluding held-out images") split_records(records, seed, holdouts=("val",)) for record in records: del record["target"], record["tiles"] summary = { "roots": [str(r) for r in roots], "files": len(paths), "unique_images": len(by_pixels), "unique_images_by_first_source": dict(sources), "yolo_class_ids": id_names, "exact_duplicates_merged": len(paths) - len(by_pixels), "multi_label_images": sum(len(r["targets"]) > 1 for r in records), "dropped_matching_old_heldout": len(leaked), "background_label_overridden_by_target": len(conflicts), "largest_near_duplicate_group": max(Counter(r["hashes"][1] for r in records).values()), "counts": { kind: { target: dict( Counter( r["split"] for r in records if r["kind"] == kind and target in r["targets"] ) ) for target in sorted({t for r in records for t in r["targets"]}) } for kind in ("tile", "full") }, } manifest = { "seed": seed, "root": str(base), "sources": [str(r) for r in roots], "old_manifest": str(Path(old_manifest).resolve()), "records": records, "dropped_matching_old_heldout": leaked, "background_label_overridden_by_target": conflicts, } (output / "folders.json").write_text(json.dumps(manifest, indent=2) + "\n") (output / "folders_summary.json").write_text(json.dumps(summary, indent=2) + "\n") return manifest, summary
class AddNoise: """Some real tiles carry heavy pixel noise."""
def __init__(self, probability=0.3, max_std=0.15): self.probability, self.max_std = probability, max_std
def __call__(self, image): if random.random() >= self.probability: return image return (image + torch.randn_like(image) * random.uniform(0.02, self.max_std)).clamp(0, 1)
def transform(size, training=False, noise=False): operations = [T.Resize((size, size), interpolation=T.InterpolationMode.BILINEAR)] if training: operations.append(T.ColorJitter(brightness=0.15, contrast=0.15, saturation=0.1)) operations.append(T.ToTensor()) if training and noise: operations.append(AddNoise()) return T.Compose(operations + [T.Normalize((0.485, 0.456, 0.406), (0.229, 0.224, 0.225))])
class GridDataset(Dataset): def __init__( self, root, records, classes, size, training=False, tiles=False, tile_grids=False, include_full_images=False, ): self.root = Path(root) self.records = records self.classes = classes self.transform = transform(size, training) self.tiles = tiles self.tile_grids = tile_grids self.items = [(r, i) for r in records for i in (range(r["tiles"]) if tiles else [None])] if include_full_images: if not tiles: raise ValueError("Whole-image classification examples require tile training") self.items += [(r, -1) for r in records if r["tiles"] == 16]
def __len__(self): return len(self.items)
def full_image(self, record): return read_rgb(record_image_path(self.root, record))
def tile_images(self, record, indices): if record.get("tile_files", True): return [read_rgb(self.root / record["id"] / f"tile_{i}.png") for i in indices] image = self.full_image(record) boxes = grid_boxes(*image.size, record["tiles"]) return [image.crop(boxes[i]) for i in indices]
def __getitem__(self, index): record, tile = self.items[index] label = torch.tensor([float(i in record["answers"]) for i in range(record["tiles"])]) if tile == -1: image = self.transform(self.full_image(record)) label = label.any().float() elif tile is not None: image = self.transform(self.tile_images(record, [tile])[0]) label = label[tile] elif record["tiles"] == 9 or self.tile_grids: image = torch.stack( [self.transform(t) for t in self.tile_images(record, range(record["tiles"]))] ) else: image = self.transform(self.full_image(record)) return image, self.classes.index(record["target"]), label
def supervision(classes, cells, target, cell_labels=None, any_label=None): """Labels and weights for (classes, cells) logits; zero weight means unknown.""" labels, weights = torch.zeros(len(classes), cells), torch.zeros(len(classes), cells) any_labels, any_weights = torch.zeros(len(classes)), torch.zeros(len(classes)) if cell_labels is not None: labels[target], weights[target] = cell_labels, 1 if any_label is not None: any_labels[target], any_weights[target] = any_label, 1 return labels, weights, any_labels, any_weights
class SupervisedGrids(Dataset): """Answer-key items in the per-class format: only the queried target is known. Cells listed as uncertain get zero weight unless keep_uncertain is set."""
def __init__(self, grids, cells, keep_uncertain=False, flip=False): self.grids, self.cells, self.keep_uncertain, self.flip = grids, cells, keep_uncertain, flip
def __len__(self): return len(self.grids)
def __getitem__(self, index): record, tile = self.grids.items[index] image, target, label = self.grids[index] if tile == -1: return (image, *supervision(self.grids.classes, self.cells, target, any_label=label)) uncertain = [] if self.keep_uncertain else record.get("uncertain", []) if self.flip and random.random() < 0.5: # Mirror left-right; a whole grid also mirrors its cell numbers. image = image.flip(-1) if tile is None: n = int(label.numel() ** 0.5) label = label.view(n, n).flip(-1).flatten() uncertain = [c - c % n + n - 1 - c % n for c in uncertain] labels, weights, any_labels, any_weights = supervision( self.grids.classes, self.cells, target, cell_labels=label ) if tile is not None: if tile in uncertain: weights.zero_() else: for cell in uncertain: weights[target, cell] = 0 return image, labels, weights, any_labels, any_weights
class FolderDataset(Dataset): """Single-label folder images: present for named targets, others assumed absent at low weight.
A folder label says the image contains that target. Another target may also be visible, so absence is only weakly supervised, except for background images, which contain none. """
def __init__(self, root, records, classes, size, cells=1, training=False, negative_weight=0.2): self.root = Path(root) self.records = records self.classes = classes self.cells = cells self.negative_weight = negative_weight self.transform = transform(size, training, noise=True)
def __len__(self): return len(self.records)
def __getitem__(self, index): record = self.records[index] image = self.transform(read_rgb(self.root / record["path"])) background = BACKGROUND in record["targets"] any_weights = torch.full((len(self.classes),), 1.0 if background else self.negative_weight) any_labels = torch.zeros(len(self.classes)) for target in record["targets"]: if target in self.classes: any_labels[self.classes.index(target)] = any_weights[self.classes.index(target)] = 1 empty = torch.zeros(len(self.classes), self.cells) return image, empty, empty.clone(), any_labels, any_weights12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364"""Small pretrained models for independent tiles and continuous grids."""
import timmfrom torch import nn
BACKBONE = "mobilenetv4_conv_medium.e250_r384_in12k_ft_in1k"
class GridModel(nn.Module): def __init__(self, tiles, classes, pretrained=True, backbone=BACKBONE): super().__init__() if tiles not in (9, 16): raise ValueError("Grid size must be 9 or 16 tiles") self.tiles = tiles if tiles == 9: self.backbone = timm.create_model(backbone, pretrained=pretrained) self.backbone.reset_classifier(0) channels = self.backbone.head_hidden_size self.head = nn.Linear(channels, classes) else: # The stride-16 stage: 448 px input gives a 28x28 map, 7x7 per cell. stage = ( timm.create_model(backbone, features_only=True).feature_info.reduction().index(16) ) self.backbone = timm.create_model( backbone, pretrained=pretrained, features_only=True, out_indices=(stage,) ) channels = self.backbone.feature_info.channels()[0] self.head = nn.Sequential( nn.Conv2d(channels, 128, 3, padding=1), nn.ReLU(), nn.Conv2d(128, classes, 1), # Max, not mean: any part of the target selects the cell. nn.AdaptiveMaxPool2d((4, 4)), )
def forward(self, images): features = self.backbone(images) return self.head(features if self.tiles == 9 else features[0])
def freeze_backbone(self, frozen): for parameter in self.backbone.parameters(): parameter.requires_grad_(not frozen)
def select_target(logits, targets): """Only the requested target is supervised; other targets are unknown.""" import torch
return logits[torch.arange(logits.shape[0], device=logits.device), targets]
def transfer_backbone(model, state): """Copy matching backbone weights, e.g. from a tile classifier into the 4x4 feature extractor.""" source = {k.removeprefix("backbone."): v for k, v in state.items() if k.startswith("backbone.")} target = model.backbone.state_dict() matched = {k: v for k, v in source.items() if k in target and target[k].shape == v.shape} missing = sorted(set(target) - set(matched)) if missing: raise ValueError( f"Backbone weights missing for {len(missing)} parameters, e.g. {missing[:3]}" ) model.backbone.load_state_dict(matched) return len(matched)123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596"""Predict with an exported ONNX model. Needs only onnxruntime, numpy, and Pillow (no PyTorch).
python predict_onnx.py --model weights/grid9.onnx --image challenge.png --target bicycles"""
import argparseimport jsonfrom pathlib import Path
import numpy as npimport onnxruntime as ortfrom PIL import Image
from targets import target_name
MEAN = np.array([0.485, 0.456, 0.406], dtype=np.float32)STD = np.array([0.229, 0.224, 0.225], dtype=np.float32)IMAGE_NAMES = ("image.jpg", "image.jpeg", "image.png", "image.webp")
def preprocess(image, size): """Matches torchvision Resize (bilinear, PIL), ToTensor and Normalize.""" image = image.convert("RGB").resize((size, size), Image.Resampling.BILINEAR) return ((np.asarray(image, dtype=np.float32) / 255 - MEAN) / STD).transpose(2, 0, 1)
class GridPredictor: def __init__(self, model, threads=None): if threads is not None and threads < 1: raise ValueError("CPU threads must be positive") options = ort.SessionOptions() if threads: options.intra_op_num_threads = threads self.session = ort.InferenceSession(str(model), options, providers=["CPUExecutionProvider"]) self.info = json.loads(self.session.get_modelmeta().custom_metadata_map["grid_vision"])
def inputs(self, source): """Model input for a challenge image, or a dataset item folder holding image.jpg.""" source, size, tiles = Path(source), self.info["size"], self.info["tiles"] if source.is_dir(): found = next((source / name for name in IMAGE_NAMES if (source / name).is_file()), None) if found is None: raise ValueError(f"No image in {source} (expected one of {IMAGE_NAMES})") source = found with Image.open(source) as opened: image = opened.convert("RGB") if tiles == 9: # Same rounding as training's grid_boxes. w, h = image.size xs, ys = [round(w * i / 3) for i in range(4)], [round(h * i / 3) for i in range(4)] return np.stack( [ preprocess(image.crop((xs[c], ys[r], xs[c + 1], ys[r + 1])), size) for r in range(3) for c in range(3) ] ) return preprocess(image, size)[None]
def probabilities(self, inputs): """Per-class probabilities, shaped (classes, cells).""" output = self.session.run(None, {self.session.get_inputs()[0].name: inputs})[0] return output.T if self.info["tiles"] == 9 else output[0]
def predict(self, source, target): name = target_name(target) if name not in self.info["classes"]: raise ValueError(f"Unknown target {name!r}; supported: {self.info['classes']}") probabilities = self.probabilities(self.inputs(source))[self.info["classes"].index(name)] cutoff = self.info["thresholds"].get(name, self.info["threshold"]) return { "target": name, "threshold": cutoff, "selected_cells": [int(i) for i in np.flatnonzero(probabilities >= cutoff)], "probabilities": probabilities.tolist(), }
def main(): parser = argparse.ArgumentParser( description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter ) parser.add_argument("--model", required=True) parser.add_argument("--image", required=True, help="Challenge image, or a dataset item folder") parser.add_argument("--target", required=True) parser.add_argument("--threads", type=int, help="CPU threads (default: onnxruntime's choice)") args = parser.parse_args() print( json.dumps( GridPredictor(args.model, args.threads).predict(args.image, args.target), indent=2 ) )
if __name__ == "__main__": main()123456789101112131415161718192021222324252627282930[project]name = "rc1"version = "0.1.0"description = "Image models for reCAPTCHA v2 grids"readme = "README.md"requires-python = ">=3.11,<3.12"dependencies = [ "torch==2.8.0", "torchvision==0.23.0", "timm==1.0.20", "huggingface-hub==0.34.4", "Pillow==11.3.0", "numpy==2.2.6",]
[tool.uv]package = false
[dependency-groups]export = [ "onnx>=1.23.2", "onnxruntime>=1.30.0",]
[tool.ruff]target-version = "py311"line-length = 100
[tool.ruff.lint]select = ["E4", "E7", "E9", "F", "I"]123456789101112131415161718192021222324252627282930313233"""Target names shared by training and torch-free inference."""
ALIASES = { "bicycles": "bicycle", "motorcycles": "motorcycle", "cars": "car", "bus": "bus", "buses": "bus", "crosswalks": "crosswalk", "a fire hydrant": "fire hydrant", "fire hydrants": "fire hydrant", "stairs": "stairs", "traffic lights": "traffic light", "bridges": "bridge", "tractors": "tractor", "taxis": "taxi", "hydrant": "fire hydrant", "stair": "stairs", "palm": "palm tree", "palm trees": "palm tree", "chimneys": "chimney", "parking meters": "parking meter", "mountains": "mountain", "mountains or hills": "mountain", "tlight": "traffic light",}# Folder images of this class contain none of the targets.BACKGROUND = "other"
def target_name(value): value = value.strip().lower() return ALIASES.get(value, value)123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610"""Small checks for mistakes that would invalidate training or evaluation."""
import jsonimport tempfileimport unittestfrom pathlib import Path
import torchfrom PIL import Image
from data import ( FolderDataset, GridDataset, SupervisedGrids, prepare, prepare_folders, prepare_jsonl, split_records, target_name, transform,)from models import GridModel, select_target, transfer_backbonefrom train import ( auxiliary_records, choose_threshold, grid_logits, metrics, partial_loss, thresholds_for,)
class TrainingTests(unittest.TestCase): def test_jsonl_dataset_preserves_splits_and_loads_images(self): with tempfile.TemporaryDirectory() as temporary: root = Path(temporary) / "dataset" for grid in ("3x3", "4x4"): for split in ("train", "validation", "test", "review", "excluded"): folder = root / "data" / grid / split (folder / "images").mkdir(parents=True) Image.new("RGB", (30, 30), "red").save(folder / "images" / "grid.jpg") row = {"id": f"{grid}-{split}", "grid": grid, "target": "buses", "file_name": "images/grid.jpg", "correct_answers": [0], "uncertain_cells": [1], "machine_answers": [2]} (folder / "metadata.jsonl").write_text(json.dumps(row) + "\n") manifest, summary = prepare_jsonl(root, Path(temporary) / "output") self.assertEqual(len(manifest["records"]), 8) self.assertEqual(summary["splits"]["excluded"], 2) record = next(r for r in manifest["records"] if r["id"] == "3x3-validation") self.assertEqual((record["split"], record["target"], record["uncertain"]), ("val", "bus", [1])) sample = GridDataset(manifest["root"], [record], ["bus"], 16)[0] self.assertEqual(tuple(sample[0].shape), (9, 3, 16, 16)) review = next(r for r in manifest["records"] if r["id"] == "4x4-review") self.assertEqual(review["labeler_answers"], [2])
def test_enlarged_views_apply_only_to_requested_targets(self): class MeanModel(torch.nn.Module): tiles = 9 crop_target_ids = [0]
def forward(self, images): mean = images.mean((1, 2, 3)) return torch.stack([mean, mean], dim=1)
images = torch.zeros(2, 1, 3, 8, 8) images[:, :, :, :4, :4] = 1 output = grid_logits(MeanModel(), images, torch.tensor([0, 1])) self.assertTrue(torch.equal(output, torch.tensor([[1.0], [0.25]])))
def test_auxiliary_training_and_validation_stay_separate(self): records = [ {"id": str(i), "tiles": 16, "target": "motorcycle", "split": split} for i, split in enumerate(["train", "val", "test"]) ] self.assertEqual( [r["id"] for r in auxiliary_records({"records": records}, ["motorcycle"], "train")], ["0"], ) self.assertEqual(auxiliary_records({"records": records}, ["bus"], "train"), [])
def test_auxiliary_crops_and_full_image_labels(self): with tempfile.TemporaryDirectory() as root: directory = Path(root) / "example" directory.mkdir() for name in ["full_images.png"] + [f"tile_{i}.png" for i in range(16)]: Image.new("RGB", (16, 16), "blue").save(directory / name) records = [{"id": "example", "tiles": 16, "target": "motorcycle", "answers": [0, 15]}] training = GridDataset( root, records, ["motorcycle"], 16, tiles=True, include_full_images=True ) self.assertEqual(len(training), 17) self.assertEqual([training[i][2].item() for i in [0, 1, 15, 16]], [1, 0, 1, 1]) validation = GridDataset(root, records, ["motorcycle"], 16, tile_grids=True) self.assertEqual(tuple(validation[0][0].shape), (16, 3, 16, 16)) self.assertEqual(validation[0][2].sum().item(), 2)
def test_per_target_cutoffs_and_legacy_checkpoint(self): checkpoint = { "classes": ["bus", "motorcycle"], "threshold": 0.5, "thresholds": {"motorcycle": 0.3}, } cutoffs = thresholds_for(checkpoint, torch.tensor([0, 1])) result = metrics(torch.tensor([[0.4], [0.4]]), torch.tensor([[False], [True]]), cutoffs) self.assertEqual(result["exact_grid_accuracy"], 1.0) checkpoint.pop("thresholds") self.assertTrue( torch.equal( thresholds_for(checkpoint, torch.tensor([0, 1])), torch.tensor([[0.5], [0.5]]) ) )
def test_conflicting_duplicates_are_excluded_without_editing_labels(self): with tempfile.TemporaryDirectory() as temporary: root = Path(temporary) / "dataset" for i in range(3): directory = root / str(i) directory.mkdir(parents=True) info = {"keyword": "buses", "correct_answers": [i]} (directory / "info.json").write_text(json.dumps(info)) Image.new("RGB", (30, 30), "red" if i < 2 else "blue").save( directory / "full_images.png" ) for tile in range(9): Image.new("RGB", (10, 10), (i * 70, tile * 20, 0)).save( directory / f"tile_{tile}.png" ) manifest, _ = prepare(root, Path(temporary) / "output") self.assertEqual([r["id"] for r in manifest["records"]], ["2"]) self.assertEqual(len(manifest["excluded_conflicting_labels"]), 2) self.assertEqual( json.loads((root / "0" / "info.json").read_text())["correct_answers"], [0] ) (root / "2" / "info.json").write_text( json.dumps({"keyword": "bus", "correct_answers": [9]}) ) with self.assertRaisesRegex(ValueError, "Invalid answers"): prepare(root, Path(temporary) / "output")
def test_transitive_duplicate_groups_never_leak(self): records = [ {"id": str(i), "tiles": 9, "target": "bus", "hashes": [str(i)]} for i in range(30) ] records[0]["hashes"].append("shared-a") records[1]["hashes"].extend(["shared-a", "shared-b"]) records[2]["hashes"].append("shared-b") split_records(records, 42) self.assertEqual(len({r["split"] for r in records[:3]}), 1) self.assertEqual({r["split"] for r in records}, {"train", "val", "test"}) before = [r["split"] for r in records] split_records(records, 42) self.assertEqual(before, [r["split"] for r in records])
def test_singleton_is_training_only(self): records = [{"tiles": 16, "target": "tractor", "hashes": ["x"]}] self.assertEqual(split_records(records, 42)[0]["split"], "train")
def test_aliases(self): self.assertEqual(target_name("buses"), target_name("bus")) self.assertEqual(target_name("a fire hydrant"), target_name("fire hydrants"))
def test_unknown_targets_have_no_gradient(self): logits = torch.zeros(2, 3, requires_grad=True) loss = torch.nn.functional.binary_cross_entropy_with_logits( select_target(logits, torch.tensor([0, 2])), torch.tensor([1.0, 0.0]) ) loss.backward() self.assertTrue( torch.equal( logits.grad != 0, torch.tensor([[True, False, False], [False, False, True]]) ) )
def test_exact_grid_requires_every_cell_correct(self): probabilities = torch.tensor([[0.9, 0.1], [0.9, 0.8]]) truth = torch.tensor([[True, False], [True, False]]) result = metrics(probabilities, truth, 0.5) self.assertEqual(result["exact_grid_accuracy"], 0.5) self.assertEqual(result["cell_accuracy"], 0.75) self.assertGreater(choose_threshold(probabilities, truth), 0.8)
def test_row_major_target_selection(self): logits = torch.arange(2 * 3 * 4 * 4).reshape(2, 3, 4, 4) selected = select_target(logits.flatten(2), torch.tensor([1, 2])) self.assertEqual(selected[0].tolist(), list(range(16, 32))) self.assertEqual(selected[1].tolist(), list(range(80, 96)))
def test_models_have_expected_shapes(self): torch.set_num_threads(2) with torch.no_grad(): for tiles, size in [(9, 224), (16, 384)]: model = GridModel(tiles, 3, pretrained=False).eval() shape = (1, 9, 3, size, size) if tiles == 9 else (1, 3, size, size) self.assertEqual( tuple(grid_logits(model, torch.zeros(shape), torch.tensor([1])).shape), (1, tiles), ) if tiles == 9: self.assertEqual( tuple( grid_logits( model, torch.zeros(1, 16, 3, size, size), torch.tensor([1]) ).shape ), (1, 16), )
class FolderDataTests(unittest.TestCase): def test_folder_names_map_to_targets(self): self.assertEqual(target_name("Hydrant"), "fire hydrant") self.assertEqual(target_name("Traffic Light"), "traffic light") self.assertEqual(target_name("Stair"), "stairs") self.assertEqual(target_name("Palm"), target_name("palm trees"))
def test_folders_merge_copies_group_near_copies_and_drop_old_heldout(self): with tempfile.TemporaryDirectory() as temporary: temporary = Path(temporary) old = temporary / "dataset" / "grid" old.mkdir(parents=True) held_out = Image.linear_gradient("L").convert("RGB").resize((64, 64)) for name in ["full_images.png"] + [f"tile_{i}.png" for i in range(9)]: held_out.save(old / name) (temporary / "split.json").write_text( json.dumps( { "root": str(temporary / "dataset"), "records": [{"id": "grid", "tiles": 9, "split": "test"}], } ) ) root = temporary / "folders" for split in ("train", "val"): for name in ("Bus", "Car", "Other"): (root / split / name).mkdir(parents=True) Image.new("RGB", (100, 100), "red").save(root / "train" / "Bus" / "a.png") Image.new("RGB", (100, 100), "red").save(root / "val" / "Bus" / "copy.png") Image.new("RGB", (100, 100), "red").save(root / "train" / "Car" / "also.png") held_out.resize((120, 120)).rotate(180).rotate(180).save( root / "train" / "Car" / "old.png" ) for i in range(20): image = Image.new("RGB", (100, 100), (0, 0, 0)) image.paste((255, 255, 255), (0, 0, 5 * (i + 1), 100)) image.save(root / "train" / "Car" / f"{i}.png") image.resize((101, 101)).save(root / "val" / "Car" / f"near{i}.png") Image.new("RGB", (450, 450), "blue").save(root / "train" / "Other" / "full.png") manifest, summary = prepare_folders( root, temporary / "split.json", temporary / "out", workers=2 ) self.assertEqual(summary["exact_duplicates_merged"], 2) self.assertEqual(manifest["dropped_matching_old_heldout"], ["train/Car/old.png"]) merged = [r for r in manifest["records"] if len(r["targets"]) > 1] self.assertEqual([r["targets"] for r in merged], [["bus", "car"]]) splits = {} for record in manifest["records"]: splits.setdefault(record["hashes"][1], set()).add(record["split"]) self.assertTrue(all(len(v) == 1 for v in splits.values())) self.assertEqual({r["split"] for r in manifest["records"]}, {"train", "val"}) self.assertEqual( [r["kind"] for r in manifest["records"] if r["targets"] == ["other"]], ["full"] )
def test_three_folder_layouts_and_glued_yolo_lines(self): with tempfile.TemporaryDirectory() as temporary: temporary = Path(temporary) (temporary / "split.json").write_text( json.dumps({"root": str(temporary), "records": []}) ) images = { "a/train/Bus/1.png": (10, 0, 0), "a/val/TLight/2.png": (0, 10, 0), "b/Stair/3.png": (0, 0, 10), "b/Bus/1.png": (10, 0, 0), "c/images/Chimney/4.png": (50, 0, 0), "c/images/Stair/5.png": (0, 50, 0), "c/images/Stair/6.png": (0, 0, 50), } for name, color in images.items(): (temporary / name).parent.mkdir(parents=True, exist_ok=True) Image.new("RGB", (100, 100), color).save(temporary / name) labels = temporary / "c" / "labels" (labels / "Chimney").mkdir(parents=True) (labels / "Stair").mkdir(parents=True) (labels / "Chimney" / "4.txt").write_text( "1 0.500000 0.500000 0.100000 0.1000002 0.300000 0.300000 0.200000 0.200000\n" ) (labels / "Stair" / "5.txt").write_text("2 0.500000 0.500000 0.100000 0.100000\n") (labels / "Stair" / "6.txt").write_text("2 0.400000 0.500000 0.100000 0.100000\n") manifest, summary = prepare_folders( [temporary / "a", temporary / "b", temporary / "c"], temporary / "split.json", temporary / "out", workers=2, ) targets = {r["path"]: r["targets"] for r in manifest["records"]} self.assertEqual(targets["a/val/TLight/2.png"], ["traffic light"]) self.assertEqual(targets["c/images/Chimney/4.png"], ["chimney", "stairs"]) self.assertEqual(targets["c/images/Stair/6.png"], ["stairs"]) self.assertEqual(summary["yolo_class_ids"], {"1": "chimney", "2": "stairs"}) self.assertEqual(summary["exact_duplicates_merged"], 1) self.assertEqual(summary["unique_images_by_first_source"], {"a": 2, "b": 1, "c": 3}) self.assertTrue(all((temporary / path).exists() for path in targets))
def test_folder_labels_are_weak_negatives_except_background(self): with tempfile.TemporaryDirectory() as root: Image.new("RGB", (8, 8)).save(Path(root) / "x.png") records = [ {"path": "x.png", "targets": ["bus"]}, {"path": "x.png", "targets": ["other"]}, ] dataset = FolderDataset(root, records, ["bus", "car"], 8, cells=16, negative_weight=0.2) _, _, cell_weights, labels, weights = dataset[0] self.assertEqual(labels.tolist(), [1, 0]) self.assertEqual([round(w, 3) for w in weights.tolist()], [1, 0.2]) self.assertEqual(cell_weights.sum().item(), 0) self.assertEqual(tuple(cell_weights.shape), (2, 16)) _, _, _, labels, weights = dataset[1] self.assertEqual((labels.tolist(), weights.tolist()), ([0, 0], [1, 1]))
def test_answer_key_items_supervise_only_the_queried_target(self): with tempfile.TemporaryDirectory() as root: directory = Path(root) / "example" directory.mkdir() for name in ["full_images.png"] + [f"tile_{i}.png" for i in range(16)]: Image.new("RGB", (16, 16), "blue").save(directory / name) records = [{"id": "example", "tiles": 16, "target": "car", "answers": [0, 15]}] grids = SupervisedGrids(GridDataset(root, records, ["bus", "car"], 16), 16) _, labels, weights, _, any_weights = grids[0] self.assertEqual(weights.sum(1).tolist(), [0, 16]) self.assertEqual(labels[1].nonzero().flatten().tolist(), [0, 15]) self.assertEqual(any_weights.sum().item(), 0) tiles = SupervisedGrids(GridDataset(root, records, ["bus", "car"], 16, tiles=True), 1) self.assertEqual( (tiles[15][1].tolist(), tiles[15][2].tolist()), ([[0], [1]], [[0], [1]]) )
def test_partial_loss_matches_old_loss_and_ignores_unknowns(self): logits = torch.randn(2, 3, 16, requires_grad=True) labels, weights = torch.zeros(2, 3, 16), torch.zeros(2, 3, 16) labels[0, 1, :4], weights[0, 1], weights[1, 2] = 1, 1, 1 zero = torch.zeros(2, 3) loss, count = partial_loss(logits, labels, weights, zero, zero) expected = torch.nn.functional.binary_cross_entropy_with_logits( select_target(logits, torch.tensor([1, 2])), labels[[0, 1], [1, 2]] ) self.assertTrue(torch.allclose(loss, expected)) self.assertEqual(count.item(), 32) loss.backward() self.assertTrue( torch.equal( (logits.grad != 0).any(-1), torch.tensor([[False, True, False], [False, False, True]]), ) )
def test_image_level_label_trains_only_the_strongest_cell(self): logits = torch.zeros(1, 2, 16) logits[0, 0, 5] = 2 logits.requires_grad_() empty = torch.zeros(1, 2, 16) loss, _ = partial_loss( logits, empty, empty, torch.tensor([[1.0, 0.0]]), torch.tensor([[1.0, 0.0]]) ) loss.backward() self.assertEqual(logits.grad.nonzero().tolist(), [[0, 0, 5]])
def test_tile_backbone_initializes_grid_model(self): tile_model, grid_model = ( GridModel(9, 3, pretrained=False), GridModel(16, 5, pretrained=False), ) transfer_backbone(grid_model, tile_model.state_dict()) for name, value in grid_model.backbone.state_dict().items(): self.assertTrue(torch.equal(value, tile_model.backbone.state_dict()[name]), name)
def test_torch_free_preprocessing_matches_training(self): try: from predict_onnx import preprocess except ImportError: self.skipTest("onnxruntime is not installed (uv sync --group export)") image = Image.effect_mandelbrot((97, 97), (-2, -1.5, 1, 1.5), 50).convert("RGB") expected = transform(64)(image).numpy() self.assertLess(abs(preprocess(image, 64) - expected).max(), 1e-5)
class LabeledLayoutTests(unittest.TestCase): def test_invalid_metadata_and_sam_files_are_skipped(self): from data import scan
with tempfile.TemporaryDirectory() as root: self.make(root, "valid", "3x3", [0]) self.make(root, "bad-target", "3x3", [0]) self.make(root, "bad-metadata", "3x3", [0]) self.make(root, "bad-sam", "4x4", [0]) (Path(root) / "bad-target" / "metadata.json").write_text( json.dumps({"target": None, "grid": "3x3", "correct_answers": [0]}) ) (Path(root) / "bad-metadata" / "metadata.json").write_text("[]") (Path(root) / "bad-sam" / "sam.json").write_text("{}") records, skipped = scan(root, workers=2, sam=True) self.assertEqual([record["id"] for record in records], ["valid"]) self.assertEqual( skipped, { "invalid target": 1, "invalid metadata.json": 1, "invalid sam.json": 1, }, )
def test_folder_preparation_excludes_tiles_from_labeled_holdouts(self): from data import grid_boxes, read_rgb, scan
with tempfile.TemporaryDirectory() as temporary: root = Path(temporary) data = root / "data" data.mkdir() self.make(data, "holdout", "3x3", [0]) records, _ = scan(data, workers=2) records[0]["split"] = "test" manifest = root / "split.json" manifest.write_text(json.dumps({"root": str(data), "records": records})) folder = root / "folders" / "bus" folder.mkdir(parents=True) image = read_rgb(data / "holdout" / "image.jpg") image.crop(grid_boxes(*image.size, 9)[0]).save(folder / "reused.png") Image.effect_mandelbrot((100, 100), (-2, -1.5, 1, 1.5), 50).save(folder / "new.png") prepared, summary = prepare_folders( root / "folders", manifest, root / "out", workers=2, ) self.assertEqual(summary["dropped_matching_old_heldout"], 1) self.assertEqual([record["path"] for record in prepared["records"]], ["bus/new.png"])
def make(self, root, name, grid, answers=None, uncertain=(), colors=None, size=300): folder = Path(root) / name folder.mkdir() n = 3 if grid == "3x3" else 4 image = Image.new("RGB", (size, size)) for i, color in enumerate(colors or [(i * 20, 0, 0) for i in range(n * n)]): r, c = divmod(i, n) image.paste( color, (c * size // n, r * size // n, (c + 1) * size // n, (r + 1) * size // n) ) image.save(folder / "image.jpg", quality=100) info = {"target": "buses", "grid": grid} if answers is not None: info.update(correct_answers=answers, uncertain_cells=list(uncertain)) (folder / "metadata.json").write_text(json.dumps(info))
def test_labeled_items_are_scanned_and_unlabeled_skipped(self): from data import scan
with tempfile.TemporaryDirectory() as root: self.make(root, "a", "3x3", [1, 4], [4]) self.make(root, "b", "4x4", [5], size=450) self.make(root, "c", "3x3") records, skipped = scan(root, workers=2) self.assertEqual( [(r["id"], r["tiles"], r["target"], r["answers"], r["uncertain"]) for r in records], [("a", 9, "bus", [1, 4], [4]), ("b", 16, "bus", [5], [])], ) self.assertEqual(skipped, {"not labeled": 1}) self.assertEqual(len(records[0]["hashes"]), 10)
def test_tiles_come_from_the_single_image_and_uncertain_cells_are_ignored(self): from data import scan
with tempfile.TemporaryDirectory() as root: colors = [(250, 0, 0), (0, 250, 0), (0, 0, 250)] + [(0, 0, 0)] * 6 self.make(root, "a", "3x3", [1], [2], colors=colors) self.make(root, "b", "4x4", [5, 6], [6], size=450) records, _ = scan(root, workers=2) tiles = GridDataset(root, [records[0]], ["bus"], 8, tiles=True) self.assertEqual(len(tiles), 9) self.assertGreater( tiles[1][0][1].mean().item(), tiles[1][0][0].mean().item() ) # green tile items = SupervisedGrids(tiles, 1) self.assertEqual(items[1][1].tolist(), [[1.0]]) self.assertEqual(items[2][2].sum().item(), 0) # uncertain tile: no weight self.assertEqual(items[0][2].sum().item(), 1) grid = SupervisedGrids(GridDataset(root, [records[1]], ["bus"], 32), 16) _, labels, weights, _, _ = grid[0] self.assertEqual(labels[0].nonzero().flatten().tolist(), [5, 6]) self.assertEqual(weights[0].tolist(), [1.0] * 6 + [0.0] + [1.0] * 9) kept = SupervisedGrids( GridDataset(root, [records[1]], ["bus"], 32), 16, keep_uncertain=True ) self.assertEqual(kept[0][2].sum().item(), 16)
def test_sam_labels_replace_4x4_answers_only(self): from data import scan
with tempfile.TemporaryDirectory() as root: self.make(root, "a", "3x3", [1, 4], [4]) self.make(root, "b", "4x4", [5], [6], size=450) self.make(root, "c", "4x4", size=450) # Qwen never labeled it; SAM did self.make(root, "d", "4x4", [2], size=450) # no sam.json for name, cells in (("b", [5, 6, 9]), ("c", [0])): (Path(root) / name / "sam.json").write_text( json.dumps({"model": "facebook/sam3", "correct_answers": cells}) ) records, skipped = scan(root, workers=2, sam=True) self.assertEqual( [(r["id"], r["answers"], r["uncertain"], r["label_source"]) for r in records], [ ("a", [1, 4], [4], None), ("b", [5, 6, 9], [], "facebook/sam3:sam"), ("c", [0], [], "facebook/sam3:sam"), ], ) self.assertEqual(skipped, {"no sam.json": 1}) records, _ = scan(root, workers=2) self.assertEqual([r["answers"] for r in records], [[1, 4], [5], [2]])
def test_reviewed_grids_are_held_out_with_their_reviewed_answers(self): from data import prepare
with tempfile.TemporaryDirectory() as root, tempfile.TemporaryDirectory() as out: for i in range(20): # g01 is a copy of the reviewed g00, so it must not reach training. j = 0 if i == 1 else i colors = [((j * 37 + k * 11) % 256, (k * 23) % 256, j % 256) for k in range(9)] self.make(root, f"g{i:02d}", "3x3", [0], colors=colors) key = Path(out) / "key.json" key.write_text(json.dumps({"items": {"g00": {"answers": [0, 8]}}})) manifest, counts = prepare(root, out, workers=2, review_keys=[key]) by_id = {r["id"]: r for r in manifest["records"]} self.assertEqual( (by_id["g00"]["split"], by_id["g00"]["answers"], by_id["g00"]["labeler_answers"]), ("review", [0, 8], [0]), ) self.assertNotIn("g01", by_id) self.assertEqual(counts["dropped_sharing_images_with_review"], 1) self.assertNotIn( "review", {r["split"] for r in manifest["records"] if r["id"] != "g00"} )
def test_flip_mirrors_4x4_cells_and_uncertain_cells(self): import random
from data import scan
with tempfile.TemporaryDirectory() as root: colors = [(250, 0, 0)] + [(0, 0, 0)] * 15 self.make(root, "b", "4x4", [0, 5], [1], colors=colors, size=448) records, _ = scan(root, workers=2) grids = GridDataset(root, records, ["bus"], 32) plain = SupervisedGrids(grids, 16)[0] seed = next( s for s in range(50) if random.Random(s).random() < 0.5 ) # a seed whose first draw flips random.seed(seed) flipped = SupervisedGrids(grids, 16, flip=True)[0] _, labels, weights, _, _ = flipped self.assertEqual(labels[0].nonzero().flatten().tolist(), [3, 6]) self.assertEqual( weights[0].tolist(), [1.0] * 2 + [0.0] + [1.0] * 13 ) # uncertain 1 -> 2 self.assertTrue(torch.equal(flipped[0], plain[0].flip(-1)))
def test_reused_tiles_keep_grids_in_one_split(self): from data import scan
with tempfile.TemporaryDirectory() as root: for i in range(40): colors = [((i * 37 + k * 11) % 256, (k * 23) % 256, i % 256) for k in range(9)] if i in (0, 1): colors[4] = (255, 255, 255) # the same photo reused in two grids self.make(root, f"g{i:02d}", "3x3", [0], colors=colors) records, _ = scan(root, workers=2) split_records(records, 42) self.assertEqual(records[0]["split"], records[1]["split"])
class LayoutTests(unittest.TestCase): def test_folder_metadata_takes_priority_over_image_size(self): from train import layout
with tempfile.TemporaryDirectory() as temporary: root = Path(temporary) Image.new("RGB", (300, 300)).save(root / "image.jpg") (root / "metadata.json").write_text(json.dumps({"grid": "4x4"})) self.assertEqual(layout(root), 16)
def test_layout_from_size_or_seams(self): from train import layout
with tempfile.TemporaryDirectory() as root: root = Path(root) Image.linear_gradient("L").convert("RGB").resize((300, 300)).save(root / "a.png") Image.linear_gradient("L").convert("RGB").resize((450, 450)).save(root / "b.png") tiles = Image.new("RGB", (600, 600)) for i in range(9): tiles.paste( (i * 28, 255 - i * 28, (i * 90) % 256), ((i % 3) * 200, (i // 3) * 200, (i % 3 + 1) * 200, (i // 3 + 1) * 200), ) tiles.save(root / "c.png") Image.linear_gradient("L").convert("RGB").resize((600, 600)).save(root / "d.png") self.assertEqual([layout(root / f"{n}.png") for n in "abcd"], [9, 16, 9, 16])
if __name__ == "__main__": unittest.main()1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108"""Prepare, train, evaluate, and predict. See README.md for commands."""
import argparseimport jsonimport osimport randomimport timefrom pathlib import Path
# Keep downloaded weights with the project, not in a global cache.os.environ.setdefault("HF_HOME", str(Path(".cache/huggingface").resolve()))
import numpy as npimport torchfrom torch import nnfrom torch.utils.data import ConcatDataset, DataLoader, RandomSampler, WeightedRandomSampler
from data import ( BACKGROUND, IMAGE_NAMES, FolderDataset, GridDataset, SupervisedGrids, grid_boxes, prepare, prepare_folders, prepare_jsonl, read_rgb, record_image_path, target_name, transform,)from models import BACKBONE, GridModel, select_target, transfer_backbone
def save_json(path, value): Path(path).write_text(json.dumps(value, indent=2) + "\n")
def device_for(name): if name == "auto": name = ( "cuda" if torch.cuda.is_available() else "mps" if torch.backends.mps.is_available() else "cpu" ) if name == "mps" and not torch.backends.mps.is_available(): raise RuntimeError( "MPS is unavailable. Run in a terminal with Apple GPU access; use --device cpu only intentionally." ) if name == "cuda" and not torch.cuda.is_available(): raise RuntimeError("CUDA is unavailable on this machine.") return torch.device(name)
def empty_cache(device): if device.type == "mps": torch.mps.empty_cache() elif device.type == "cuda": torch.cuda.empty_cache()
def seed_everything(seed): random.seed(seed) np.random.seed(seed) torch.manual_seed(seed) torch.set_num_threads(4)
def records_for(manifest, tiles, split): return [r for r in manifest["records"] if r["tiles"] == tiles and r["split"] == split]
def auxiliary_records(manifest, targets, split): return [r for r in records_for(manifest, 16, split) if r["target"] in targets]
def folder_records(folders, kind, split): return ( [r for r in folders["records"] if r["kind"] == kind and r["split"] == split] if folders else [] )
def cell_logits(model, images): """Logits shaped (batch, classes, cells); a separate tile is one cell.""" output = model(images) return output.unsqueeze(-1) if model.tiles == 9 else output.flatten(2)
def partial_loss(logits, labels, weights, any_labels, any_weights): """Weighted BCE on known cells, plus presence anywhere (max over cells) for image-level labels.""" cells = nn.functional.binary_cross_entropy_with_logits( logits, labels, weight=weights, reduction="sum" ) anywhere = nn.functional.binary_cross_entropy_with_logits( logits.amax(-1), any_labels, weight=any_weights, reduction="sum" ) total = weights.sum() + any_weights.sum() return (cells + anywhere) / total.clamp(min=1), total
@torch.inference_mode()def evaluate_folders(model, loader, device): model.eval() loss, total, probabilities, labels, weights = 0.0, 0.0, [], [], [] for images, *supervision in loader: supervision = [x.to(device) for x in supervision] logits = cell_logits(model, images.to(device)).float() batch_loss, batch_total = partial_loss(logits, *supervision) loss += batch_loss.item() * batch_total.item() total += batch_total.item() probabilities.append(logits.amax(-1).sigmoid().cpu()) labels.append(supervision[2].cpu()) weights.append(supervision[3].cpu()) return ( loss / max(total, 1), torch.cat(probabilities), torch.cat(labels).bool(), torch.cat(weights), )
def folder_report(probabilities, labels, weights, classes, threshold): """Single-label folder images: recall per class, and how often each class fires on other classes' images.""" predicted = probabilities >= threshold background = (weights == 1).all(1) & ~labels.any(1) report = { "threshold": threshold, "images": len(labels), "per_class": {}, "background_images": int(background.sum()), "background_any_selected": float(predicted[background].any(1).float().mean()) if background.any() else None, } for i, name in enumerate(classes): positive, others = labels[:, i], ~labels[:, i] & labels.any(1) report["per_class"][name] = { "positives": int(positive.sum()), "recall": float(predicted[positive, i].float().mean()) if positive.any() else None, "fires_on_other_classes": float(predicted[others, i].float().mean()) if others.any() else None, } return report
def thresholds_for(checkpoint, targets): return torch.tensor( [ checkpoint.get("thresholds", {}).get( checkpoint["classes"][int(i)], checkpoint["threshold"] ) for i in targets ] ).unsqueeze(1)
def grid_logits(model, images, targets): if model.tiles == 9: batch, cells = images.shape[:2] logits = model(images.flatten(0, 1)).reshape(batch, cells, -1).transpose(1, 2) else: logits = model(images).flatten(2) selected = select_target(logits, targets) # Presence in any enlarged subregion counts as presence in the tile. for target_id in getattr(model, "crop_target_ids", []): mask = targets == target_id if not mask.any(): continue tile_images = images[mask].flatten(0, 1) height, width = tile_images.shape[-2:] crop_h, crop_w = height // 2, width // 2 positions = [ (0, 0), (0, width - crop_w), (height - crop_h, 0), (height - crop_h, width - crop_w), ((height - crop_h) // 2, (width - crop_w) // 2), ] scores = selected[mask] for top, left in positions: crop = tile_images[:, :, top : top + crop_h, left : left + crop_w] crop = nn.functional.interpolate( crop, size=(height, width), mode="bilinear", align_corners=False ) enlarged = model(crop)[:, target_id].reshape_as(scores) scores = torch.maximum(scores, enlarged) selected[mask] = scores return selected
@torch.inference_mode()def evaluate_loader(model, loader, device): model.eval() predictions, labels, targets = [], [], [] loss, total = 0.0, 0 for images, target, truth in loader: logits = grid_logits(model, images.to(device), target.to(device)) loss += nn.functional.binary_cross_entropy_with_logits( logits, truth.to(device), reduction="sum" ).item() total += truth.numel() predictions.append(logits.sigmoid().cpu()) labels.append(truth) targets.append(target) if not total: raise ValueError("Evaluation split is empty") return loss / total, torch.cat(predictions), torch.cat(labels).bool(), torch.cat(targets)
def metrics(probabilities, labels, threshold): predicted = probabilities >= threshold tp = int((predicted & labels).sum()) fp = int((predicted & ~labels).sum()) fn = int((~predicted & labels).sum()) return { "grids": len(labels), "exact_grid_accuracy": float((predicted == labels).all(1).float().mean()), "cell_accuracy": float((predicted == labels).float().mean()), "cell_precision": tp / max(tp + fp, 1), "cell_recall": tp / max(tp + fn, 1), "cell_f1": 2 * tp / max(2 * tp + fp + fn, 1), "tp": tp, "fp": fp, "fn": fn, }
def choose_threshold(probabilities, labels): candidates = [round(0.1 + 0.025 * i, 3) for i in range(33)]
def rank(threshold): result = metrics(probabilities, labels, threshold) return result["exact_grid_accuracy"], result["cell_f1"], -abs(threshold - 0.5)
return max(candidates, key=rank)
def load_checkpoint(path, device): checkpoint = torch.load(path, map_location="cpu", weights_only=True) model = GridModel( checkpoint["tiles"], len(checkpoint["classes"]), pretrained=False, backbone=checkpoint.get("backbone", BACKBONE), ) model.load_state_dict(checkpoint["model"]) model.crop_target_ids = [ checkpoint["classes"].index(name) for name in checkpoint.get("crop_targets", []) ] if model.crop_target_ids and checkpoint["tiles"] != 9: raise ValueError("Crop views are supported only by tile classifiers") return model.to(device).eval(), checkpoint
def train_one(args, tiles, manifest, folders=None): seed_everything(args.seed) device = device_for(args.device) output = Path(args.output) / f"grid{tiles}" if (output / "best.pt").exists(): raise ValueError( f"{output}/best.pt already exists. Choose a new --output to preserve this run." ) output.mkdir(parents=True, exist_ok=True) cells = 1 if tiles == 9 else 16 kind = "tile" if tiles == 9 else "full" classes = sorted( {r["target"] for r in manifest["records"] if r["tiles"] == tiles} | {t for r in folder_records(folders, kind, "train") for t in r["targets"]} - {BACKGROUND} ) aux_targets = sorted({target_name(name) for name in args.aux_targets}) if aux_targets and (tiles != 9 or not set(aux_targets) <= set(classes)): raise ValueError("Auxiliary targets must be existing classes in a 9-tile model") # 4x4 photos are 450 px; 448 keeps small slivers at a size divisible by the stride. size = args.size or (224 if tiles == 9 else 448) backbone_lr = args.backbone_lr if args.backbone_lr is not None else 0.0001 finetune_head_lr = args.finetune_head_lr if args.finetune_head_lr is not None else 0.0003 config = { "tiles": tiles, "classes": classes, "size": size, "backbone": args.backbone, "seed": args.seed, "batch_size": args.batch_size, "device": str(device), "precision": "bfloat16 autocast" if args.amp else "float32", "frozen_epochs": args.frozen_epochs, "finetune_epochs": args.epochs, "patience": args.patience, "optimizer": "AdamW", "weight_decay": 0.0001, "head_lr": args.head_lr, "finetune_head_lr": finetune_head_lr, "finetune_backbone_lr": backbone_lr, "warm_start": args.warm_start, "init_backbone": args.init_backbone, "aux_targets": aux_targets, "folders": args.folders, "folder_kind": kind if folders else None, "folder_negative_weight": args.negative_weight if folders else None, "old_fraction": args.old_fraction if folders else None, "epoch_size": args.epoch_size, "keep_uncertain": args.keep_uncertain, "train_batchnorm": not args.freeze_bn, "amp": args.amp, "selection": ( "mean of answer-key and folder validation loss" if folders else "mean of main and auxiliary validation loss" if aux_targets else "main validation loss" ), "torch": str(torch.__version__), } if args.amp and device.type != "cuda": raise ValueError("--amp is supported only with --device cuda") if device.type == "cuda": torch.backends.cudnn.benchmark = True torch.set_float32_matmul_precision("high") save_json(output / "config.json", config) save_json(output / "classes.json", classes) save_json(output / "split.json", manifest) training_records = records_for(manifest, tiles, "train") + auxiliary_records( manifest, aux_targets, "train" ) training = SupervisedGrids( GridDataset( manifest["root"], training_records, classes, size, training=True, tiles=tiles == 9, include_full_images=bool(aux_targets), ), cells, keep_uncertain=args.keep_uncertain, flip=not args.no_flip, ) validation = GridDataset(manifest["root"], records_for(manifest, tiles, "val"), classes, size) workers = { "num_workers": args.workers, "persistent_workers": args.workers > 0, "pin_memory": device.type == "cuda", } sampler, folder_loader = None, None if folders: folder_training = FolderDataset( folders["root"], folder_records(folders, kind, "train"), classes, size, cells, training=True, negative_weight=args.negative_weight, ) folder_validation = FolderDataset( folders["root"], folder_records(folders, kind, "val"), classes, size, cells, negative_weight=args.negative_weight, ) # Square-root class balancing: rare classes are seen more often without memorizing a few images. counts = {} for record in folder_training.records: counts[record["targets"][0]] = counts.get(record["targets"][0], 0) + 1 folder_weights = torch.tensor( [counts[r["targets"][0]] ** -0.5 for r in folder_training.records] ) folder_weights *= (1 - args.old_fraction) / folder_weights.sum() old_weights = torch.full((len(training),), args.old_fraction / len(training)) sampler = WeightedRandomSampler( torch.cat([old_weights, folder_weights]).double(), args.epoch_size or len(training) + len(folder_training), generator=torch.Generator().manual_seed(args.seed), ) training = ConcatDataset([training, folder_training]) folder_loader = DataLoader(folder_validation, batch_size=64, **workers) elif args.epoch_size: sampler = RandomSampler( training, replacement=True, num_samples=args.epoch_size, generator=torch.Generator().manual_seed(args.seed), ) train_loader = DataLoader( training, batch_size=args.batch_size, shuffle=sampler is None, sampler=sampler, **workers ) val_loader = DataLoader(validation, batch_size=16, **workers) aux_loader = None if aux_targets: aux_validation = GridDataset( manifest["root"], auxiliary_records(manifest, aux_targets, "val"), classes, size, tile_grids=True, ) if not len(aux_validation): raise ValueError("Auxiliary targets need validation examples") aux_loader = DataLoader(aux_validation, batch_size=2) if args.warm_start: model, initial = load_checkpoint(args.warm_start, device) config["backbone"] = initial.get("backbone", BACKBONE) save_json(output / "config.json", config) if initial["tiles"] != tiles or initial["classes"] != classes or initial["size"] != size: raise ValueError("Warm-start model must match task, classes, and image size") else: model = GridModel(tiles, len(classes), backbone=args.backbone).to(device) if args.init_backbone: source = torch.load(args.init_backbone, map_location="cpu", weights_only=True) print( f"grid{tiles}: copied {transfer_backbone(model, source['model'])} backbone tensors " f"from {args.init_backbone}", flush=True, ) model.freeze_backbone(True) optimizer = torch.optim.AdamW(model.head.parameters(), lr=args.head_lr, weight_decay=0.0001) history, best, stale = [], float("inf"), 0 start = time.perf_counter() print( f"grid{tiles}: {len(train_loader.dataset)} training items ({len(train_loader.sampler)} per epoch), " f"{len(validation)} validation grids, device={device}", flush=True, ) for epoch in range(args.frozen_epochs + args.epochs): frozen = epoch < args.frozen_epochs if epoch == args.frozen_epochs: model.freeze_backbone(False) optimizer = torch.optim.AdamW( [ {"params": model.backbone.parameters(), "lr": backbone_lr}, {"params": model.head.parameters(), "lr": finetune_head_lr}, ], weight_decay=0.0001, ) stale = 0 model.train() if args.freeze_bn: # Keep pretrained batch-normalization statistics (for small datasets). model.backbone.eval() total_loss, supervised = 0.0, 0.0 epoch_start = time.perf_counter() for images, *supervision in train_loader: images = images.to(device, non_blocking=True) supervision = [x.to(device, non_blocking=True) for x in supervision] optimizer.zero_grad(set_to_none=True) with torch.autocast("cuda", dtype=torch.bfloat16, enabled=args.amp): logits = cell_logits(model, images) loss, count = partial_loss(logits.float(), *supervision) loss.backward() optimizer.step() total_loss += loss.item() * count.item() supervised += count.item() val_loss, probabilities, truth, _ = evaluate_loader(model, val_loader, device) aux_loss = evaluate_loader(model, aux_loader, device)[0] if aux_loader is not None else None folder_loss = ( evaluate_folders(model, folder_loader, device)[0] if folder_loader is not None else None ) extra = [x for x in (aux_loss, folder_loss) if x is not None] selection_loss = sum([val_loss] + extra) / (1 + len(extra)) row = { "epoch": epoch + 1, "phase": "head" if frozen else "finetune", "train_loss": total_loss / max(supervised, 1), "val_loss": val_loss, "aux_val_loss": aux_loss, "folder_val_loss": folder_loss, "selection_loss": selection_loss, "val_exact_at_0.5": metrics(probabilities, truth, 0.5)["exact_grid_accuracy"], "seconds": time.perf_counter() - epoch_start, } history.append(row) save_json(output / "history.json", history) print(json.dumps({"grid": tiles, **row}), flush=True) if selection_loss < best: best, stale = selection_loss, 0 torch.save( { **config, "epoch": epoch + 1, "val_loss": val_loss, "selection_loss": selection_loss, "model": {k: v.detach().cpu().clone() for k, v in model.state_dict().items()}, }, output / "best.pt", ) elif not frozen: stale += 1 if not frozen and stale >= args.patience: break elapsed = time.perf_counter() - start del optimizer, model empty_cache(device) model, checkpoint = load_checkpoint(output / "best.pt", device) _, probabilities, truth, val_targets = evaluate_loader(model, val_loader, device) threshold = choose_threshold(probabilities, truth) checkpoint["threshold"] = threshold checkpoint["thresholds"] = {} if aux_loader is not None: _, aux_probabilities, aux_truth, aux_ids = evaluate_loader(model, aux_loader, device) for name in aux_targets: mask = aux_ids == classes.index(name) if mask.sum() >= 3: checkpoint["thresholds"][name] = choose_threshold( aux_probabilities[mask], aux_truth[mask] ) save_json( output / "aux_validation.json", { "source": "4x4 crops; proxy only for 3x3 performance", "thresholds": checkpoint["thresholds"], **metrics(aux_probabilities, aux_truth, thresholds_for(checkpoint, aux_ids)), }, ) if folder_loader is not None: _, folder_probabilities, folder_truth, folder_weights = evaluate_folders( model, folder_loader, device ) save_json( output / "folder_validation.json", { "source": f"held-out {kind} images from {args.folders}; single-label, so 'fires_on_other_classes' " "includes images where that target is genuinely visible", **folder_report( folder_probabilities, folder_truth, folder_weights, classes, threshold ), }, ) checkpoint["training_seconds"] = elapsed torch.save(checkpoint, output / "best.pt") save_json( output / "validation.json", { "threshold": threshold, "thresholds": checkpoint["thresholds"], **metrics(probabilities, truth, thresholds_for(checkpoint, val_targets)), }, ) print( f"grid{tiles}: saved best epoch {checkpoint['epoch']}; threshold={threshold}; training={elapsed:.1f}s", flush=True, )
def synchronize(device): if device.type == "mps": torch.mps.synchronize() elif device.type == "cuda": torch.cuda.synchronize()
def calibrate_crops(args): """Enable enlarged views only after a validation-only comparison.""" device = device_for(args.device) seed_everything(42) model, checkpoint = load_checkpoint(args.checkpoint, device) name = target_name(args.target) if checkpoint["tiles"] != 9 or name not in checkpoint["classes"]: raise ValueError("Choose a supported target in a tile classifier") if name in checkpoint.get("crop_targets", []): raise ValueError("Crop views are already enabled for this target") directory = Path(args.checkpoint).parent manifest = json.loads((directory / "split.json").read_text()) records = auxiliary_records(manifest, [name], "val") if len(records) < 3: raise ValueError("Need at least three auxiliary validation grids") dataset = GridDataset( manifest["root"], records, checkpoint["classes"], checkpoint["size"], tile_grids=True ) loader = DataLoader(dataset, batch_size=2) _, probabilities, truth, _ = evaluate_loader(model, loader, device) old_threshold = checkpoint.get("thresholds", {}).get(name, checkpoint["threshold"]) before = metrics(probabilities, truth, old_threshold) model.crop_target_ids.append(checkpoint["classes"].index(name)) _, probabilities, truth, _ = evaluate_loader(model, loader, device) cutoff = choose_threshold(probabilities, truth) after = metrics(probabilities, truth, cutoff) accepted = ( after["exact_grid_accuracy"] >= before["exact_grid_accuracy"] and after["cell_f1"] > before["cell_f1"] ) report = { "target": name, "source": "4x4 validation crops; not 3x3 test data", "views": "full tile plus center and four corner half-size crops", "before": {"threshold": old_threshold, **before}, "after": {"threshold": cutoff, **after}, "accepted": accepted, } if accepted: backup = directory / "pre_crop_best.pt" if backup.exists(): raise ValueError(f"Refusing to overwrite {backup}") torch.save(checkpoint, backup) checkpoint.setdefault("crop_targets", []).append(name) checkpoint.setdefault("thresholds", {})[name] = cutoff torch.save(checkpoint, args.checkpoint) save_json(directory / "crop_calibration.json", report) print(json.dumps(report, indent=2))
@torch.inference_mode()def benchmark(model, dataset, device): images, target, _ = dataset[0] images, target = images.unsqueeze(0).to(device), torch.tensor([target], device=device) for _ in range(5): grid_logits(model, images, target) synchronize(device) timings = [] for _ in range(30): start = time.perf_counter() grid_logits(model, images, target).sigmoid().cpu() synchronize(device) timings.append((time.perf_counter() - start) * 1000) return { "median_ms": float(np.median(timings)), "p95_ms": float(np.percentile(timings, 95)), "scope": "one grid, warm model, includes output transfer; excludes image loading and preprocessing", "device": str(device), "iterations": len(timings), }
def evaluate(args): device = device_for(args.device) seed_everything(42) model, checkpoint = load_checkpoint(args.checkpoint, device) directory = Path(args.checkpoint).parent manifest = json.loads((directory / "split.json").read_text()) records = records_for(manifest, checkpoint["tiles"], args.split) if not records: raise ValueError( f"No {args.split} grids in this manifest" + (" (run prepare with --review)" if args.split == "review" else "") ) dataset = GridDataset( args.data or manifest["root"], records, checkpoint["classes"], checkpoint["size"] ) loss, probabilities, truth, targets = evaluate_loader( model, DataLoader(dataset, batch_size=4), device ) threshold = thresholds_for(checkpoint, targets) report = { "split": args.split, "epoch": checkpoint["epoch"], "threshold": checkpoint["threshold"], "thresholds": checkpoint.get("thresholds", {}), "loss": loss, "training_seconds": checkpoint["training_seconds"], "overall": metrics(probabilities, truth, threshold), "per_class": {}, } if args.split == "review": # Same grids, answered by the labeler whose output the model was trained on. right = [r["labeler_answers"] == r["answers"] for r in records if "labeler_answers" in r] report["labeler_exact_grid_accuracy"] = sum(right) / len(right) if right else None for i, name in enumerate(checkpoint["classes"]): mask = targets == i support = { split: len( [ r for r in records_for(manifest, checkpoint["tiles"], split) if r["target"] == name ] ) for split in ("train", "val", "test", "review") } report["per_class"][name] = { "support": support, "metrics": metrics(probabilities[mask], truth[mask], threshold[mask]) if mask.any() else None, } report["latency"] = benchmark(model, dataset, device) save_json(directory / f"{args.split}_metrics.json", report) save_json( directory / f"{args.split}_predictions.json", [ { "id": r["id"], "target": r["target"], "answers": r["answers"], "selected_cells": (p >= cutoff).nonzero().flatten().tolist(), "probabilities": p.tolist(), } for r, p, cutoff in zip(records, probabilities, threshold) ], ) print(json.dumps(report, indent=2))
@torch.inference_mode()def predict(args): device = device_for(args.device) model, checkpoint = load_checkpoint(args.checkpoint, device) name = target_name(args.target) if name not in checkpoint["classes"]: raise ValueError(f"Unknown target {name!r}; supported: {checkpoint['classes']}") preprocess = transform(checkpoint["size"]) image = read_rgb(image_file(args.image)) if checkpoint["tiles"] == 9: images = torch.stack([preprocess(image.crop(box)) for box in grid_boxes(*image.size, 9)]) else: images = preprocess(image) target = torch.tensor([checkpoint["classes"].index(name)], device=device) probabilities = grid_logits(model, images.unsqueeze(0).to(device), target).sigmoid().cpu()[0] cutoff = checkpoint.get("thresholds", {}).get(name, checkpoint["threshold"]) print( json.dumps( { "target": name, "threshold": cutoff, "selected_cells": (probabilities >= cutoff).nonzero().flatten().tolist(), "probabilities": probabilities.tolist(), }, indent=2, ) )
def export(args): """ONNX fp32 plus calibrated int8, checked against PyTorch on the old test grids.""" import onnx from onnxruntime.quantization import ( CalibrationDataReader, CalibrationMethod, QuantFormat, QuantType, quantize_static, ) from onnxruntime.quantization.shape_inference import quant_pre_process
from predict_onnx import GridPredictor
seed_everything(42) model, checkpoint = load_checkpoint(args.checkpoint, torch.device("cpu")) if model.crop_target_ids: raise ValueError("Enlarged crop views are not supported by the ONNX export") tiles, size = checkpoint["tiles"], checkpoint["size"] directory = Path(args.checkpoint).parent output = Path(args.output or directory / "onnx") output.mkdir(parents=True, exist_ok=True) manifest = json.loads((directory / "split.json").read_text()) root = Path(args.data or manifest["root"])
class Probabilities(nn.Module): def __init__(self): super().__init__() self.model = model
def forward(self, images): logits = self.model(images) return (logits if tiles == 9 else logits.flatten(2)).sigmoid()
info = { "tiles": tiles, "size": size, "classes": checkpoint["classes"], "threshold": checkpoint["threshold"], "thresholds": checkpoint.get("thresholds", {}), "epoch": checkpoint["epoch"], }
def with_metadata(path): exported = onnx.load(path) del exported.metadata_props[:] exported.metadata_props.add(key="grid_vision", value=json.dumps(info)) onnx.save(exported, path)
fp32, prepared, int8 = ( output / f"grid{tiles}.onnx", output / f"grid{tiles}.pre.onnx", output / f"grid{tiles}.int8.onnx", ) for path in (fp32, int8): if path.exists(): raise ValueError(f"{path} already exists. Choose a new --output.") torch.onnx.export( Probabilities().eval(), torch.zeros(9 if tiles == 9 else 1, 3, size, size), fp32, input_names=["images"], output_names=["probabilities"], opset_version=17, dynamic_axes={"images": {0: "batch"}, "probabilities": {0: "batch"}}, dynamo=False, ) with_metadata(fp32) reference = GridPredictor(fp32) calibration = random.Random(0).sample( records_for(manifest, tiles, "train"), min(args.calibration_grids, len(records_for(manifest, tiles, "train"))), )
class Calibration(CalibrationDataReader): def __init__(self): self.batches = iter(reference.inputs(record_image_path(root, r)) for r in calibration)
def get_next(self): batch = next(self.batches, None) return None if batch is None else {"images": batch}
quant_pre_process(str(fp32), str(prepared)) # Percentile ranges and full-precision first/last layers changed the fewest baseline decisions. layers = [ n.name for n in onnx.load(prepared).graph.node if n.op_type in ("Conv", "Gemm", "MatMul") ] quantize_static( str(prepared), str(int8), Calibration(), quant_format=QuantFormat.QDQ, per_channel=True, activation_type=QuantType.QUInt8, weight_type=QuantType.QInt8, calibrate_method=CalibrationMethod.Percentile, nodes_to_exclude=[layers[0], layers[-1]], ) prepared.unlink() with_metadata(int8)
records = records_for(manifest, tiles, "test") variants = {"fp32": GridPredictor(fp32), "int8": GridPredictor(int8)} probabilities = {name: [] for name in ["torch", *variants]} labels, cutoffs = [], [] with torch.inference_mode(): for record in records: inputs = reference.inputs(record_image_path(root, record)) target = checkpoint["classes"].index(record["target"]) scores = Probabilities()(torch.from_numpy(inputs)).numpy() probabilities["torch"].append(scores.T[target] if tiles == 9 else scores[0, target]) for name, predictor in variants.items(): probabilities[name].append(predictor.probabilities(inputs)[target]) labels.append([i in record["answers"] for i in range(record["tiles"])]) cutoffs.append(info["thresholds"].get(record["target"], info["threshold"])) labels, cutoffs = torch.tensor(labels), torch.tensor(cutoffs).unsqueeze(1) tensors = {name: torch.tensor(np.array(values)) for name, values in probabilities.items()} selected = {name: values >= cutoffs for name, values in tensors.items()} report = { "checkpoint": str(args.checkpoint), "test_grids": len(records), "preprocessing": "predict_onnx.preprocess (Pillow + numpy) for every variant", } for name, path in [("fp32", fp32), ("int8", int8)]: timings = {} sample = reference.inputs(record_image_path(root, records[0])) for threads in (1, 4): predictor = GridPredictor(path, threads) for _ in range(5): predictor.probabilities(sample) runs = [] for _ in range(50): start = time.perf_counter() predictor.probabilities(sample) runs.append((time.perf_counter() - start) * 1000) timings[f"{threads}_thread_median_ms"] = float(np.median(runs)) report[name] = { "file": str(path), "megabytes": path.stat().st_size / 1e6, "max_abs_difference_from_torch": float((tensors[name] - tensors["torch"]).abs().max()), "grids_with_different_selection": int( (selected[name] != selected["torch"]).any(1).sum() ), "test": metrics(tensors[name], labels, cutoffs), "cpu_latency_per_grid": { **timings, "scope": "one grid on this machine's CPU, excludes image loading", }, } report["torch_test"] = metrics(tensors["torch"], labels, cutoffs) save_json(output / "export.json", report) print(json.dumps(report, indent=2))
def seam_ratio(image, parts=3): """Separate tiles have sharp seams at the 1/parts lines; one continuous photo usually does not.""" pixels = np.asarray(image.convert("L"), dtype=np.float32) height, width = pixels.shape dx, dy = np.abs(np.diff(pixels, axis=1)).mean(0), np.abs(np.diff(pixels, axis=0)).mean(1)
def seams(differences, length): return max( differences[max(0, round(length * j / parts) - 2) : round(length * j / parts) + 1].max() for j in range(1, parts) )
return min(seams(dx, width), seams(dy, height)) / ((np.median(dx) + np.median(dy)) / 2 + 1e-6)
def image_file(source): """A challenge image, or the image inside a dataset item folder.""" source = Path(source) if source.is_dir(): found = next((source / name for name in IMAGE_NAMES if (source / name).exists()), None) if found is None: raise ValueError(f"No image in {source}") return found return source
def layout(source): """9 or 16 tiles for a challenge image or item folder (300 px = 3x3, 450 px = 4x4).""" metadata = Path(source) / "metadata.json" if Path(source).is_dir() and metadata.is_file(): grid = json.loads(metadata.read_text()).get("grid") if grid in ("3x3", "4x4"): return 9 if grid == "3x3" else 16 image = read_rgb(image_file(source)) side = max(image.size) if abs(side - 300) <= 30: return 9 if abs(side - 450) <= 45: return 16 return 9 if seam_ratio(image) >= 3 else 16
def solve(args): """Detect the layout and use the matching grid model.""" args.checkpoint = args.grid9 if layout(args.image) == 9 else args.grid16 predict(args)
def main(): parser = argparse.ArgumentParser(description=__doc__) commands = parser.add_subparsers(dest="command", required=True) prep = commands.add_parser("prepare") prep.add_argument( "--data", required=True, help="Folder of labeled <item>/{image.jpg, metadata.json} (or answer-key) folders", ) prep.add_argument("--output", default="runs") prep.add_argument("--seed", type=int, default=42) prep.add_argument( "--workers", type=int, default=os.cpu_count() or 1, help="Processes for scanning images" ) prep.add_argument( "--sam", action="store_true", help="Take 4x4 answers from <item>/sam.json (SAM 3) instead of metadata.json", ) prep.add_argument( "--review", nargs="*", default=[], help="Reference answer files held out as a 'review' split", ) prep_folders = commands.add_parser("prepare-folders", help="Ingest class-folder image datasets") prep_folders.add_argument("--data", nargs="+", required=True, help="Class-folder datasets") prep_folders.add_argument( "--manifest", default="runs/split.json", help="Old split; its held-out images are excluded" ) prep_folders.add_argument("--output", default="runs") prep_folders.add_argument("--seed", type=int, default=42) train = commands.add_parser("train") train.add_argument("--manifest", default="runs/split.json") train.add_argument("--output", default="runs/baseline") train.add_argument("--tiles", choices=["9", "16", "both"], default="both") train.add_argument("--device", choices=["auto", "cuda", "mps", "cpu"], default="auto") train.add_argument("--batch-size", type=int, default=16) train.add_argument("--frozen-epochs", type=int, default=3) train.add_argument( "--epochs", type=int, default=20, help="Maximum fine-tuning epochs after head training" ) train.add_argument("--patience", type=int, default=5) train.add_argument("--backbone-lr", type=float, help="Default: 1e-4") train.add_argument("--finetune-head-lr", type=float, help="Default: 3e-4") train.add_argument("--head-lr", type=float, default=0.001) train.add_argument("--warm-start", help="Initialize from a compatible trained checkpoint") train.add_argument( "--aux-targets", nargs="*", default=[], help="Use these targets' 4x4 crops to train a 9-tile classifier", ) train.add_argument("--seed", type=int, default=42) train.add_argument("--size", type=int, help="Input size. Default: 224 for 9 tiles, 448 for 16") train.add_argument( "--folders", help="Folder manifest from prepare-folders, e.g. runs/folders.json" ) train.add_argument( "--negative-weight", type=float, default=0.2, help="Weight for assuming other targets are absent in a single-label folder image", ) train.add_argument( "--old-fraction", type=float, default=0.25, help="Share of samples from answer-key grids" ) train.add_argument("--epoch-size", type=int, help="Training samples (tiles or grids) per epoch") train.add_argument( "--keep-uncertain", action="store_true", help="Also train on cells the labeler marked uncertain (ignored by default)", ) train.add_argument( "--no-flip", action="store_true", help="Turn off random left-right mirroring" ) train.add_argument( "--backbone", default=BACKBONE, help="Any timm model with a stride-16 stage, e.g. convnext_tiny.dinov3_lvd1689m", ) train.add_argument( "--init-backbone", help="Copy backbone weights from another checkpoint, e.g. the 3x3 model" ) train.add_argument( "--freeze-bn", action="store_true", help="Keep pretrained batch-normalization statistics" ) train.add_argument( "--workers", type=int, default=min(16, os.cpu_count() or 1), help="DataLoader worker processes", ) train.add_argument("--amp", action="store_true", help="bfloat16 autocast (CUDA only)") test = commands.add_parser("evaluate") test.add_argument("--checkpoint", required=True) test.add_argument( "--split", choices=["test", "review"], default="test", help="review: the reference grids held out by prepare --review", ) test.add_argument("--data", help="Override dataset root if moved") test.add_argument("--device", choices=["auto", "cuda", "mps", "cpu"], default="auto") prediction = commands.add_parser("predict") prediction.add_argument("--checkpoint", required=True) prediction.add_argument("--image", required=True, help="Image file or example folder") prediction.add_argument("--target", required=True) prediction.add_argument("--device", choices=["auto", "cuda", "mps", "cpu"], default="auto") onnx_export = commands.add_parser( "export", help="ONNX fp32 and int8 for CPU inference without PyTorch" ) onnx_export.add_argument("--checkpoint", required=True) onnx_export.add_argument("--output", help="Default: <checkpoint folder>/onnx") onnx_export.add_argument("--data", help="Override dataset root if moved") onnx_export.add_argument("--calibration-grids", type=int, default=100) solver = commands.add_parser("solve", help="Detect the layout and use the matching model") solver.add_argument("--image", required=True, help="Image file or example folder") solver.add_argument("--target", required=True) solver.add_argument("--grid9", default="runs/baseline/grid9/best.pt") solver.add_argument("--grid16", default="runs/baseline/grid16/best.pt") solver.add_argument("--device", choices=["auto", "cuda", "mps", "cpu"], default="cpu") crops = commands.add_parser("calibrate-crops") crops.add_argument("--checkpoint", required=True) crops.add_argument("--target", required=True) crops.add_argument("--device", choices=["auto", "cuda", "mps", "cpu"], default="auto") args = parser.parse_args() if args.command == "prepare": source = Path(args.data) if (source / "data" / "3x3").is_dir() or (source / "3x3").is_dir(): if args.sam or args.review: parser.error("--sam and --review apply only to raw labeled folders") _, counts = prepare_jsonl(source, args.output) else: _, counts = prepare(args.data, args.output, args.seed, args.workers, args.sam, args.review) print(json.dumps(counts, indent=2)) elif args.command == "prepare-folders": _, summary = prepare_folders(args.data, args.manifest, args.output, args.seed) print(json.dumps(summary, indent=2)) elif args.command == "train": if min(args.batch_size, args.epochs, args.patience) < 1 or args.frozen_epochs < 0: parser.error( "Batch size, epochs, and patience must be positive; frozen epochs cannot be negative" ) if any( lr is not None and (not np.isfinite(lr) or lr <= 0) for lr in (args.backbone_lr, args.finetune_head_lr, args.head_lr) ): parser.error("Learning rates must be finite and positive") if not 0 < args.old_fraction < 1 or args.negative_weight < 0 or args.workers < 0: parser.error("--old-fraction must be in (0, 1); weights and workers cannot be negative") if not np.isfinite(args.negative_weight): parser.error("--negative-weight must be finite") if (args.epoch_size is not None and args.epoch_size < 1) or ( args.size is not None and args.size < 1 ): parser.error("--epoch-size and --size must be positive") manifest = json.loads(Path(args.manifest).read_text()) folders = json.loads(Path(args.folders).read_text()) if args.folders else None for tiles in [9, 16] if args.tiles == "both" else [int(args.tiles)]: train_one(args, tiles, manifest, folders) elif args.command == "evaluate": evaluate(args) elif args.command == "export": if args.calibration_grids < 1: parser.error("--calibration-grids must be positive") export(args) elif args.command == "solve": solve(args) elif args.command == "calibrate-crops": calibrate_crops(args) else: predict(args)
if __name__ == "__main__": main()123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659version = 1revision = 5requires-python = "==3.11.*"
[[package]]name = "certifi"version = "2026.7.22"source = { registry = "https://pypi.org/simple" }sdist = { url = "https://files.pythonhosted.org/packages/a3/c2/24167ea9858356b47a87a50d39908bfdb72ceeefe0041586e704e5376b3a/certifi-2026.7.22.tar.gz", hash = "sha256:741e2c3b351ddf169a738da9f2c048608ff7f2c5cc02f1ebc6b118bb090d5d55", size = 138112, upload-time = "2026-07-22T03:35:12.644Z" }wheels = [ { url = "https://files.pythonhosted.org/packages/0b/a7/71ac2cff56fec219ed242bb11b8efb69fcc4bec75db06fb7bfe35de520e6/certifi-2026.7.22-py3-none-any.whl", hash = "sha256:62f22742b58a1a33014a2b6b706588a8d7e2a88ae7bd1a6ebe8c992928483775", size = 136983, upload-time = "2026-07-22T03:35:11.276Z" },]
[[package]]name = "charset-normalizer"version = "3.5.2"source = { registry = "https://pypi.org/simple" }sdist = { url = "https://files.pythonhosted.org/packages/33/1c/f41d4e74c28ab327ff3acd36053f7ea506c55872d7a90b0fa71aa3ab0c89/charset_normalizer-3.5.2.tar.gz", hash = "sha256:39de2a259fc954455c57274dc94c79d5842774e1247a016aff30bc0efed0f4ef", size = 172659, upload-time = "2026-09-30T04:39:23.398Z" }wheels = [ { url = "https://files.pythonhosted.org/packages/22/67/6a0b94a7960d5e1b5eacd2fb529f3fccc47db4644f7f0a7cfdcfc3be578a/charset_normalizer-3.5.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:3d21b8b13c7592db2ac5e544a6d83187b995257472b0c9e8351b6d507ae37ed6", size = 370642, upload-time = "2026-09-30T04:35:06.91Z" }, { url = "https://files.pythonhosted.org/packages/fb/94/01009e13b94041599004edf32e56e382c24e570f60f79bab8efe45cfe1eb/charset_normalizer-3.5.2-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d760fe2a4d7c3b226cb9026d6a842868d52a7901bd98420e1baf14e80da85cf5", size = 259280, upload-time = "2026-09-30T04:35:08.448Z" }, { url = "https://files.pythonhosted.org/packages/66/85/3b5358f60a13210f0b67d3755c168ef758701b021e655d88d4da28554467/charset_normalizer-3.5.2-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:c9790464842f85f437dbbb54417eda1e0e6bfc52dd8d22d6fd1c994b73b2dc74", size = 245335, upload-time = "2026-09-30T04:35:10.104Z" }, { url = "https://files.pythonhosted.org/packages/74/75/77c1c479b09ecd751d1e767b251ea5c14d4d50ff757bf404afab2692f600/charset_normalizer-3.5.2-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:4685902cf26edf013ed7a3da0f426ebba7a00ebb9541386d835afbf002c11cab", size = 291707, upload-time = "2026-09-30T04:35:11.575Z" }, { url = "https://files.pythonhosted.org/packages/0b/0d/363f78cacb70f58f15f4b083961bbd9d292f335d3f5c66fc4f1cfe69cb90/charset_normalizer-3.5.2-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:4495c5002a7b28557e7e222e77e0b661183e432b7d6d2e788101e3f240e05b8c", size = 286747, upload-time = "2026-09-30T04:35:13.022Z" }, { url = "https://files.pythonhosted.org/packages/e4/ed/cf505d3011ffceb12c2067a7a5d3cfe92b875d4d44bb0ff0d69375e2c184/charset_normalizer-3.5.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:211d5a3eb6af8f513b8d4ca19a8c1b7accab1b5f0d3175f9826b03c1a920dc1f", size = 269972, upload-time = "2026-09-30T04:35:14.606Z" }, { url = "https://files.pythonhosted.org/packages/15/d8/f0a93a431d170e7ca681d4f6650fee3de934d18560e474e7267eb4b0f987/charset_normalizer-3.5.2-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:ef4fcbf3327382cd4c9f540babd61248208af7b93eec4de397b4d5f58a09e288", size = 269339, upload-time = "2026-09-30T04:35:16.087Z" }, { url = "https://files.pythonhosted.org/packages/86/bd/9b2bd1c5b7af02462c9752d33994834ff972a96b4c483eefde9e594488e2/charset_normalizer-3.5.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:bd16aabe4a02a297c23417aa17ac6299dbd8c49f673bcd645b4929b11f5a4400", size = 261683, upload-time = "2026-09-30T04:35:17.488Z" }, { url = "https://files.pythonhosted.org/packages/76/a5/cac540ab0fd61f3fec88ad3dbb64509e71424593d73cfdfff5ab3e4db279/charset_normalizer-3.5.2-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:fb9e68df06293761f9fe66ade60a9bc6d0f5e42b8acf2939a9158af86ab0e5bd", size = 248143, upload-time = "2026-09-30T04:35:18.849Z" }, { url = "https://files.pythonhosted.org/packages/71/7a/ff467301deef2089fad87f72df9e000a26a78fec7acbb18e1999371b8369/charset_normalizer-3.5.2-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:59f63901b0031c3136cf64704dcb21de0bbae62ce2c9529bc39d27665463de37", size = 292358, upload-time = "2026-09-30T04:35:20.326Z" }, { url = "https://files.pythonhosted.org/packages/ad/77/22d7e785d1e210afc2e2f58600dd1799d17a35665faf84383f002826c5f8/charset_normalizer-3.5.2-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:304d5463e65a35d7bb0850550e0780395395f6fcf452f04db7d5ca7cecc425ac", size = 268766, upload-time = "2026-09-30T04:35:21.72Z" }, { url = "https://files.pythonhosted.org/packages/ae/91/e8e946267f1c2d9e2bd651726e2fbd2addf02c4d36cea5069e32ca9d7bb5/charset_normalizer-3.5.2-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:9cf9b1a857e25c4baceeb3624e92a56df3668f398c4acba74e174d81fb4d1d3a", size = 287432, upload-time = "2026-09-30T04:35:23.273Z" }, { url = "https://files.pythonhosted.org/packages/4e/88/7561d8a88d555e7df6623abe7c0070b4baf47549b9408783a2ae0a1a6cf7/charset_normalizer-3.5.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:114e4d0c92d618409ed82a99e22b5c5e768fe995f2973f78265f4524f49d4640", size = 272470, upload-time = "2026-09-30T04:35:24.655Z" }, { url = "https://files.pythonhosted.org/packages/35/7e/578c702301ec036f01455f30744a08d2b42f6ab35b9b2d4bf8cae0ef2a80/charset_normalizer-3.5.2-cp311-cp311-win32.whl", hash = "sha256:2625388c6c754520c37abaf3b41eb34d1cc4a373f457898f08606c8e362b891d", size = 186688, upload-time = "2026-09-30T04:35:26.225Z" }, { url = "https://files.pythonhosted.org/packages/e8/fc/fdf8cf52ff21cd5bf158f20978991cf985325842f74283eb6df26c8a39d8/charset_normalizer-3.5.2-cp311-cp311-win_amd64.whl", hash = "sha256:87e50a3e7cb90af586b6c5faf23e302a970415ac73bd7bd90a515a04b427ef96", size = 214932, upload-time = "2026-09-30T04:35:27.796Z" }, { url = "https://files.pythonhosted.org/packages/97/66/3e45a506d8110b632541faf9a9470185aa9878f1ed44020f31346c1c5e5b/charset_normalizer-3.5.2-cp311-cp311-win_arm64.whl", hash = "sha256:254eb48b9fa5ee9898a3c445825a1f340fe53712a098904b39b0bddba8ea3cb1", size = 202828, upload-time = "2026-09-30T04:35:29.259Z" }, { url = "https://files.pythonhosted.org/packages/8c/ab/176fbfd5b64939c55d652366aa5b9ef1d767af207a3aa6ebeb0d226c484d/charset_normalizer-3.5.2-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:4275811936e2f06feff5e598fb42a1b7ae852da8e39605211892b56b81a34efd", size = 331815, upload-time = "2026-09-30T04:38:26.216Z" }, { url = "https://files.pythonhosted.org/packages/7e/84/371eac6b30bdbcbf2d632a1a01809103459216fcaae61b8b8d922c1bfb8a/charset_normalizer-3.5.2-cp37-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:1c50fe28bbc2ced33386f298650d91218076c05420e6cbd790b913adc41659e7", size = 253276, upload-time = "2026-09-30T04:38:28.032Z" }, { url = "https://files.pythonhosted.org/packages/43/6f/c4fbae58febff71709c51bc7e18fdfa55341dc382704740f9f0cbf03817b/charset_normalizer-3.5.2-cp37-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d19fbd981a488e22cd04883659ca6b08f50b5974f9fd7c95655ef6a043e5893f", size = 241239, upload-time = "2026-09-30T04:38:29.732Z" }, { url = "https://files.pythonhosted.org/packages/61/71/458c3f42164a07d0c5210798e9e704b39e540a6793b05aba67f3a35243a9/charset_normalizer-3.5.2-cp37-abi3-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:0fed1d06615f022ee3b13caf5e8b180cfea32bb2c5aded8a9d44277afc040f93", size = 231121, upload-time = "2026-09-30T04:38:31.462Z" }, { url = "https://files.pythonhosted.org/packages/09/54/ab9e89367076f6331bb6c65c4bf14a5361fa5191cb6561bf534f18504e1b/charset_normalizer-3.5.2-cp37-abi3-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:838dcc90063569a0448120554591a1d6c4a4ffe11babf048908793154ab86ade", size = 260350, upload-time = "2026-09-30T04:38:33.239Z" }, { url = "https://files.pythonhosted.org/packages/7c/c1/061431ecc688d9d76602502cb57cc01e691e682c18f1beb45f9673b5bbd2/charset_normalizer-3.5.2-cp37-abi3-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:2ce45c6627b22c47e390bc91a41c3d13032192e699fa0bea96e9671b373d69b0", size = 255430, upload-time = "2026-09-30T04:38:34.865Z" }, { url = "https://files.pythonhosted.org/packages/8d/1f/20c8949f0676f7ab811abdeb7f4d7f1cbc6e61ff20bef08b44edeb092bc8/charset_normalizer-3.5.2-cp37-abi3-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:0774bf9bf620249fee3e0b8b9fd3065de213be30f3aa94ce2494b3b638949e26", size = 250612, upload-time = "2026-09-30T04:38:36.649Z" }, { url = "https://files.pythonhosted.org/packages/2b/9e/46f2fa4c431fc98c4ae76a8cb5bdca54e0341e3cfc3fcfd8e82740250818/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:1db38f4c5496827c1a501846d64d14c3b80c7e6714e406cd7dc36a9899fa1011", size = 242083, upload-time = "2026-09-30T04:38:38.26Z" }, { url = "https://files.pythonhosted.org/packages/bd/39/559be29a0c0f086e0bba6922babd38916cc5e0b58ced4de13ee01ea05508/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_armv7l.whl", hash = "sha256:304d8e4d493af723536393eee0c689eb7813f4a474c8b479dee63f1fdd98f621", size = 232738, upload-time = "2026-09-30T04:38:39.81Z" }, { url = "https://files.pythonhosted.org/packages/ff/6c/387b0e4f756a282831c1d9fc6aeb6c51ca4507ca202767c8de15ce9b12e2/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_ppc64le.whl", hash = "sha256:9b7f416ff0978e2f2249330527f0ad6fa02f4932e6199692d3b52da2048c19e4", size = 260703, upload-time = "2026-09-30T04:38:41.346Z" }, { url = "https://files.pythonhosted.org/packages/96/92/1fdf015f09ef449f50d3ac4b67c90887c9c318b727daa95cc4f866e6521d/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_riscv64.whl", hash = "sha256:01077390b03f7988f11d700a2194e69b119741a86b1a638b1db88891e3eced8e", size = 247622, upload-time = "2026-09-30T04:38:42.937Z" }, { url = "https://files.pythonhosted.org/packages/dc/3c/8e7b8a5671ad5d433669fb2a76f1a0164df2d9b1718b0206bc2a16d840cc/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_s390x.whl", hash = "sha256:7e841fb9010836c992c9f12fcbd43a831de93a5f726fc1ccd8ca1d0268c5014c", size = 257500, upload-time = "2026-09-30T04:38:44.604Z" }, { url = "https://files.pythonhosted.org/packages/b4/f0/45b579df5cabc1d5d53ea1cc35e8437d3ca768c0acccc7041517cb6fbb32/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:9cae88599c7219005d879f98e5ed53341e9a122af585e1091200358a3003d2a0", size = 255100, upload-time = "2026-09-30T04:38:46.289Z" }, { url = "https://files.pythonhosted.org/packages/31/68/fdec18a343f5fb3f310588dd478b09ac4799e0b187dbade3a8cd776f03ef/charset_normalizer-3.5.2-cp37-abi3-win32.whl", hash = "sha256:01b0c0d2262a9e28e8484a278c7e1b5d650e3ac8cf2683d2967e25899f208bdf", size = 174499, upload-time = "2026-09-30T04:38:47.999Z" }, { url = "https://files.pythonhosted.org/packages/9d/8a/b618149cc5207943a0242068d7a27897f56a62947b5a039085f2a22029f8/charset_normalizer-3.5.2-cp37-abi3-win_amd64.whl", hash = "sha256:9f56f72050826f63dcee7a7f55b0a77168cb3bfc553fd405e7f8f9ece75a4036", size = 200092, upload-time = "2026-09-30T04:38:49.707Z" }, { url = "https://files.pythonhosted.org/packages/03/cf/4c66866fa9e2b1c78e3c911516d1de497a677b7ac60f1eceda74ce777ca3/charset_normalizer-3.5.2-cp37-abi3-win_arm64.whl", hash = "sha256:40ab6bffa02ae10a0581e6c198be7d2d8ca5c2a0c64e4ed3465d766df457573e", size = 294363, upload-time = "2026-09-30T04:38:51.312Z" }, { url = "https://files.pythonhosted.org/packages/fc/ad/d07d7862a62ffa6d79d68074d14823243dd235a77c45262acbf6adeb28bf/charset_normalizer-3.5.2-py3-none-any.whl", hash = "sha256:b6b751274acb69d77b3323d6b7dbaa3c7fdfc1eb829b7eb61d262f32e1af9685", size = 68872, upload-time = "2026-09-30T04:39:21.828Z" },]
[[package]]name = "rc1"version = "0.1.0"source = { virtual = "." }dependencies = [ { name = "huggingface-hub" }, { name = "numpy" }, { name = "pillow" }, { name = "timm" }, { name = "torch" }, { name = "torchvision" },]
[package.dev-dependencies]export = [ { name = "onnx" }, { name = "onnxruntime" },]
[package.metadata]requires-dist = [ { name = "huggingface-hub", specifier = "==0.34.4" }, { name = "numpy", specifier = "==2.2.6" }, { name = "pillow", specifier = "==11.3.0" }, { name = "timm", specifier = "==1.0.20" }, { name = "torch", specifier = "==2.8.0" }, { name = "torchvision", specifier = "==0.23.0" },]
[package.metadata.requires-dev]export = [ { name = "onnx", specifier = ">=1.23.2" }, { name = "onnxruntime", specifier = ">=1.30.0" },]
[[package]]name = "colorama"version = "0.4.6"source = { registry = "https://pypi.org/simple" }sdist = { url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", size = 27697, upload-time = "2022-10-25T02:36:22.414Z" }wheels = [ { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335, upload-time = "2022-10-25T02:36:20.889Z" },]
[[package]]name = "filelock"version = "4.0.12"source = { registry = "https://pypi.org/simple" }sdist = { url = "https://files.pythonhosted.org/packages/53/e4/34efcb869715cf299e47d1ac7b2624d2bcb6f2d3dffc2f0abe8417f65ab2/filelock-4.0.12.tar.gz", hash = "sha256:cf42711a7ac791818b299fab0332a088c65aeeefa36290de98db92c434303b0c", size = 253880, upload-time = "2026-10-05T13:17:43.677Z" }wheels = [ { url = "https://files.pythonhosted.org/packages/da/a1/b047e1c486a2c66283633b7dbb73872ca16ca1ce6a426f70d4d037fc8e1c/filelock-4.0.12-py3-none-any.whl", hash = "sha256:5f17ee83ecee8a6f3e389c75822fb70a1c2f0506b99438a6dffa1d56793588c8", size = 111732, upload-time = "2026-10-05T13:17:42.361Z" },]
[[package]]name = "flatbuffers"version = "25.12.19"source = { registry = "https://pypi.org/simple" }wheels = [ { url = "https://files.pythonhosted.org/packages/e8/2d/d2a548598be01649e2d46231d151a6c56d10b964d94043a335ae56ea2d92/flatbuffers-25.12.19-py2.py3-none-any.whl", hash = "sha256:7634f50c427838bb021c2d66a3d1168e9d199b0607e6329399f04846d42e20b4", size = 26661, upload-time = "2025-12-19T23:16:13.622Z" },]
[[package]]name = "fsspec"version = "2026.9.0"source = { registry = "https://pypi.org/simple" }sdist = { url = "https://files.pythonhosted.org/packages/77/cd/9be253869fc42e764de7f3dedd6969af7d44ff9c3375214a3442a6f3fc08/fsspec-2026.9.0.tar.gz", hash = "sha256:0f08147951c8cb31d844c3547d631053b127863b60be04cf06e121333ee0e2fe", size = 333545, upload-time = "2026-09-18T17:50:42.825Z" }wheels = [ { url = "https://files.pythonhosted.org/packages/6c/c0/a98505f18594f1bce828bb159cec0fcf9860562f1a2c85913409fc8f3d9e/fsspec-2026.9.0-py3-none-any.whl", hash = "sha256:8dd6e646e99ea382bd85f97a45e6b526a442d79423a7dc673f1e2756d05fcb5f", size = 221738, upload-time = "2026-09-18T17:50:41.341Z" },]
[[package]]name = "hf-xet"version = "1.6.0"source = { registry = "https://pypi.org/simple" }sdist = { url = "https://files.pythonhosted.org/packages/1b/ab/522a2ab67f27971a9d48ca666d4fca85ef7d5282d142e31fd087e27b1bbe/hf_xet-1.6.0.tar.gz", hash = "sha256:2e58454a340b3556dfa4972d5451aff4fba8dd42a236600ba1a1d2b1514f0fef", size = 920527, upload-time = "2026-08-03T22:33:13.243Z" }wheels = [ { url = "https://files.pythonhosted.org/packages/a2/50/7afa2c9c787405864fc47a0d1bbc02c62e9101947ed43c1f43899fc7d91d/hf_xet-1.6.0-cp38-abi3-macosx_10_12_x86_64.whl", hash = "sha256:633dc0cd71d32da58ab8c03ad38e2fac452c15c2b0a2866ebf6ededfe0a5061d", size = 4071729, upload-time = "2026-08-03T22:33:00.721Z" }, { url = "https://files.pythonhosted.org/packages/4b/69/55b8dcf636142ae660fec1869fcac14c4da2e8412e14d6eee1523be77e9f/hf_xet-1.6.0-cp38-abi3-macosx_11_0_arm64.whl", hash = "sha256:f0906082d9932ae0c0057fa194041c22b4e2cdb46b2592ef3b91f020d62a081a", size = 3876287, upload-time = "2026-08-03T22:33:02.251Z" }, { url = "https://files.pythonhosted.org/packages/67/4e/a28359bf1c1ecf11eba22123168c138698f7cb576ac678f5a2e16cd5da08/hf_xet-1.6.0-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:d62671bb130879cef0ee4c9ebe47a14af6c66ec53e6d84dc15936e5ffdfac82f", size = 4464663, upload-time = "2026-08-03T22:33:03.802Z" }, { url = "https://files.pythonhosted.org/packages/9a/69/1f0cbc2fb22ae6082d094f743d1b8945a3f36f6089cb95f42b7ee348cda7/hf_xet-1.6.0-cp38-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:0e6e21fa3cdfcdcd76748564bf593870a5e013f47d97cf10aed63aa222cff5b7", size = 4262538, upload-time = "2026-08-03T22:33:05.287Z" }, { url = "https://files.pythonhosted.org/packages/d1/3a/4f4f2301ade26e404462d3336fa11f7958d914cabbabdd6e03c3c5d5658c/hf_xet-1.6.0-cp38-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:4fc74352a17015bd0ee90038bc9efe38db894cde45f268b6712b04fce8cd0acb", size = 4460520, upload-time = "2026-08-03T22:33:06.81Z" }, { url = "https://files.pythonhosted.org/packages/ab/5f/311725e2a905534dfee2dcb5b08414f249147f1f12252bfc2bd24caa075c/hf_xet-1.6.0-cp38-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:8fb4f71cba6129110c3374a33f919001ff130488fc23553698e34cc1c2a1198c", size = 4675937, upload-time = "2026-08-03T22:33:08.616Z" }, { url = "https://files.pythonhosted.org/packages/98/b7/8c59a66d15205024662f1d66968136f13893f96df1ddc5087e2e281fc95f/hf_xet-1.6.0-cp38-abi3-win_amd64.whl", hash = "sha256:fb4fadde1b2b70bf4c0c14a6dccbe7194b1c28947fefd5bbe3fed9d940676c3b", size = 4033128, upload-time = "2026-08-03T22:33:10.171Z" }, { url = "https://files.pythonhosted.org/packages/73/63/ca511b6f802f28cf3489b280fe77475bcca8de85e81a6299d7916b5b5555/hf_xet-1.6.0-cp38-abi3-win_arm64.whl", hash = "sha256:3dc3e35441ba395006af5aaacc40ef2e603c51ef46c3530b9156185f00935ea3", size = 3859359, upload-time = "2026-08-03T22:33:11.725Z" },]
[[package]]name = "huggingface-hub"version = "0.34.4"source = { registry = "https://pypi.org/simple" }dependencies = [ { name = "filelock" }, { name = "fsspec" }, { name = "hf-xet", marker = "platform_machine == 'aarch64' or platform_machine == 'amd64' or platform_machine == 'arm64' or platform_machine == 'x86_64'" }, { name = "packaging" }, { name = "pyyaml" }, { name = "requests" }, { name = "tqdm" }, { name = "typing-extensions" },]sdist = { url = "https://files.pythonhosted.org/packages/45/c9/bdbe19339f76d12985bc03572f330a01a93c04dffecaaea3061bdd7fb892/huggingface_hub-0.34.4.tar.gz", hash = "sha256:a4228daa6fb001be3f4f4bdaf9a0db00e1739235702848df00885c9b5742c85c", size = 459768, upload-time = "2025-08-08T09:14:52.365Z" }wheels = [ { url = "https://files.pythonhosted.org/packages/39/7b/bb06b061991107cd8783f300adff3e7b7f284e330fd82f507f2a1417b11d/huggingface_hub-0.34.4-py3-none-any.whl", hash = "sha256:9b365d781739c93ff90c359844221beef048403f1bc1f1c123c191257c3c890a", size = 561452, upload-time = "2025-08-08T09:14:50.159Z" },]
[[package]]name = "idna"version = "3.20"source = { registry = "https://pypi.org/simple" }sdist = { url = "https://files.pythonhosted.org/packages/f5/08/8eea9d4b8302028f3abb2c0813953f7aec26d33b7a8960ed760e65ff29fa/idna-3.20.tar.gz", hash = "sha256:a7db850025b95ded1eae8a46181a1a6c56c92c96f0e2b005d9ff8dc0210cab44", size = 216463, upload-time = "2026-09-17T14:11:04.752Z" }wheels = [ { url = "https://files.pythonhosted.org/packages/58/a2/bb081bab032533a855d44de1d56f8e8426114ff1ba5d1f07a438a0a654f8/idna-3.20-py3-none-any.whl", hash = "sha256:ab7ae7122974553370f0bdb919e1a960b2cd1bc1ef0276416d896db81c14582c", size = 69583, upload-time = "2026-09-17T14:11:03.168Z" },]
[[package]]name = "jinja2"version = "3.1.6"source = { registry = "https://pypi.org/simple" }dependencies = [ { name = "markupsafe" },]sdist = { url = "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz", hash = "sha256:0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d", size = 245115, upload-time = "2025-03-05T20:05:02.478Z" }wheels = [ { url = "https://files.pythonhosted.org/packages/62/a1/3d680cbfd5f4b8f15abc1d571870c5fc3e594bb582bc3b64ea099db13e56/jinja2-3.1.6-py3-none-any.whl", hash = "sha256:85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67", size = 134899, upload-time = "2025-03-05T20:05:00.369Z" },]
[[package]]name = "markupsafe"version = "3.0.4"source = { registry = "https://pypi.org/simple" }sdist = { url = "https://files.pythonhosted.org/packages/38/9b/e422a865e1d5d57d0e509b4e0bf1c1a70a7f6382c29a5aa428df994c8bc8/markupsafe-3.0.4.tar.gz", hash = "sha256:2e9ad7dd851bf45fab9f75cbff4cb493fee9979e8d8c7c9c3ee119022518edd6", size = 153777, upload-time = "2026-10-02T23:07:22.29Z" }wheels = [ { url = "https://files.pythonhosted.org/packages/32/55/18dbb4778b30ada5ce071608503cc3edc9e14e13d868c17a6d178fc30f7a/markupsafe-3.0.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:9e25feb9e330b63edb0278a0acdf85e50d0cb0fbf49c3084abbe4e24ae195346", size = 11520, upload-time = "2026-10-02T23:04:36.299Z" }, { url = "https://files.pythonhosted.org/packages/6c/14/0b05f79b4733e264a18d08fe08fa1df7347630ff32a6cb82180d9dccec55/markupsafe-3.0.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:7d3391b2188d18737cb2fa147028b1096236eaa7e156446c650a489fa2cadc91", size = 12063, upload-time = "2026-10-02T23:04:37.291Z" }, { url = "https://files.pythonhosted.org/packages/ca/3a/63ba10b6c1463216b3e4df669a9f0e5a3b0c3071557d2e8229e3968c79fb/markupsafe-3.0.4-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:849dd2bb0e5e4ab2b71c7191726a4a8d5aa8a610daa584728cbee0b710ddc4ef", size = 24321, upload-time = "2026-10-02T23:04:38.262Z" }, { url = "https://files.pythonhosted.org/packages/1a/2e/5f015261b76ad633d187ef6f388b413aedd64a8773c4df59e530a0be5525/markupsafe-3.0.4-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:befb4158af32106b9a93db8d6d1d1cbbd418c0d5aca0cabb7b1780abf0c89169", size = 28845, upload-time = "2026-10-02T23:04:39.295Z" }, { url = "https://files.pythonhosted.org/packages/33/cf/26e594b26be40c2f1fec63ccf8a8b99d0335a5b2cbe84835c7d82a994375/markupsafe-3.0.4-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:71f88e749ea29f67f21f3b36433c1dc54c7729ed2a6d9e2da2e0d9e0d7b224eb", size = 24701, upload-time = "2026-10-02T23:04:40.348Z" }, { url = "https://files.pythonhosted.org/packages/81/a5/a513b76c139a3915b43404324e55c0b7979ae4f0d39eb6f075b0282e90a8/markupsafe-3.0.4-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6da83a088f8ef93b2d483a8232a4dbf4d69d3d8496b568a03c56becac43e1808", size = 22961, upload-time = "2026-10-02T23:04:41.372Z" }, { url = "https://files.pythonhosted.org/packages/46/cf/4c66192c100b4542bcbe392ae06696b670f66927be3ac38a213234778ff9/markupsafe-3.0.4-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:8f0fac8b13d14bb06c68195f849371924ae53dd7b1c00fed24650f704383b692", size = 21920, upload-time = "2026-10-02T23:04:42.429Z" }, { url = "https://files.pythonhosted.org/packages/cb/17/ac3662678bfbad649893117ada2ba44dc30bf56884e84f13154a792b10f1/markupsafe-3.0.4-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:4a7cdc2a420ca01058182da4253329764d4bfa055564d1eced90e6ba1e8b1d3d", size = 23726, upload-time = "2026-10-02T23:04:43.531Z" }, { url = "https://files.pythonhosted.org/packages/f7/af/fe47cee339180a69ebca3c57fb3483d0f5cbd1e8337d1871fb1d9c1aebee/markupsafe-3.0.4-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:83b3944fea42a8400edf92fd1770fb8d0d4f7de651353bd2d8525a92dba69a21", size = 22539, upload-time = "2026-10-02T23:04:44.618Z" }, { url = "https://files.pythonhosted.org/packages/12/32/d55440ba140442800e02d799c9cb5ab597bf6ebdb1177b5ea39a11f797bd/markupsafe-3.0.4-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:8138eb83940ec7299024d92d4dee45f601b9e6c5ffde9d25f4e35e326203c707", size = 23963, upload-time = "2026-10-02T23:04:45.656Z" }, { url = "https://files.pythonhosted.org/packages/50/9d/9c86042cb364c2ad4c971e6d1247929effd25f714cd7ee11b05e6316445b/markupsafe-3.0.4-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:811d02d5122171c1941357efd8f9bf4ffe907b7f0a1a4e729a880e4be3f46e3e", size = 21506, upload-time = "2026-10-02T23:04:46.671Z" }, { url = "https://files.pythonhosted.org/packages/75/ef/5b824f03ba40c3b3652b6272d083d2fc4fcdd440de519a3a39ba2c3e7262/markupsafe-3.0.4-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:50b5bedc9ed8a94fc8857a42ef4f84a81ea88f8d4f05dc8705fb23ee6d8dcca7", size = 22955, upload-time = "2026-10-02T23:04:47.698Z" }, { url = "https://files.pythonhosted.org/packages/1e/e8/44cfcb5ea40e5e43cec7793ef90704ed0c475280839076c4345757eb8e59/markupsafe-3.0.4-cp311-cp311-win32.whl", hash = "sha256:2e5a7cd7fdd14fcb1ae5d7d8bf23d24fbd1daefd1fbca2580132e1ea75f098b5", size = 14094, upload-time = "2026-10-02T23:04:48.788Z" }, { url = "https://files.pythonhosted.org/packages/91/89/f2b509f7bf79352e40117824c1070dbeafd4df67031d3fa98165a3134228/markupsafe-3.0.4-cp311-cp311-win_amd64.whl", hash = "sha256:fdb4ca07ab75ffadab4a8b135ad59cdbb3156b99310f3d565370da74a15d6bd3", size = 14328, upload-time = "2026-10-02T23:04:49.801Z" }, { url = "https://files.pythonhosted.org/packages/2b/5a/ccf22672a0f64dc682306e288f0dabcb06c7a201f3bb6e6cbf86d9e8ad03/markupsafe-3.0.4-cp311-cp311-win_arm64.whl", hash = "sha256:569d65055d367e3dcdf30c3f41119467b73d9ee9faf332bdf40402644f5ac08e", size = 14188, upload-time = "2026-10-02T23:04:50.847Z" },]
[[package]]name = "ml-dtypes"version = "0.6.0"source = { registry = "https://pypi.org/simple" }dependencies = [ { name = "numpy" },]sdist = { url = "https://files.pythonhosted.org/packages/12/72/307d7c4bd0600601c7133fba5cb78af7db968152951c1cd473abb1cda782/ml_dtypes-0.6.0.tar.gz", hash = "sha256:5e60251d32ced5598972e4d5e06a2f044341f9291402551a3f6f0ec44f9299b0", size = 3032327, upload-time = "2026-08-13T14:14:40.215Z" }wheels = [ { url = "https://files.pythonhosted.org/packages/b8/2c/318cd1a9014c63939ffe687e19559ae12831fcc37d66c71ad1f616f1ffd6/ml_dtypes-0.6.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:f4f59f83c82ab480e924b988e7b1b4eb4de836dfcf5390c6f59148d1a00e1d02", size = 566813, upload-time = "2026-08-13T14:13:55.053Z" }, { url = "https://files.pythonhosted.org/packages/d9/83/706b8a39449f0d55a7d5f7d07a169da4decfafae8a1f4983a9236d4b49e8/ml_dtypes-0.6.0-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7728c0420ec1c338564fc8b01015ff2d58567e70f17fedce5a0a7c0308c0d5b9", size = 356864, upload-time = "2026-08-13T14:13:56.249Z" }, { url = "https://files.pythonhosted.org/packages/2e/b1/135a7bf47633f5b9184f0d0316af819884124d12b40965064bd216266514/ml_dtypes-0.6.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6c8e39b53e90afda8ce52859c93de4dba3e02b76d85dcf091cc469f9184c6dae", size = 412043, upload-time = "2026-08-13T14:13:57.614Z" }, { url = "https://files.pythonhosted.org/packages/07/23/8870bb62d6e499d6bcbc1242b9f11689bae00a3d39d3684a9aefad8b6ee6/ml_dtypes-0.6.0-cp311-cp311-win_amd64.whl", hash = "sha256:3035518e3e19add1a4cac9236ab22888b208a4074912514313ccb2d6d242cde8", size = 433670, upload-time = "2026-08-13T14:13:59.097Z" }, { url = "https://files.pythonhosted.org/packages/cf/7a/5d8fbe24d0bffd0d7cb5165a89f8ab7c3de000f26d6705242aeed99d583c/ml_dtypes-0.6.0-cp311-cp311-win_arm64.whl", hash = "sha256:5a519c9e95a216fbcb8e759793ef7fb40793fc803ed839142d6dc5be9be5bc89", size = 551915, upload-time = "2026-08-13T14:14:00.368Z" },]
[[package]]name = "mpmath"version = "1.3.0"source = { registry = "https://pypi.org/simple" }sdist = { url = "https://files.pythonhosted.org/packages/e0/47/dd32fa426cc72114383ac549964eecb20ecfd886d1e5ccf5340b55b02f57/mpmath-1.3.0.tar.gz", hash = "sha256:7a28eb2a9774d00c7bc92411c19a89209d5da7c4c9a9e227be8330a23a25b91f", size = 508106, upload-time = "2023-03-07T16:47:11.061Z" }wheels = [ { url = "https://files.pythonhosted.org/packages/43/e3/7d92a15f894aa0c9c4b49b8ee9ac9850d6e63b03c9c32c0367a13ae62209/mpmath-1.3.0-py3-none-any.whl", hash = "sha256:a0b2b9fe80bbcd81a6647ff13108738cfb482d481d826cc0e02f5b35e5c88d2c", size = 536198, upload-time = "2023-03-07T16:47:09.197Z" },]
[[package]]name = "networkx"version = "3.6.1"source = { registry = "https://pypi.org/simple" }sdist = { url = "https://files.pythonhosted.org/packages/6a/51/63fe664f3908c97be9d2e4f1158eb633317598cfa6e1fc14af5383f17512/networkx-3.6.1.tar.gz", hash = "sha256:26b7c357accc0c8cde558ad486283728b65b6a95d85ee1cd66bafab4c8168509", size = 2517025, upload-time = "2025-12-08T17:02:39.908Z" }wheels = [ { url = "https://files.pythonhosted.org/packages/9e/c9/b2622292ea83fbb4ec318f5b9ab867d0a28ab43c5717bb85b0a5f6b3b0a4/networkx-3.6.1-py3-none-any.whl", hash = "sha256:d47fbf302e7d9cbbb9e2555a0d267983d2aa476bac30e90dfbe5669bd57f3762", size = 2068504, upload-time = "2025-12-08T17:02:38.159Z" },]
[[package]]name = "numpy"version = "2.2.6"source = { registry = "https://pypi.org/simple" }sdist = { url = "https://files.pythonhosted.org/packages/76/21/7d2a95e4bba9dc13d043ee156a356c0a8f0c6309dff6b21b4d71a073b8a8/numpy-2.2.6.tar.gz", hash = "sha256:e29554e2bef54a90aa5cc07da6ce955accb83f21ab5de01a62c8478897b264fd", size = 20276440, upload-time = "2025-05-17T22:38:04.611Z" }wheels = [ { url = "https://files.pythonhosted.org/packages/da/a8/4f83e2aa666a9fbf56d6118faaaf5f1974d456b1823fda0a176eff722839/numpy-2.2.6-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:f9f1adb22318e121c5c69a09142811a201ef17ab257a1e66ca3025065b7f53ae", size = 21176963, upload-time = "2025-05-17T21:31:19.36Z" }, { url = "https://files.pythonhosted.org/packages/b3/2b/64e1affc7972decb74c9e29e5649fac940514910960ba25cd9af4488b66c/numpy-2.2.6-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:c820a93b0255bc360f53eca31a0e676fd1101f673dda8da93454a12e23fc5f7a", size = 14406743, upload-time = "2025-05-17T21:31:41.087Z" }, { url = "https://files.pythonhosted.org/packages/4a/9f/0121e375000b5e50ffdd8b25bf78d8e1a5aa4cca3f185d41265198c7b834/numpy-2.2.6-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:3d70692235e759f260c3d837193090014aebdf026dfd167834bcba43e30c2a42", size = 5352616, upload-time = "2025-05-17T21:31:50.072Z" }, { url = "https://files.pythonhosted.org/packages/31/0d/b48c405c91693635fbe2dcd7bc84a33a602add5f63286e024d3b6741411c/numpy-2.2.6-cp311-cp311-macosx_14_0_x86_64.whl", hash = "sha256:481b49095335f8eed42e39e8041327c05b0f6f4780488f61286ed3c01368d491", size = 6889579, upload-time = "2025-05-17T21:32:01.712Z" }, { url = "https://files.pythonhosted.org/packages/52/b8/7f0554d49b565d0171eab6e99001846882000883998e7b7d9f0d98b1f934/numpy-2.2.6-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b64d8d4d17135e00c8e346e0a738deb17e754230d7e0810ac5012750bbd85a5a", size = 14312005, upload-time = "2025-05-17T21:32:23.332Z" }, { url = "https://files.pythonhosted.org/packages/b3/dd/2238b898e51bd6d389b7389ffb20d7f4c10066d80351187ec8e303a5a475/numpy-2.2.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ba10f8411898fc418a521833e014a77d3ca01c15b0c6cdcce6a0d2897e6dbbdf", size = 16821570, upload-time = "2025-05-17T21:32:47.991Z" }, { url = "https://files.pythonhosted.org/packages/83/6c/44d0325722cf644f191042bf47eedad61c1e6df2432ed65cbe28509d404e/numpy-2.2.6-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:bd48227a919f1bafbdda0583705e547892342c26fb127219d60a5c36882609d1", size = 15818548, upload-time = "2025-05-17T21:33:11.728Z" }, { url = "https://files.pythonhosted.org/packages/ae/9d/81e8216030ce66be25279098789b665d49ff19eef08bfa8cb96d4957f422/numpy-2.2.6-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:9551a499bf125c1d4f9e250377c1ee2eddd02e01eac6644c080162c0c51778ab", size = 18620521, upload-time = "2025-05-17T21:33:39.139Z" }, { url = "https://files.pythonhosted.org/packages/6a/fd/e19617b9530b031db51b0926eed5345ce8ddc669bb3bc0044b23e275ebe8/numpy-2.2.6-cp311-cp311-win32.whl", hash = "sha256:0678000bb9ac1475cd454c6b8c799206af8107e310843532b04d49649c717a47", size = 6525866, upload-time = "2025-05-17T21:33:50.273Z" }, { url = "https://files.pythonhosted.org/packages/31/0a/f354fb7176b81747d870f7991dc763e157a934c717b67b58456bc63da3df/numpy-2.2.6-cp311-cp311-win_amd64.whl", hash = "sha256:e8213002e427c69c45a52bbd94163084025f533a55a59d6f9c5b820774ef3303", size = 12907455, upload-time = "2025-05-17T21:34:09.135Z" },]
[[package]]name = "nvidia-cublas-cu12"version = "12.8.4.1"source = { registry = "https://pypi.org/simple" }wheels = [ { url = "https://files.pythonhosted.org/packages/dc/61/e24b560ab2e2eaeb3c839129175fb330dfcfc29e5203196e5541a4c44682/nvidia_cublas_cu12-12.8.4.1-py3-none-manylinux_2_27_x86_64.whl", hash = "sha256:8ac4e771d5a348c551b2a426eda6193c19aa630236b418086020df5ba9667142", size = 594346921, upload-time = "2025-03-07T01:44:31.254Z" },]
[[package]]name = "nvidia-cuda-cupti-cu12"version = "12.8.90"source = { registry = "https://pypi.org/simple" }wheels = [ { url = "https://files.pythonhosted.org/packages/f8/02/2adcaa145158bf1a8295d83591d22e4103dbfd821bcaf6f3f53151ca4ffa/nvidia_cuda_cupti_cu12-12.8.90-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:ea0cb07ebda26bb9b29ba82cda34849e73c166c18162d3913575b0c9db9a6182", size = 10248621, upload-time = "2025-03-07T01:40:21.213Z" },]
[[package]]name = "nvidia-cuda-nvrtc-cu12"version = "12.8.93"source = { registry = "https://pypi.org/simple" }wheels = [ { url = "https://files.pythonhosted.org/packages/05/6b/32f747947df2da6994e999492ab306a903659555dddc0fbdeb9d71f75e52/nvidia_cuda_nvrtc_cu12-12.8.93-py3-none-manylinux2010_x86_64.manylinux_2_12_x86_64.whl", hash = "sha256:a7756528852ef889772a84c6cd89d41dfa74667e24cca16bb31f8f061e3e9994", size = 88040029, upload-time = "2025-03-07T01:42:13.562Z" },]
[[package]]name = "nvidia-cuda-runtime-cu12"version = "12.8.90"source = { registry = "https://pypi.org/simple" }wheels = [ { url = "https://files.pythonhosted.org/packages/0d/9b/a997b638fcd068ad6e4d53b8551a7d30fe8b404d6f1804abf1df69838932/nvidia_cuda_runtime_cu12-12.8.90-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:adade8dcbd0edf427b7204d480d6066d33902cab2a4707dcfc48a2d0fd44ab90", size = 954765, upload-time = "2025-03-07T01:40:01.615Z" },]
[[package]]name = "nvidia-cudnn-cu12"version = "9.10.2.21"source = { registry = "https://pypi.org/simple" }dependencies = [ { name = "nvidia-cublas-cu12" },]wheels = [ { url = "https://files.pythonhosted.org/packages/ba/51/e123d997aa098c61d029f76663dedbfb9bc8dcf8c60cbd6adbe42f76d049/nvidia_cudnn_cu12-9.10.2.21-py3-none-manylinux_2_27_x86_64.whl", hash = "sha256:949452be657fa16687d0930933f032835951ef0892b37d2d53824d1a84dc97a8", size = 706758467, upload-time = "2025-06-06T21:54:08.597Z" },]
[[package]]name = "nvidia-cufft-cu12"version = "11.3.3.83"source = { registry = "https://pypi.org/simple" }dependencies = [ { name = "nvidia-nvjitlink-cu12" },]wheels = [ { url = "https://files.pythonhosted.org/packages/1f/13/ee4e00f30e676b66ae65b4f08cb5bcbb8392c03f54f2d5413ea99a5d1c80/nvidia_cufft_cu12-11.3.3.83-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:4d2dd21ec0b88cf61b62e6b43564355e5222e4a3fb394cac0db101f2dd0d4f74", size = 193118695, upload-time = "2025-03-07T01:45:27.821Z" },]
[[package]]name = "nvidia-cufile-cu12"version = "1.13.1.3"source = { registry = "https://pypi.org/simple" }wheels = [ { url = "https://files.pythonhosted.org/packages/bb/fe/1bcba1dfbfb8d01be8d93f07bfc502c93fa23afa6fd5ab3fc7c1df71038a/nvidia_cufile_cu12-1.13.1.3-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:1d069003be650e131b21c932ec3d8969c1715379251f8d23a1860554b1cb24fc", size = 1197834, upload-time = "2025-03-07T01:45:50.723Z" },]
[[package]]name = "nvidia-curand-cu12"version = "10.3.9.90"source = { registry = "https://pypi.org/simple" }wheels = [ { url = "https://files.pythonhosted.org/packages/fb/aa/6584b56dc84ebe9cf93226a5cde4d99080c8e90ab40f0c27bda7a0f29aa1/nvidia_curand_cu12-10.3.9.90-py3-none-manylinux_2_27_x86_64.whl", hash = "sha256:b32331d4f4df5d6eefa0554c565b626c7216f87a06a4f56fab27c3b68a830ec9", size = 63619976, upload-time = "2025-03-07T01:46:23.323Z" },]
[[package]]name = "nvidia-cusolver-cu12"version = "11.7.3.90"source = { registry = "https://pypi.org/simple" }dependencies = [ { name = "nvidia-cublas-cu12" }, { name = "nvidia-cusparse-cu12" }, { name = "nvidia-nvjitlink-cu12" },]wheels = [ { url = "https://files.pythonhosted.org/packages/85/48/9a13d2975803e8cf2777d5ed57b87a0b6ca2cc795f9a4f59796a910bfb80/nvidia_cusolver_cu12-11.7.3.90-py3-none-manylinux_2_27_x86_64.whl", hash = "sha256:4376c11ad263152bd50ea295c05370360776f8c3427b30991df774f9fb26c450", size = 267506905, upload-time = "2025-03-07T01:47:16.273Z" },]
[[package]]name = "nvidia-cusparse-cu12"version = "12.5.8.93"source = { registry = "https://pypi.org/simple" }dependencies = [ { name = "nvidia-nvjitlink-cu12" },]wheels = [ { url = "https://files.pythonhosted.org/packages/c2/f5/e1854cb2f2bcd4280c44736c93550cc300ff4b8c95ebe370d0aa7d2b473d/nvidia_cusparse_cu12-12.5.8.93-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:1ec05d76bbbd8b61b06a80e1eaf8cf4959c3d4ce8e711b65ebd0443bb0ebb13b", size = 288216466, upload-time = "2025-03-07T01:48:13.779Z" },]
[[package]]name = "nvidia-cusparselt-cu12"version = "0.7.1"source = { registry = "https://pypi.org/simple" }wheels = [ { url = "https://files.pythonhosted.org/packages/56/79/12978b96bd44274fe38b5dde5cfb660b1d114f70a65ef962bcbbed99b549/nvidia_cusparselt_cu12-0.7.1-py3-none-manylinux2014_x86_64.whl", hash = "sha256:f1bb701d6b930d5a7cea44c19ceb973311500847f81b634d802b7b539dc55623", size = 287193691, upload-time = "2025-02-26T00:15:44.104Z" },]
[[package]]name = "nvidia-nccl-cu12"version = "2.27.3"source = { registry = "https://pypi.org/simple" }wheels = [ { url = "https://files.pythonhosted.org/packages/5c/5b/4e4fff7bad39adf89f735f2bc87248c81db71205b62bcc0d5ca5b606b3c3/nvidia_nccl_cu12-2.27.3-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:adf27ccf4238253e0b826bce3ff5fa532d65fc42322c8bfdfaf28024c0fbe039", size = 322364134, upload-time = "2025-06-03T21:58:04.013Z" },]
[[package]]name = "nvidia-nvjitlink-cu12"version = "12.8.93"source = { registry = "https://pypi.org/simple" }wheels = [ { url = "https://files.pythonhosted.org/packages/f6/74/86a07f1d0f42998ca31312f998bd3b9a7eff7f52378f4f270c8679c77fb9/nvidia_nvjitlink_cu12-12.8.93-py3-none-manylinux2010_x86_64.manylinux_2_12_x86_64.whl", hash = "sha256:81ff63371a7ebd6e6451970684f916be2eab07321b73c9d244dc2b4da7f73b88", size = 39254836, upload-time = "2025-03-07T01:49:55.661Z" },]
[[package]]name = "nvidia-nvtx-cu12"version = "12.8.90"source = { registry = "https://pypi.org/simple" }wheels = [ { url = "https://files.pythonhosted.org/packages/a2/eb/86626c1bbc2edb86323022371c39aa48df6fd8b0a1647bc274577f72e90b/nvidia_nvtx_cu12-12.8.90-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:5b17e2001cc0d751a5bc2c6ec6d26ad95913324a4adb86788c944f8ce9ba441f", size = 89954, upload-time = "2025-03-07T01:42:44.131Z" },]
[[package]]name = "onnx"version = "1.23.2"source = { registry = "https://pypi.org/simple" }dependencies = [ { name = "ml-dtypes" }, { name = "numpy" }, { name = "protobuf" }, { name = "typing-extensions" },]sdist = { url = "https://files.pythonhosted.org/packages/3f/62/bc2dfadb63ecf04cb2d65a6b17751863039d36c65de51d6a3128ab35f1e7/onnx-1.23.2.tar.gz", hash = "sha256:008cb0467b2bbee41448acc7da8b6f4e704624cb0d327a2d5adafc7ce19bc5b8", size = 6023090, upload-time = "2026-10-06T04:25:58.681Z" }wheels = [ { url = "https://files.pythonhosted.org/packages/ea/27/b8793ea89e16ce16beb0e662d29ee8f4e100e9e95202968d08f1c08795d3/onnx-1.23.2-cp311-cp311-macosx_13_0_universal2.whl", hash = "sha256:419bbbe3fbdf45a7658ee0aa1a54cd170ea15f3e5a60ace6e8d94f1577b3674b", size = 9725398, upload-time = "2026-10-06T04:25:21.31Z" }, { url = "https://files.pythonhosted.org/packages/8a/2c/f9a5f186da571c396b660f97cc0e1aa85c5b76249abacda3de01b9f2e049/onnx-1.23.2-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:83b3fc8321303c9da62824730457ba2f7ae0970f0e2f7fc0117912df7f8a4826", size = 8644597, upload-time = "2026-10-06T04:25:23.451Z" }, { url = "https://files.pythonhosted.org/packages/12/4d/e8cafd5fbe5f5fde043676838a4754e6ff4cd00323ecc81b3345eca6f185/onnx-1.23.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c03ecf6b835d136108eeaeeafbd0026fc7b3cf98661409fbc6b63d5a29361348", size = 8886609, upload-time = "2026-10-06T04:25:25.379Z" }, { url = "https://files.pythonhosted.org/packages/de/56/cfc3ee63efc13dc112e29a79cfb77efecec50378fc4e2bd8f1b1ccd04fe8/onnx-1.23.2-cp311-cp311-win32.whl", hash = "sha256:a2b88d7e3634662f8d030117a7b02d864cfc965800547089ba62d3a9ceab3564", size = 7738192, upload-time = "2026-10-06T04:25:28.45Z" }, { url = "https://files.pythonhosted.org/packages/81/0d/3aaf8f1fea3430282bd65acb3808d80fbdfeb90f20cfecb4072604e37ca6/onnx-1.23.2-cp311-cp311-win_amd64.whl", hash = "sha256:a40265d62b7a614041593e11370d316880f9628eb5a0d49d9028c9c0e7f1cc08", size = 7875390, upload-time = "2026-10-06T04:25:30.432Z" }, { url = "https://files.pythonhosted.org/packages/ff/99/88c439dd84db6abc7d87e9d39584bdc29d4cbf5a1ae26015fcabf6679d36/onnx-1.23.2-cp311-cp311-win_arm64.whl", hash = "sha256:f8b9a5e25a390cc291600e5fd619f4b79708287a6bbc41a37209f364e08a63da", size = 8050663, upload-time = "2026-10-06T04:25:32.401Z" }, { url = "https://files.pythonhosted.org/packages/d7/d9/967d6f6838ad60964de912a5e7d01915282899b254460705d952f5d14c1a/onnx-1.23.2-cp312-abi3-macosx_13_0_universal2.whl", hash = "sha256:1b8680ce1e6a9a4736374a9dce4de14ea8ee05e0dccf0784a78a6e5646bdc1f6", size = 9725612, upload-time = "2026-10-06T04:25:34.299Z" }, { url = "https://files.pythonhosted.org/packages/f9/50/2e156ef2cae1c9f4ff01a41dffa43fc1eb7b969755055436bf6df1805d54/onnx-1.23.2-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a203efdbaabbbe8f25e854e2b2921382d6fcf4c67895656f939044b0632974e8", size = 8640515, upload-time = "2026-10-06T04:25:36.727Z" }, { url = "https://files.pythonhosted.org/packages/87/56/21509a657f9a73ab0ca307d325043f49ca6c4ff6bf79edeb9e159190d44d/onnx-1.23.2-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7abf381d278f31ac62487fddedc9dd42da842dce94d5d43536836ee3efdf4a2b", size = 8881633, upload-time = "2026-10-06T04:25:38.868Z" }, { url = "https://files.pythonhosted.org/packages/ec/ef/0a69093ffa0b999747b373c75d07182a812722a0e595d21f763a8d406260/onnx-1.23.2-cp312-abi3-pyemscripten_2026_0_wasm32.whl", hash = "sha256:e79e35e152d3095c6910ae81013bbc68679e32bfc0ca76f840968d4b6fdfb864", size = 7314844, upload-time = "2026-10-06T04:25:41.088Z" }, { url = "https://files.pythonhosted.org/packages/97/a3/e4d4aedd0cc6820de416bb99623fc12b9a22a387d00596bb98505de9a805/onnx-1.23.2-cp312-abi3-win32.whl", hash = "sha256:b0b8dae0d33dd8606370bc264b0b1d6e64cfdf8b83d7c676fab8eff6b88ca409", size = 7736405, upload-time = "2026-10-06T04:25:42.893Z" }, { url = "https://files.pythonhosted.org/packages/38/ce/102fd4a0b2a6d111a9c86745e084c4c68c0ee020eaa359a03a8d43e4646f/onnx-1.23.2-cp312-abi3-win_amd64.whl", hash = "sha256:9b382ba898a7c142a0801d03cf04ecabced96c1543c7b643a86f0928143802de", size = 7872489, upload-time = "2026-10-06T04:25:44.802Z" }, { url = "https://files.pythonhosted.org/packages/bd/1d/37f2c7f821f79ceed3c976bd087d16abdd2b0bba6c19475322e7a31bae59/onnx-1.23.2-cp312-abi3-win_arm64.whl", hash = "sha256:80cef0fad59524d02c21ec93f4fbccdcc6223f1c33339d597519a2d27cac19a7", size = 8047076, upload-time = "2026-10-06T04:25:46.93Z" },]
[[package]]name = "onnxruntime"version = "1.30.0"source = { registry = "https://pypi.org/simple" }dependencies = [ { name = "flatbuffers" }, { name = "numpy" }, { name = "packaging" }, { name = "protobuf" },]wheels = [ { url = "https://files.pythonhosted.org/packages/73/b6/e2fa6dfc8c3cd19639d452c3120fb0e02f5176b4e24ecabb24b5362be725/onnxruntime-1.30.0-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:f36c87ec504f4f328e968ee322e4ba9682abe66280b3425625afcbed5333fed7", size = 21533037, upload-time = "2026-09-10T16:31:03.582Z" }, { url = "https://files.pythonhosted.org/packages/4f/1a/4d197d2676a866f6239cd2d06a95b6db40d47dc29d5bec9fb1493a13dd94/onnxruntime-1.30.0-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:bac3aee7b40acd805659fd81a2acd6096312d5b0f014c97ddfe75fb4c1644627", size = 21332697, upload-time = "2026-09-10T16:31:08.118Z" }, { url = "https://files.pythonhosted.org/packages/4f/2e/4c96278a99140d0307ccda6fd51e6e9d1ca7c9f6fdd1fa96ff375acfc713/onnxruntime-1.30.0-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:fd54b314ea385bcecac69ab431f020ba503e3878dad4ebb645fec5a24b041242", size = 23561046, upload-time = "2026-09-10T16:31:11.494Z" }, { url = "https://files.pythonhosted.org/packages/66/68/b8aaade8c1883f569228f4b57201cce922bb7d4af6f977d619520a733430/onnxruntime-1.30.0-cp311-cp311-win_amd64.whl", hash = "sha256:0edd0145a6e3fce8a1276491dc784d615e3c58bcb952c9b4e5c876d5c6a12ad7", size = 14309136, upload-time = "2026-09-10T16:31:14.181Z" }, { url = "https://files.pythonhosted.org/packages/96/f1/fbda6fb08ac4db6c5c6f7c3e128e4d8fb398b52fe2fc3282c45cadedd18b/onnxruntime-1.30.0-cp311-cp311-win_arm64.whl", hash = "sha256:16506cfa5d218850f2b46e0edce1b952121f2f84f8e0074dafe15f4787f0c8fb", size = 14167408, upload-time = "2026-09-10T16:31:16.505Z" },]
[[package]]name = "packaging"version = "26.3"source = { registry = "https://pypi.org/simple" }sdist = { url = "https://files.pythonhosted.org/packages/7d/fa/3944b40b07da9ce895c0e6303a5ab7d53da063554f534556b134a54d6093/packaging-26.3.tar.gz", hash = "sha256:94edc256424af38762eb31306eed28beb9f0efc50a8837492c9d6fd6004aed79", size = 313412, upload-time = "2026-08-04T18:15:28.737Z" }wheels = [ { url = "https://files.pythonhosted.org/packages/63/34/ba1c580383c9eada3711951fef0795c80b829a078d72188184bcab9dd527/packaging-26.3-py3-none-any.whl", hash = "sha256:d7193f7c8e4e93f444fde0262bf90af30e16fa0ad0ad44cb553c87339b23cd1c", size = 129956, upload-time = "2026-08-04T18:15:27.159Z" },]
[[package]]name = "pillow"version = "11.3.0"source = { registry = "https://pypi.org/simple" }sdist = { url = "https://files.pythonhosted.org/packages/f3/0d/d0d6dea55cd152ce3d6767bb38a8fc10e33796ba4ba210cbab9354b6d238/pillow-11.3.0.tar.gz", hash = "sha256:3828ee7586cd0b2091b6209e5ad53e20d0649bbe87164a459d0676e035e8f523", size = 47113069, upload-time = "2025-07-01T09:16:30.666Z" }wheels = [ { url = "https://files.pythonhosted.org/packages/db/26/77f8ed17ca4ffd60e1dcd220a6ec6d71210ba398cfa33a13a1cd614c5613/pillow-11.3.0-cp311-cp311-macosx_10_10_x86_64.whl", hash = "sha256:1cd110edf822773368b396281a2293aeb91c90a2db00d78ea43e7e861631b722", size = 5316531, upload-time = "2025-07-01T09:13:59.203Z" }, { url = "https://files.pythonhosted.org/packages/cb/39/ee475903197ce709322a17a866892efb560f57900d9af2e55f86db51b0a5/pillow-11.3.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:9c412fddd1b77a75aa904615ebaa6001f169b26fd467b4be93aded278266b288", size = 4686560, upload-time = "2025-07-01T09:14:01.101Z" }, { url = "https://files.pythonhosted.org/packages/d5/90/442068a160fd179938ba55ec8c97050a612426fae5ec0a764e345839f76d/pillow-11.3.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:7d1aa4de119a0ecac0a34a9c8bde33f34022e2e8f99104e47a3ca392fd60e37d", size = 5870978, upload-time = "2025-07-03T13:09:55.638Z" }, { url = "https://files.pythonhosted.org/packages/13/92/dcdd147ab02daf405387f0218dcf792dc6dd5b14d2573d40b4caeef01059/pillow-11.3.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:91da1d88226663594e3f6b4b8c3c8d85bd504117d043740a8e0ec449087cc494", size = 7641168, upload-time = "2025-07-03T13:10:00.37Z" }, { url = "https://files.pythonhosted.org/packages/6e/db/839d6ba7fd38b51af641aa904e2960e7a5644d60ec754c046b7d2aee00e5/pillow-11.3.0-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:643f189248837533073c405ec2f0bb250ba54598cf80e8c1e043381a60632f58", size = 5973053, upload-time = "2025-07-01T09:14:04.491Z" }, { url = "https://files.pythonhosted.org/packages/f2/2f/d7675ecae6c43e9f12aa8d58b6012683b20b6edfbdac7abcb4e6af7a3784/pillow-11.3.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:106064daa23a745510dabce1d84f29137a37224831d88eb4ce94bb187b1d7e5f", size = 6640273, upload-time = "2025-07-01T09:14:06.235Z" }, { url = "https://files.pythonhosted.org/packages/45/ad/931694675ede172e15b2ff03c8144a0ddaea1d87adb72bb07655eaffb654/pillow-11.3.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:cd8ff254faf15591e724dc7c4ddb6bf4793efcbe13802a4ae3e863cd300b493e", size = 6082043, upload-time = "2025-07-01T09:14:07.978Z" }, { url = "https://files.pythonhosted.org/packages/3a/04/ba8f2b11fc80d2dd462d7abec16351b45ec99cbbaea4387648a44190351a/pillow-11.3.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:932c754c2d51ad2b2271fd01c3d121daaa35e27efae2a616f77bf164bc0b3e94", size = 6715516, upload-time = "2025-07-01T09:14:10.233Z" }, { url = "https://files.pythonhosted.org/packages/48/59/8cd06d7f3944cc7d892e8533c56b0acb68399f640786313275faec1e3b6f/pillow-11.3.0-cp311-cp311-win32.whl", hash = "sha256:b4b8f3efc8d530a1544e5962bd6b403d5f7fe8b9e08227c6b255f98ad82b4ba0", size = 6274768, upload-time = "2025-07-01T09:14:11.921Z" }, { url = "https://files.pythonhosted.org/packages/f1/cc/29c0f5d64ab8eae20f3232da8f8571660aa0ab4b8f1331da5c2f5f9a938e/pillow-11.3.0-cp311-cp311-win_amd64.whl", hash = "sha256:1a992e86b0dd7aeb1f053cd506508c0999d710a8f07b4c791c63843fc6a807ac", size = 6986055, upload-time = "2025-07-01T09:14:13.623Z" }, { url = "https://files.pythonhosted.org/packages/c6/df/90bd886fabd544c25addd63e5ca6932c86f2b701d5da6c7839387a076b4a/pillow-11.3.0-cp311-cp311-win_arm64.whl", hash = "sha256:30807c931ff7c095620fe04448e2c2fc673fcbb1ffe2a7da3fb39613489b1ddd", size = 2423079, upload-time = "2025-07-01T09:14:15.268Z" }, { url = "https://files.pythonhosted.org/packages/9e/e3/6fa84033758276fb31da12e5fb66ad747ae83b93c67af17f8c6ff4cc8f34/pillow-11.3.0-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:7c8ec7a017ad1bd562f93dbd8505763e688d388cde6e4a010ae1486916e713e6", size = 5270566, upload-time = "2025-07-01T09:16:19.801Z" }, { url = "https://files.pythonhosted.org/packages/5b/ee/e8d2e1ab4892970b561e1ba96cbd59c0d28cf66737fc44abb2aec3795a4e/pillow-11.3.0-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:9ab6ae226de48019caa8074894544af5b53a117ccb9d3b3dcb2871464c829438", size = 4654618, upload-time = "2025-07-01T09:16:21.818Z" }, { url = "https://files.pythonhosted.org/packages/f2/6d/17f80f4e1f0761f02160fc433abd4109fa1548dcfdca46cfdadaf9efa565/pillow-11.3.0-pp311-pypy311_pp73-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:fe27fb049cdcca11f11a7bfda64043c37b30e6b91f10cb5bab275806c32f6ab3", size = 4874248, upload-time = "2025-07-03T13:11:20.738Z" }, { url = "https://files.pythonhosted.org/packages/de/5f/c22340acd61cef960130585bbe2120e2fd8434c214802f07e8c03596b17e/pillow-11.3.0-pp311-pypy311_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:465b9e8844e3c3519a983d58b80be3f668e2a7a5db97f2784e7079fbc9f9822c", size = 6583963, upload-time = "2025-07-03T13:11:26.283Z" }, { url = "https://files.pythonhosted.org/packages/31/5e/03966aedfbfcbb4d5f8aa042452d3361f325b963ebbadddac05b122e47dd/pillow-11.3.0-pp311-pypy311_pp73-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5418b53c0d59b3824d05e029669efa023bbef0f3e92e75ec8428f3799487f361", size = 4957170, upload-time = "2025-07-01T09:16:23.762Z" }, { url = "https://files.pythonhosted.org/packages/cc/2d/e082982aacc927fc2cab48e1e731bdb1643a1406acace8bed0900a61464e/pillow-11.3.0-pp311-pypy311_pp73-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:504b6f59505f08ae014f724b6207ff6222662aab5cc9542577fb084ed0676ac7", size = 5581505, upload-time = "2025-07-01T09:16:25.593Z" }, { url = "https://files.pythonhosted.org/packages/34/e7/ae39f538fd6844e982063c3a5e4598b8ced43b9633baa3a85ef33af8c05c/pillow-11.3.0-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:c84d689db21a1c397d001aa08241044aa2069e7587b398c8cc63020390b1c1b8", size = 6984598, upload-time = "2025-07-01T09:16:27.732Z" },]
[[package]]name = "protobuf"version = "7.36.2"source = { registry = "https://pypi.org/simple" }sdist = { url = "https://files.pythonhosted.org/packages/d9/89/5b8517baa72f84a67b8a307ba953c91057af618bf40bf676f3c03551f8f0/protobuf-7.36.2.tar.gz", hash = "sha256:497d0463ff3316681da6c0b9e8d06cb465d61abce00b613ab42226175644d1bb", size = 512737, upload-time = "2026-09-17T20:07:59.326Z" }wheels = [ { url = "https://files.pythonhosted.org/packages/32/72/98342feb672507c8f3a69e34b4fa8961f608edba5c1a48a6f47156d92cb5/protobuf-7.36.2-cp310-abi3-macosx_10_9_universal2.whl", hash = "sha256:cbc70b17ee27e28894c7fee8bb04be1abead49e936bc70eb60052531eee2079e", size = 456039, upload-time = "2026-09-17T20:07:51.542Z" }, { url = "https://files.pythonhosted.org/packages/b6/ea/91fdf7c2b8bbd49cde056f00a9df6773532987e1c00fe2830b895af95c7e/protobuf-7.36.2-cp310-abi3-manylinux2014_aarch64.whl", hash = "sha256:e11e1f0180583a2af89db6a2ecd9e8dc40aa6d2988ca175bfd0e6d12ea72d74e", size = 344219, upload-time = "2026-09-17T20:07:52.914Z" }, { url = "https://files.pythonhosted.org/packages/17/ab/5fd5f8ece73fad885c5a09aa849b32d70472f954ba3a92d3bb5974ea953b/protobuf-7.36.2-cp310-abi3-manylinux2014_s390x.whl", hash = "sha256:f4fee11ec330d238b34a05c9b675f693c20415d1c5bd7d5320cc2f8a798eb9cf", size = 357223, upload-time = "2026-09-17T20:07:53.985Z" }, { url = "https://files.pythonhosted.org/packages/db/f3/3996583dd2906297a637af12114deddf7658af6e683fedb83be061983fb5/protobuf-7.36.2-cp310-abi3-manylinux2014_x86_64.whl", hash = "sha256:89f23aa53c24553a2416fd4fd1ec06f74fa42b14b546d8883128813f775bbfd2", size = 343223, upload-time = "2026-09-17T20:07:54.931Z" }, { url = "https://files.pythonhosted.org/packages/fc/1b/dcc64f358fcb51811b58ae40b3d28f820725f116d86487cc20bd4b130701/protobuf-7.36.2-cp310-abi3-win32.whl", hash = "sha256:912c1221170e16c08d1f086762f563dd61ff83c18b5fa6652952dfaded66f728", size = 442998, upload-time = "2026-09-17T20:07:55.826Z" }, { url = "https://files.pythonhosted.org/packages/8a/55/b77bda4e5e5f5971fb51b07663694690e9afdb9402136c16a522bd621cad/protobuf-7.36.2-cp310-abi3-win_amd64.whl", hash = "sha256:a300819d441e078a5608c0d3c709796bb548136058fda017ae51d425b44fd353", size = 456514, upload-time = "2026-09-17T20:07:57.188Z" }, { url = "https://files.pythonhosted.org/packages/e4/04/d52c7016b04b6c5108f26691f9d33ec82a9b65d041f1a9c771137693d618/protobuf-7.36.2-py3-none-any.whl", hash = "sha256:bdb3a345d48db958e6ce1f18e508beb0cc981d64f24088427549c866cd039f1e", size = 179806, upload-time = "2026-09-17T20:07:58.211Z" },]
[[package]]name = "pyyaml"version = "6.0.3"source = { registry = "https://pypi.org/simple" }sdist = { url = "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz", hash = "sha256:d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f", size = 130960, upload-time = "2025-09-25T21:33:16.546Z" }wheels = [ { url = "https://files.pythonhosted.org/packages/6d/16/a95b6757765b7b031c9374925bb718d55e0a9ba8a1b6a12d25962ea44347/pyyaml-6.0.3-cp311-cp311-macosx_10_13_x86_64.whl", hash = "sha256:44edc647873928551a01e7a563d7452ccdebee747728c1080d881d68af7b997e", size = 185826, upload-time = "2025-09-25T21:31:58.655Z" }, { url = "https://files.pythonhosted.org/packages/16/19/13de8e4377ed53079ee996e1ab0a9c33ec2faf808a4647b7b4c0d46dd239/pyyaml-6.0.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:652cb6edd41e718550aad172851962662ff2681490a8a711af6a4d288dd96824", size = 175577, upload-time = "2025-09-25T21:32:00.088Z" }, { url = "https://files.pythonhosted.org/packages/0c/62/d2eb46264d4b157dae1275b573017abec435397aa59cbcdab6fc978a8af4/pyyaml-6.0.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:10892704fc220243f5305762e276552a0395f7beb4dbf9b14ec8fd43b57f126c", size = 775556, upload-time = "2025-09-25T21:32:01.31Z" }, { url = "https://files.pythonhosted.org/packages/10/cb/16c3f2cf3266edd25aaa00d6c4350381c8b012ed6f5276675b9eba8d9ff4/pyyaml-6.0.3-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:850774a7879607d3a6f50d36d04f00ee69e7fc816450e5f7e58d7f17f1ae5c00", size = 882114, upload-time = "2025-09-25T21:32:03.376Z" }, { url = "https://files.pythonhosted.org/packages/71/60/917329f640924b18ff085ab889a11c763e0b573da888e8404ff486657602/pyyaml-6.0.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b8bb0864c5a28024fac8a632c443c87c5aa6f215c0b126c449ae1a150412f31d", size = 806638, upload-time = "2025-09-25T21:32:04.553Z" }, { url = "https://files.pythonhosted.org/packages/dd/6f/529b0f316a9fd167281a6c3826b5583e6192dba792dd55e3203d3f8e655a/pyyaml-6.0.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1d37d57ad971609cf3c53ba6a7e365e40660e3be0e5175fa9f2365a379d6095a", size = 767463, upload-time = "2025-09-25T21:32:06.152Z" }, { url = "https://files.pythonhosted.org/packages/f2/6a/b627b4e0c1dd03718543519ffb2f1deea4a1e6d42fbab8021936a4d22589/pyyaml-6.0.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:37503bfbfc9d2c40b344d06b2199cf0e96e97957ab1c1b546fd4f87e53e5d3e4", size = 794986, upload-time = "2025-09-25T21:32:07.367Z" }, { url = "https://files.pythonhosted.org/packages/45/91/47a6e1c42d9ee337c4839208f30d9f09caa9f720ec7582917b264defc875/pyyaml-6.0.3-cp311-cp311-win32.whl", hash = "sha256:8098f252adfa6c80ab48096053f512f2321f0b998f98150cea9bd23d83e1467b", size = 142543, upload-time = "2025-09-25T21:32:08.95Z" }, { url = "https://files.pythonhosted.org/packages/da/e3/ea007450a105ae919a72393cb06f122f288ef60bba2dc64b26e2646fa315/pyyaml-6.0.3-cp311-cp311-win_amd64.whl", hash = "sha256:9f3bfb4965eb874431221a3ff3fdcddc7e74e3b07799e0e84ca4a0f867d449bf", size = 158763, upload-time = "2025-09-25T21:32:09.96Z" },]
[[package]]name = "requests"version = "2.34.2"source = { registry = "https://pypi.org/simple" }dependencies = [ { name = "certifi" }, { name = "charset-normalizer" }, { name = "idna" }, { name = "urllib3" },]sdist = { url = "https://files.pythonhosted.org/packages/ac/c3/e2a2b89f2d3e2179abd6d00ebd70bff6273f37fb3e0cc209f48b39d00cbf/requests-2.34.2.tar.gz", hash = "sha256:f288924cae4e29463698d6d60bc6a4da69c89185ad1e0bcc4104f584e960b9ed", size = 142856, upload-time = "2026-05-14T19:25:27.735Z" }wheels = [ { url = "https://files.pythonhosted.org/packages/a0/f4/c67b0b3f1b9245e8d266f0f112c500d50e5b4e83cb6f3b71b6528104182a/requests-2.34.2-py3-none-any.whl", hash = "sha256:2a0d60c172f83ac6ab31e4554906c0f3b3588d37b5cb939b1c061f4907e278e0", size = 73075, upload-time = "2026-05-14T19:25:26.443Z" },]
[[package]]name = "safetensors"version = "0.8.0"source = { registry = "https://pypi.org/simple" }sdist = { url = "https://files.pythonhosted.org/packages/45/06/f955dbbb1859e3bd23c8ac6141af5106e7ad5fedec4a3a6e3d60f94b7001/safetensors-0.8.0.tar.gz", hash = "sha256:fabaf3e0f18a6618d9b36560682562157f77c2b71fcffc7b432be2baed9d753d", size = 325846, upload-time = "2026-06-09T07:52:25.563Z" }wheels = [ { url = "https://files.pythonhosted.org/packages/39/a0/f718cda65b05407d228f97602cf60dca269c979867aa5beb25410de26cd3/safetensors-0.8.0-cp310-abi3-macosx_10_12_x86_64.whl", hash = "sha256:c554f85858e05226d3c2828e32395e677434685d6d94594a41643361c5e837f0", size = 473568, upload-time = "2026-06-09T07:52:18.829Z" }, { url = "https://files.pythonhosted.org/packages/f5/b1/fa7c600e7dceae12e9606c7578cbc9ff1e1ed55844883ee5c92205e86226/safetensors-0.8.0-cp310-abi3-macosx_11_0_arm64.whl", hash = "sha256:c80201d22cbf405b80647a60ada77bba06c8fba2da2743ba1e89cdcc39a81f25", size = 484562, upload-time = "2026-06-09T07:52:17.518Z" }, { url = "https://files.pythonhosted.org/packages/09/7d/65a7de0af421317bb36a067241e4235fff194eed60b961ed6d3f59a3fc60/safetensors-0.8.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7a46e5ff292c356d6991e60942ba7f79817682d3a2cef0702136448cb9c4d235", size = 502844, upload-time = "2026-06-09T07:52:07.624Z" }, { url = "https://files.pythonhosted.org/packages/91/4f/3175c9d75634e0e0dda0082794193521035edd7c70a6f212bf33ca06ddf4/safetensors-0.8.0-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:4124502b78f03534117c848f87a39b8f31e577b15eff423bf8bfb95f2a8c30d0", size = 511823, upload-time = "2026-06-09T07:52:09.565Z" }, { url = "https://files.pythonhosted.org/packages/20/87/846c289e7aa2299eff406335717cf43ce8777194ece8aad75772e0411615/safetensors-0.8.0-cp310-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7bc0a787ba8a35be368ee3574edfa2b1ad389eebd0a72e482ae275490e3f6c98", size = 633461, upload-time = "2026-06-09T07:52:11.128Z" }, { url = "https://files.pythonhosted.org/packages/76/22/8d64d9df2c45d5ded401df889d0ad90882804ca172d79ec4f0df8f727fe0/safetensors-0.8.0-cp310-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:040070828e36dc8e122178bbbd5830ff9e97920affb84cbe0f46442497bed358", size = 545148, upload-time = "2026-06-09T07:52:13.603Z" }, { url = "https://files.pythonhosted.org/packages/28/50/f203ff3a3ddfe19308efc83c5a3a29ed02bf786732ec35e68bf9162f3365/safetensors-0.8.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fd6f3f93c9a0a7cc2788ee63fb763353d4bd2e89b0751bc78fcf7dda00bea774", size = 516040, upload-time = "2026-06-09T07:52:16.29Z" }, { url = "https://files.pythonhosted.org/packages/46/fb/cdaed17ceb2948784fd9c36b6fd3e951b608547cea81a48e8ee6f8cfdfcb/safetensors-0.8.0-cp310-abi3-manylinux_2_31_riscv64.whl", hash = "sha256:fcdd41ec4628fee5799f807c73c353629130fbd942aa23d83c623dd6c9d52d78", size = 513832, upload-time = "2026-06-09T07:52:12.37Z" }, { url = "https://files.pythonhosted.org/packages/0d/49/1e15de264dcc3b77943d2d0c56a95809956883b1c2d6d585c792523f180b/safetensors-0.8.0-cp310-abi3-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:8e9f537aa183a38ace122d27303dcd986b26bd2a7591f9181d7f0c396f4677ca", size = 559930, upload-time = "2026-06-09T07:52:14.743Z" }, { url = "https://files.pythonhosted.org/packages/2a/43/bf38443278eab4b1be1fce2931e2b012ad9cb7df52ada751d0aab8f7659a/safetensors-0.8.0-cp310-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:87eec7ffed2b809f05a398a8becb7d013f19f7837cd15d9748580d6cf30dbaf4", size = 678670, upload-time = "2026-06-09T07:52:20.032Z" }, { url = "https://files.pythonhosted.org/packages/72/e3/68cd3fa5b48488e84add63e04cb12f3bc28ae4638c06d4508c6e88823d0e/safetensors-0.8.0-cp310-abi3-musllinux_1_2_armv7l.whl", hash = "sha256:4a95ae2b05d7726d751da4ebf626a2ca782b706e101bd894c95bc2450b1cffcc", size = 786679, upload-time = "2026-06-09T07:52:21.322Z" }, { url = "https://files.pythonhosted.org/packages/29/4b/1c19c509d56e01f4fbb3d0a2e597450f6cc04d1d56cf52defb0a62dfd715/safetensors-0.8.0-cp310-abi3-musllinux_1_2_i686.whl", hash = "sha256:3ae091f16662658bdc019a4ff6cb4c085bb7d725eb5978b183ffd265863b6d2d", size = 765683, upload-time = "2026-06-09T07:52:22.594Z" }, { url = "https://files.pythonhosted.org/packages/27/43/41c1621732edd934d868a00d1b891584c892a7b62a9aab82ea5a0a5623ee/safetensors-0.8.0-cp310-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:8e080062fcde23be189565e1c3305d16751a218ecf9412c8601e64204eb6f846", size = 722361, upload-time = "2026-06-09T07:52:23.924Z" }, { url = "https://files.pythonhosted.org/packages/8e/3f/73ccf82579412b4a71c4ca673f10b5f1f888d7cf5af7fe24f27d30307be4/safetensors-0.8.0-cp310-abi3-win32.whl", hash = "sha256:2ddf52eac562eda224f99acfa7889d02968c1fd59a5b011ae7d8137c37e9c02d", size = 342401, upload-time = "2026-06-09T07:52:28.895Z" }, { url = "https://files.pythonhosted.org/packages/1b/6d/3fba214c1e5e0f69991677ec3bc17023f0421776975e1de0c682dca475e2/safetensors-0.8.0-cp310-abi3-win_amd64.whl", hash = "sha256:096ec1a98435df7beb08853bb5aa9081a84f23d0adc67ed1a0a10550f608373f", size = 355540, upload-time = "2026-06-09T07:52:27.832Z" }, { url = "https://files.pythonhosted.org/packages/8d/fc/7eedc3510d97878876e32774eebbeb61c43f148a96e915c84229a3e967aa/safetensors-0.8.0-cp310-abi3-win_arm64.whl", hash = "sha256:f7838e5135a406ad3e02efdcb8cf2e5397d368b0154537c4fec682dbc544d452", size = 340500, upload-time = "2026-06-09T07:52:26.745Z" },]
[[package]]name = "setuptools"version = "84.0.0"source = { registry = "https://pypi.org/simple" }sdist = { url = "https://files.pythonhosted.org/packages/6d/44/f5da03a8ef95d369145c5bb53050e7877c9f3d312e128605fd9504829143/setuptools-84.0.0.tar.gz", hash = "sha256:f4695c21257f0d9b537ec2692c941d02ee143b7cc1276941349a546573b2ef73", size = 1168449, upload-time = "2026-08-08T18:27:58.365Z" }wheels = [ { url = "https://files.pythonhosted.org/packages/95/9c/c510029fc6ef33a6275cd2c5d3cecd6613dfd6aa401d57c54f1c18852ccf/setuptools-84.0.0-py3-none-any.whl", hash = "sha256:51a52592b3b99e102b609654876bd65f19f999935166d1352678931132b0c670", size = 818216, upload-time = "2026-08-08T18:27:56.719Z" },]
[[package]]name = "sympy"version = "1.14.0"source = { registry = "https://pypi.org/simple" }dependencies = [ { name = "mpmath" },]sdist = { url = "https://files.pythonhosted.org/packages/83/d3/803453b36afefb7c2bb238361cd4ae6125a569b4db67cd9e79846ba2d68c/sympy-1.14.0.tar.gz", hash = "sha256:d3d3fe8df1e5a0b42f0e7bdf50541697dbe7d23746e894990c030e2b05e72517", size = 7793921, upload-time = "2025-04-27T18:05:01.611Z" }wheels = [ { url = "https://files.pythonhosted.org/packages/a2/09/77d55d46fd61b4a135c444fc97158ef34a095e5681d0a6c10b75bf356191/sympy-1.14.0-py3-none-any.whl", hash = "sha256:e091cc3e99d2141a0ba2847328f5479b05d94a6635cb96148ccb3f34671bd8f5", size = 6299353, upload-time = "2025-04-27T18:04:59.103Z" },]
[[package]]name = "timm"version = "1.0.20"source = { registry = "https://pypi.org/simple" }dependencies = [ { name = "huggingface-hub" }, { name = "pyyaml" }, { name = "safetensors" }, { name = "torch" }, { name = "torchvision" },]sdist = { url = "https://files.pythonhosted.org/packages/b5/ba/6f5d96622a4a9fc315da53f58b3ca224c66015efe40aa191df0d523ede7c/timm-1.0.20.tar.gz", hash = "sha256:7468d32a410c359181c1ef961f49c7e213286e0c342bfb898b99534a4221fc54", size = 2360052, upload-time = "2025-09-21T17:26:35.492Z" }wheels = [ { url = "https://files.pythonhosted.org/packages/c5/74/5573615570bf010f788e977ac57c4b49db0aaf6d634134f6a9212d8dcdfd/timm-1.0.20-py3-none-any.whl", hash = "sha256:f6e62f780358476691996c47aa49de87b95cc507edf923c3042f74a07e45b7fe", size = 2504047, upload-time = "2025-09-21T17:26:33.487Z" },]
[[package]]name = "torch"version = "2.8.0"source = { registry = "https://pypi.org/simple" }dependencies = [ { name = "filelock" }, { name = "fsspec" }, { name = "jinja2" }, { name = "networkx" }, { name = "nvidia-cublas-cu12", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" }, { name = "nvidia-cuda-cupti-cu12", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" }, { name = "nvidia-cuda-nvrtc-cu12", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" }, { name = "nvidia-cuda-runtime-cu12", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" }, { name = "nvidia-cudnn-cu12", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" }, { name = "nvidia-cufft-cu12", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" }, { name = "nvidia-cufile-cu12", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" }, { name = "nvidia-curand-cu12", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" }, { name = "nvidia-cusolver-cu12", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" }, { name = "nvidia-cusparse-cu12", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" }, { name = "nvidia-cusparselt-cu12", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" }, { name = "nvidia-nccl-cu12", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" }, { name = "nvidia-nvjitlink-cu12", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" }, { name = "nvidia-nvtx-cu12", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" }, { name = "sympy" }, { name = "triton", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" }, { name = "typing-extensions" },]wheels = [ { url = "https://files.pythonhosted.org/packages/8f/c4/3e7a3887eba14e815e614db70b3b529112d1513d9dae6f4d43e373360b7f/torch-2.8.0-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:220a06fd7af8b653c35d359dfe1aaf32f65aa85befa342629f716acb134b9710", size = 102073391, upload-time = "2025-08-06T14:53:20.937Z" }, { url = "https://files.pythonhosted.org/packages/5a/63/4fdc45a0304536e75a5e1b1bbfb1b56dd0e2743c48ee83ca729f7ce44162/torch-2.8.0-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:c12fa219f51a933d5f80eeb3a7a5d0cbe9168c0a14bbb4055f1979431660879b", size = 888063640, upload-time = "2025-08-06T14:55:05.325Z" }, { url = "https://files.pythonhosted.org/packages/84/57/2f64161769610cf6b1c5ed782bd8a780e18a3c9d48931319f2887fa9d0b1/torch-2.8.0-cp311-cp311-win_amd64.whl", hash = "sha256:8c7ef765e27551b2fbfc0f41bcf270e1292d9bf79f8e0724848b1682be6e80aa", size = 241366752, upload-time = "2025-08-06T14:53:38.692Z" }, { url = "https://files.pythonhosted.org/packages/a4/5e/05a5c46085d9b97e928f3f037081d3d2b87fb4b4195030fc099aaec5effc/torch-2.8.0-cp311-none-macosx_11_0_arm64.whl", hash = "sha256:5ae0524688fb6707c57a530c2325e13bb0090b745ba7b4a2cd6a3ce262572916", size = 73621174, upload-time = "2025-08-06T14:53:25.44Z" },]
[[package]]name = "torchvision"version = "0.23.0"source = { registry = "https://pypi.org/simple" }dependencies = [ { name = "numpy" }, { name = "pillow" }, { name = "torch" },]wheels = [ { url = "https://files.pythonhosted.org/packages/f0/d7/15d3d7bd8d0239211b21673d1bac7bc345a4ad904a8e25bb3fd8a9cf1fbc/torchvision-0.23.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:49aa20e21f0c2bd458c71d7b449776cbd5f16693dd5807195a820612b8a229b7", size = 1856884, upload-time = "2025-08-06T14:58:00.237Z" }, { url = "https://files.pythonhosted.org/packages/dd/14/7b44fe766b7d11e064c539d92a172fa9689a53b69029e24f2f1f51e7dc56/torchvision-0.23.0-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:01dc33ee24c79148aee7cdbcf34ae8a3c9da1674a591e781577b716d233b1fa6", size = 2395543, upload-time = "2025-08-06T14:58:04.373Z" }, { url = "https://files.pythonhosted.org/packages/79/9c/fcb09aff941c8147d9e6aa6c8f67412a05622b0c750bcf796be4c85a58d4/torchvision-0.23.0-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:35c27941831b653f5101edfe62c03d196c13f32139310519e8228f35eae0e96a", size = 8628388, upload-time = "2025-08-06T14:58:07.802Z" }, { url = "https://files.pythonhosted.org/packages/93/40/3415d890eb357b25a8e0a215d32365a88ecc75a283f75c4e919024b22d97/torchvision-0.23.0-cp311-cp311-win_amd64.whl", hash = "sha256:09bfde260e7963a15b80c9e442faa9f021c7e7f877ac0a36ca6561b367185013", size = 1600741, upload-time = "2025-08-06T14:57:59.158Z" },]
[[package]]name = "tqdm"version = "4.70.1"source = { registry = "https://pypi.org/simple" }dependencies = [ { name = "colorama", marker = "sys_platform == 'win32'" },]sdist = { url = "https://files.pythonhosted.org/packages/0d/ea/b2a5bd54b28a324dae8211928b2d730b6547500342c7e6c6dea08bd0a485/tqdm-4.70.1.tar.gz", hash = "sha256:cefd0eca11b2a37a3aee776544d4f4ae913f02688135b5556b8788dfa474afc4", size = 171846, upload-time = "2026-09-11T07:25:16.601Z" }wheels = [ { url = "https://files.pythonhosted.org/packages/a7/03/921a3d3c75785aca9ebfbfcabfbc3a1be12e2ab5265deb026d55a5a3f83e/tqdm-4.70.1-py3-none-any.whl", hash = "sha256:c293e525e6fef9c20e8728fd4612df02a0aa31bb5fe91ecd93e123b1b7bffa73", size = 80199, upload-time = "2026-09-11T07:25:14.599Z" },]
[[package]]name = "triton"version = "3.4.0"source = { registry = "https://pypi.org/simple" }dependencies = [ { name = "setuptools" },]wheels = [ { url = "https://files.pythonhosted.org/packages/7d/39/43325b3b651d50187e591eefa22e236b2981afcebaefd4f2fc0ea99df191/triton-3.4.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7b70f5e6a41e52e48cfc087436c8a28c17ff98db369447bcaff3b887a3ab4467", size = 155531138, upload-time = "2025-07-30T19:58:29.908Z" },]
[[package]]name = "typing-extensions"version = "4.16.0"source = { registry = "https://pypi.org/simple" }sdist = { url = "https://files.pythonhosted.org/packages/f6/cc/6253133b5bb138fc3306cebfbda2c520f545d36b5be2c7255cc528bb45d6/typing_extensions-4.16.0.tar.gz", hash = "sha256:dc983d19a509c94dba722ee6abd33940f7c05a89e243c47e907eb4db6f1a43e5", size = 113555, upload-time = "2026-07-02T08:40:05.92Z" }wheels = [ { url = "https://files.pythonhosted.org/packages/49/d3/b8441a820a491ddfc024b0b0cf0393375b75ea13866d9c66727e54c2fc80/typing_extensions-4.16.0-py3-none-any.whl", hash = "sha256:481caa481374e813c1b176ada14e97f1f67a4539ce9cfeb3f350d78d6370c2e8", size = 45571, upload-time = "2026-07-02T08:40:04.659Z" },]
[[package]]name = "urllib3"version = "2.8.0"source = { registry = "https://pypi.org/simple" }sdist = { url = "https://files.pythonhosted.org/packages/e3/05/b17359e1cefb4f909b5e40b1b90a496d987258916dbbf88e842c729f510e/urllib3-2.8.0.tar.gz", hash = "sha256:63bf2ead4c879426ebf22ef2a781eeb4aa3b4ae798a0435506f8687fd5bb9b63", size = 458972, upload-time = "2026-09-15T19:29:36.253Z" }wheels = [ { url = "https://files.pythonhosted.org/packages/92/9d/c4e665119135114480843e7ab388fa94d8480650450e6f8e26b70d323a4c/urllib3-2.8.0-py3-none-any.whl", hash = "sha256:0cf3cae568d36aa9576b28dfb35f11328f1cb974ca7647d9475ebb86c75ac6e3", size = 135717, upload-time = "2026-09-15T19:29:34.577Z" },]123version https://git-lfs.github.com/spec/v1oid sha256:95a33468cbb03d022c34d85a3fbf913feeef5bcba25294b88530cf4d83f57d3csize 51243220123version https://git-lfs.github.com/spec/v1oid sha256:9d93ace9418ebf60fe05f18e8e4cf1b665a565aa17af1cc233d6ec4d91ce2b0dsize 33692057.gitattributesAdded+2
.gitignoreAdded+17
.python-versionAdded+1
LICENSEAdded+21
LICENSE-APACHE-2.0.txtAdded+202
LICENSE-DINOv3.mdAdded+66
NOTICE.mdAdded+47
README.mdAdded+166
assets/demo.webpAdded

Large File Pointer Details
- SHA256: ee9bc21b121b990703929989e14eb105374a0cfe08190265db91848e751f2c6f
- Pointer size: 132 Bytes
- Size of remote file: 6.84 MB
data.pyAdded+648
models.pyAdded+64
predict_onnx.pyAdded+96
pyproject.tomlAdded+30
targets.pyAdded+33
test_training.pyAdded+610
train.pyAdded+1108
uv.lockAdded+659
weights/grid16.onnxAdded+3
weights/grid9.onnxAdded+3