Skip to content

๐Ÿ Geometric Computer Vision Library for Spatial AI

update contribution guidelines and readme (#3422)

Edgar Riba0c429a8d4776
diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml
index c0e5b1757..945618181 100644
--- a/.github/ISSUE_TEMPLATE/bug-report.yml
+++ b/.github/ISSUE_TEMPLATE/bug-report.yml
@@ -1,6 +1,7 @@
-name: ๐Ÿ› Bug report
+name: ๐Ÿ› Bug Report
description: Create a report to help us improve
-labels: bug, help wanted
+title: "[Bug]: "
+labels: ["bug", "help wanted"]
body:
- type: markdown
@@ -8,19 +9,26 @@ body:
value: |
Thanks for taking the time to fill out this bug report!
+ **Before submitting:**
+ - [ ] I have searched existing issues to ensure this bug hasn't been reported
+ - [ ] I have checked the [help wanted issues](https://github.com/kornia/kornia/issues?q=is%3Aissue%20state%3Aopen%20label%3A%22help%20wanted%22) list
+ - [ ] I have read the [Contributing Guide](https://github.com/kornia/kornia/blob/main/CONTRIBUTING.md)
+
- type: textarea
id: describe-bug
attributes:
- label: Describe the bug
+ label: ๐Ÿ› Describe the bug
description: A clear and concise description of what the bug is.
+ placeholder: |
+ Example: When I call function X with parameters Y, I get error Z instead of the expected result.
validations:
required: true
- type: textarea
id: reproduction-steps
attributes:
- label: Reproduction steps
- description: Steps to reproduce the behavior
+ label: ๐Ÿ”„ Steps to Reproduce
+ description: Steps to reproduce the behavior. Include minimal code example if possible.
value: |
1.
2.
@@ -30,33 +38,56 @@ body:
validations:
required: true
+ - type: textarea
+ id: code-example
+ attributes:
+ label: ๐Ÿ’ป Minimal Code Example
+ description: If applicable, provide a minimal code example that reproduces the bug
+ placeholder: |
+ ```python
+ import kornia
+ # Your minimal code here
+ ```
+ render: python
+ validations:
+ required: false
+
- type: textarea
id: expected-behavior
attributes:
- label: Expected behavior
+ label: โœ… Expected behavior
description: A clear and concise description of what you expected to happen.
validations:
required: true
+ - type: textarea
+ id: actual-behavior
+ attributes:
+ label: โŒ Actual behavior
+ description: What actually happened? Include error messages if any.
+ validations:
+ required: true
+
- type: textarea
id: environment
attributes:
- label: Environment
- description: Please copy and paste the output from our collection script
+ label: ๐Ÿ”ง Environment
+ description: Please provide your environment details
value: |
- ```
+ - Kornia version:
+ - PyTorch version:
+ - Python version:
+ - OS (e.g., Linux, macOS, Windows):
+ - Installation method (pip, conda, from source):
+ - CUDA/cuDNN version (if applicable):
+ - GPU model (if applicable):
+
+ You can also run:
+ ```bash
wget https://raw.githubusercontent.com/pytorch/pytorch/main/torch/utils/collect_env.py
# For security purposes, please check the contents of collect_env.py before running it.
python collect_env.py
```
- - PyTorch Version (e.g., 1.0):
- - OS (e.g., Linux):
- - How you installed PyTorch (`conda`, `pip`, source):
- - Build command you used (if compiling from source):
- - Python version:
- - CUDA/cuDNN version:
- - GPU models and configuration:
- - Any other relevant information:
render: shell
validations:
required: true
@@ -64,5 +95,18 @@ body:
- type: textarea
id: additional-context
attributes:
- label: Additional context
- description: Add any other context about the problem here.
+ label: ๐Ÿ“ Additional context
+ description: Add any other context, screenshots, or relevant information about the problem here.
+ validations:
+ required: false
+
+ - type: checkboxes
+ id: contribution-intent
+ attributes:
+ label: ๐Ÿค Contribution Intent
+ description: Are you planning to contribute a fix for this bug?
+ options:
+ - label: I plan to submit a PR to fix this bug
+ required: false
+ - label: I'm reporting this bug but not planning to fix it
+ required: false
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
index 275ad2ef9..dd931a9fc 100644
--- a/.github/ISSUE_TEMPLATE/config.yml
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -3,12 +3,12 @@ contact_links:
- name: โ“ Ask a question
url: https://github.com/kornia/kornia/discussions
about: Please post questions related to the library in discussions.
- - name: ๐Ÿ’ฌ Slack
- url: https://join.slack.com/t/kornia/shared_invite/zt-csobk21g-2AQRi~X9Uu6PLMuUZdvfjA
+ - name: ๐Ÿ†˜ Help Wanted Issues
+ url: https://github.com/kornia/kornia/issues?q=is%3Aissue%20state%3Aopen%20label%3A%22help%20wanted%22
+ about: Browse issues looking for contributors
+ - name: ๐Ÿ’ฌ Discord
+ url: https://discord.gg/HfnywwpBnD
about: Chat with our community
- - name: LibreCV
- url: https://librecv.org/
- about: Interact with the Computer Vision community
- - name: Twitter
- url: https://twitter.com/kornia_foss
- about: Interact with the rest of the world
+ - name: ๐Ÿ“– Contributing Guide
+ url: https://github.com/kornia/kornia/blob/main/CONTRIBUTING.md
+ about: Read our contribution guidelines and policies
diff --git a/.github/ISSUE_TEMPLATE/documentation.md b/.github/ISSUE_TEMPLATE/documentation.md
deleted file mode 100644
index ff328fb86..000000000
--- a/.github/ISSUE_TEMPLATE/documentation.md
+++ /dev/null
@@ -1,9 +0,0 @@
----
-name: "\U0001F4DA Documentation"
-about: Report an issue related to https://kornia.readthedocs.io
-
----
-
-## ๐Ÿ“š Documentation
-
-<!-- A clear and concise description of what content in https://kornia.readthedocs.io is an issue. If this has to do with the general https://kornia.org website, please file an issue at https://github.com/kornia/kornia.github.io/issues/new/choose instead. If this has to do with https://kornia.org/tutorials, please file an issue at https://github.com/kornia/tutorials/issues/new -->
diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md
deleted file mode 100644
index a79222971..000000000
--- a/.github/ISSUE_TEMPLATE/feature-request.md
+++ /dev/null
@@ -1,36 +0,0 @@
----
-name: "\U0001F680Feature Request"
-about: Suggest an idea for this project
-title: ''
-labels: enhancement, help wanted
-assignees: ''
----
-
-## ๐Ÿš€ Feature
-<!-- A clear and concise description of the feature proposal -->
-
-## Motivation
-
-<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]. If this is related to another GitHub issue, please link here too -->
-
-## Pitch
-
-<!-- A clear and concise description of what you want to happen. -->
-
-## Alternatives
-
-<!-- A clear and concise description of any alternative solutions or features you've considered, if any. -->
-
-## Additional context
-
-<!-- Add any other context or screenshots about the feature request here. -->
-
-______________________________________________________________________
-
-#### Consider also to contribute to Kornia universe projects :)
-
-<sub>
-
-- [**Tutorials**](https://github.com/kornia/tutorials): our repository containing the tutorials.
-
-</sub>
diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml
new file mode 100644
index 000000000..ff986fb34
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/feature-request.yml
@@ -0,0 +1,112 @@
+name: ๐Ÿš€ Feature Request
+description: Suggest an idea or new feature for this project
+title: "[Feature]: "
+labels: ["enhancement", "help wanted"]
+
+body:
+ - type: markdown
+ attributes:
+ value: |
+ Thanks for suggesting a new feature!
+
+ **Before submitting:**
+ - [ ] I have searched existing issues to ensure this feature hasn't been requested
+ - [ ] I have checked the [help wanted issues](https://github.com/kornia/kornia/issues?q=is%3Aissue%20state%3Aopen%20label%3A%22help%20wanted%22) list
+ - [ ] I have read the [Contributing Guide](https://github.com/kornia/kornia/blob/main/CONTRIBUTING.md)
+ - [ ] This feature aligns with Kornia's focus on end-to-end vision models and SOTA Vision/Robotics models
+
+ - type: textarea
+ id: feature-description
+ attributes:
+ label: ๐Ÿš€ Feature Description
+ description: A clear and concise description of the feature you'd like to see
+ placeholder: |
+ Example: Add support for X model/functionality that enables Y use case.
+ validations:
+ required: true
+
+ - type: dropdown
+ id: feature-category
+ attributes:
+ label: ๐Ÿ“‚ Feature Category
+ description: What category does this feature belong to?
+ options:
+ - VLM/VLA Models (Vision Language Models/Agents) - Priority
+ - Robotics Models
+ - Image Processing
+ - Augmentation
+ - Feature Detection/Matching
+ - Geometry
+ - Loss Functions
+ - Models (General)
+ - Documentation
+ - Testing Infrastructure
+ - Other
+ validations:
+ required: true
+
+ - type: textarea
+ id: motivation
+ attributes:
+ label: ๐Ÿ’ก Motivation
+ description: |
+ What problem does this feature solve? Why is this feature needed?
+ If this is related to another GitHub issue, please link it here.
+ placeholder: |
+ Example: I'm always frustrated when [problem]. This feature would help by [benefit].
+ validations:
+ required: true
+
+ - type: textarea
+ id: proposed-solution
+ attributes:
+ label: ๐Ÿ’ญ Proposed Solution
+ description: A clear and concise description of what you want to happen. Include API design if applicable.
+ placeholder: |
+ Example: Add a new function `kornia.feature.new_function()` that accepts X and returns Y.
+ validations:
+ required: true
+
+ - type: textarea
+ id: alternatives
+ attributes:
+ label: ๐Ÿ”„ Alternatives Considered
+ description: A clear and concise description of any alternative solutions or features you've considered
+ validations:
+ required: false
+
+ - type: textarea
+ id: use-cases
+ attributes:
+ label: ๐ŸŽฏ Use Cases
+ description: Describe specific use cases or examples where this feature would be valuable
+ validations:
+ required: false
+
+ - type: textarea
+ id: additional-context
+ attributes:
+ label: ๐Ÿ“ Additional Context
+ description: Add any other context, mockups, diagrams, or references about the feature request here.
+ validations:
+ required: false
+
+ - type: checkboxes
+ id: contribution-intent
+ attributes:
+ label: ๐Ÿค Contribution Intent
+ description: Are you planning to contribute this feature?
+ options:
+ - label: I plan to submit a PR to implement this feature
+ required: false
+ - label: I'm requesting this feature but not planning to implement it
+ required: false
+
+ - type: markdown
+ attributes:
+ value: |
+ ---
+
+ #### ๐Ÿ“š Consider also contributing to Kornia universe projects:
+
+ - [**Tutorials**](https://github.com/kornia/tutorials): Our repository containing the tutorials.
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 52fbba43f..ed8fde677 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,74 +1,62 @@
# Contributing to Kornia
-**Welcome !!** This is the Kornia library contributor's corner. If you are reading this, it means that you have an interest
-in **Differentiable Computer Vision**, and are willing to contribute to the project.
-
-Everyone is welcome to get involved with the project. There are different ways to contribute with your two cents:
-
-1. Ask/Answer questions:
- - Where can you ask questions?
- 1. using the GitHub discussion at Kornia repo: [GH Discussions](https://github.com/kornia/kornia/discussions)
- 2. using the `#kornia` tag in [PyTorch Discuss](https://discuss.pytorch.org)
- 3. using Discord Link [Join Discord](https://discord.gg/HfnywwpBnD)
- - Please, don't use GitHub issues for Q&A.
- - In case you are a developer and want to learn more about the PyTorch ecosystem, we suggest you join the PyTorch
- slack. You can apply using this form: [https://bit.ly/ptslack](https://bit.ly/ptslack)
-
-2. Report bugs through [GitHub issues](https://github.com/kornia/kornia/issues):
- - Do a quick search first to see whether others reported a similar issue.
- - In case you find an unreported bug, please open a new ticket.
- - Try to provide as much information as possible. Report using one of the available templates. Some tips:
- - Clear title and description of the issue.
- - Explain how to reproduce the error.
- - Report your package versions to facilitate the task.
- - Try to include a code sample/test that raises the error.
-
-3. Fix a bug or develop a feature from the roadmap:
- - We will always have an open ticket showing the current roadmap.
- - Pick an unassigned feature (or potentially propose a new one) or an open bug ticket.
- - Follow the instructions from [Developing Kornia](#developing-kornia) to setup your development
- environment and start coding.
- - Check our coding conventions. See more details below.
- - Run the test framework locally and make sure all works as expected before sending a pull request.
- - Open a Pull Request, get the green light from the CI, and get your code merged.
-
-4. Donate resources to the project:
- - In case you are an organization/institution that wants to give support, sponsor, or just use the project, please
- contact us.
- - [opencollective.com/kornia](https://opencollective.com/kornia)
- - [github.com/sponsors/kornia](https://github.com/sponsors/kornia)
- - We are open to starting any kind of collaboration and hearing feedback from you.
- - We pretend to provide features on demand. Reach us!
- - Currently looking for some kind of server donation to test *CUDA* code. (Please contact us).
-# Developing Kornia
+Welcome! This guide will help you contribute to Kornia.
+
+## Policies and Guidelines
+
+- **15-Day Rule**: PRs with no activity for 15+ days will be automatically closed.
+- **Quality Control**: AI-generated PRs without human oversight will be flagged. If a PR doesn't improve after review iterations, it will be closed.
+- **Transparency**: All discussions must be public.
+
+We're all volunteers. These policies help us focus on high-impact work.
-To start to develop, please follow the steps below:
+## Ways to Contribute
-1. Fork the [kornia repository](https://github.com/kornia/kornia) by clicking on the
-[fork](https://github.com/kornia/kornia/fork) button on the repository page. This will create a copy of the Kornia
-repository under your GitHub account.
+1. **Ask/Answer questions:**
+ - [GitHub Discussions](https://github.com/kornia/kornia/discussions)
+ - `#kornia` tag in [PyTorch Discuss](https://discuss.pytorch.org)
+ - [Discord](https://discord.gg/HfnywwpBnD)
+ - Don't use GitHub issues for Q&A.
+2. **Report bugs** via [GitHub issues](https://github.com/kornia/kornia/issues):
+ - Search for existing issues first.
+ - Use the bug report template.
+ - Include: clear description, reproduction steps, package versions, and code sample.
+
+3. **Fix bugs or add features:**
+ - Check [help wanted issues](https://github.com/kornia/kornia/issues?q=is%3Aissue%20state%3Aopen%20label%3A%22help%20wanted%22) for starting points.
+ - **PRs must be linked to an issue** (use "Closes #123" or "Fixes #123").
+ - Follow the [development setup](#developing-kornia) below.
+ - Run local tests before submitting.
+
+4. **Donate resources:**
+ - [Open Collective](https://opencollective.com/kornia)
+ - [GitHub Sponsors](https://github.com/sponsors/kornia)
+ - We're looking for CUDA server donations for testing.
+
+# Developing Kornia
-2. Clone your fork of Kornia, and add the Kornia repository as a remote:
+## Setup
+
+1. **Fork** the [repository](https://github.com/kornia/kornia/fork)
+
+2. **Clone your fork** and add upstream:
```bash
$ git clone [email protected]:<your Github username>/kornia.git
$ cd kornia
$ git remote add upstream https://github.com/kornia/kornia.git
```
-3. Create a new branch with a meaningful name reflecting your contribution. See an example:
- ```bash
- $ git checkout upstream/main -b feat/foo_feature
- # or
- $ git checkout upstream/main -b fix/bar_bug
- ```
- ๐Ÿšจ **Do not** work on the `main` branch!
-
-4. Creating a development environment
+3. **Create a branch** (don't work on `main`):
+ ```bash
+ git checkout upstream/main -b feat/foo_feature
+ # or
+ git checkout upstream/main -b fix/bar_bug
+ ```
- **Using Pixi (Recommended)**
+4. **Development environment**
- Kornia uses [pixi](https://pixi.sh) for fast Python package management and environment management. Pixi provides a unified way to manage dependencies, environments, and tasks across different platforms.
+ We use [pixi](https://pixi.sh) for package and environment management.
**Install Pixi:**
@@ -148,145 +136,54 @@ repository under your GitHub account.
pixi run test
```
- **Dependency Management:**
+ **Dependencies:** Defined in `pyproject.toml`. Update it and run `pixi install`.
- Kornia uses `pixi.toml` for dependency management. The configuration includes:
+ **CUDA:** The CUDA environment uses PyTorch with CUDA 12.1. Run `pixi run -e cuda install` to set it up.
- - **Environments**: `default` (Python 3.11), `cuda` (CUDA development), `py311`, `py312`, `py313` (specific Python versions)
- - **Dependencies**: Defined in `pyproject.toml` and managed by pixi
- - **Tasks**: Common development tasks are defined in `pixi.toml`
+5. **Develop and test:**
- To add new dependencies, update `pyproject.toml` and then:
+ **Requirements:**
+ - No AI-generated code without human oversight
+ - **All local tests must pass before submitting PRs**
+ Create test cases for your code. Run tests with:
```bash
- pixi install # Updates the environment with new dependencies
- ```
-
- **Note on CUDA development:**
+ # Run all tests
+ pixi run test
- For CUDA development, pixi installs PyTorch from the standard PyPI, but you need to reinstall it with CUDA support:
+ # Run specific test file
+ pixi run test tests/<TEST_TO_RUN>.py
- ```bash
- pixi run -e cuda install # This handles the PyTorch CUDA reinstall automatically
+ # For specific test with pytest options
+ pixi run test tests/<TEST_TO_RUN>.py --dtype=float32,float64 --device=all
```
- The CUDA environment uses PyTorch with CUDA 12.1 by default. The install task automatically handles the reinstall process.
-
-5. Develop the code on your branch, and before creating the pull request, make sure to ensure the code passes the checks.
-
- As you develop your code, you should also create test cases for your code. As well as, In addition to ensuring that
- the other tests continue to pass. You can run the tests with:
- ```bash
- $ pytest tests/<TEST_TO_RUN>.py --dtype=float32,float64 --device=all
- ```
- With the `dtype` argument, run the tests using tensors with all `dtypes` desired. Options: `bfloat16`, `float16`,
- `float32`, `float64`, and `all`.
+ **dtype options:** `bfloat16`, `float16`, `float32`, `float64`, `all`
+ **device options:** `cpu`, `cuda`, `tpu`, `mps`, `all`
- In the same way, the `device`, will run the tests using tensors on the `device` desired. Options: `cpu`, `cuda`,
- `tpu`, `mps`, and `all`.
-
-
- Kornia relies on [pre-commit](https://pre-commit.com) to run code quality tools. Make sure to have `pre-commit`
- under your dev environment, otherwise, you can install the tools manually and run them with the help of the available
- commands of the [Makefile](./Makefile). Read more about the code standards adopted [here](#coding-standards).
+ We use [pre-commit](https://pre-commit.com) for code quality. Install it with `pre-commit install`. See [coding standards](#coding-standards) below.
# Contributing to Documentation
-We welcome contributions to the Kornia documentation! If you'd like to improve our docs, please follow these steps:
-
-1. Set up your development environment as described in the [Developing Kornia](#developing-kornia) section above.
-
-2. Make your changes to the documentation files located in the `docs/` directory.
-
-3. Build the documentation using the provided Makefile:
-
- ```bash
- $ make build-docs
- ```
-
- This command will delete any previously built files and generate the newest version of the documentation.
-
-4. The built documentation will be available in the `docs/build/html/` directory. You can open the main page in your browser by running:
-
- ```bash
- $ open docs/build/html/index.html
- ```
-
-5. Review your changes in the browser to ensure they appear as expected.
-
-6. Once you're satisfied with your changes, commit them and submit a pull request following the guidelines in the [Pull Request](#pull-request) section below.
-
-## Benchmarking
-
-We have a benchmark suite configured in [benchmarks/](./benchmarks/). We used the
- [pytest-benchmark](https://pypi.org/project/pytest-benchmark/) library to benchmark our function units.
-
-Our [Makefile](./Makefile) has an `benchmark` command as an alias on how to run our benchmarks.
-
-```console
-# To run all suite
-$ make benchmark
-
-# To run a specific file you can pass `BENCHMARK_SOURCE`
-$ make benchmark BENCHMARK_SOURCE=benchmarks/augmentation/2d_geometric_test.py
-
-# To run a specific benchmark you use `BENCHMARK_SOURCE` as the pytest standard behaviour
-$ make benchmark BENCHMARK_SOURCE=benchmarks/augmentation/2d_geometric_test.py::test_aug_2d_elastic_transform
-
-# To update the optimizer backends desired to execute you can pass `BENCHMARK_BACKENDS=`
-$ make benchmark BENCHMARK_BACKENDS='inductor,eager'
-
-# To pass other options to the runner, you can use `BENCHMARK_OPTS`
-# Example, setup to run the benchmark on cuda on verbose mode
-$ make benchmark BENCHMARK_OPTS='--device=cuda -vv'
-```
-
-We use the same tests generator suite, so you can set up the device within `--device`, the dtype within
-`--dtype`, and the optimizer backend within `--optimizer`.
-
-The optimizer backend supported on the suite, is the torch compile backend on non-experimental mode,
- and the `''` or `None` which will do the same as `eager` mode and do anything, and `'jit'` which will
- try to `torch.jit.script` the operation.
-
-You can use the `BENCHMARK_OPTS` on `make benchmark` to overload the default options we use on pytest-benchmark.
-
-We are using as default:
-- the warmup, because the optimizer/jit may had an overhead.
-- the group: to display the benchmark per each test
-- the precision: to have a better precision on the results
-- the default for `BENCHMARK_BACKENDS` are `'inductor,eager'`.
-- the default for `BENCHMARK_SOURCE` is `benchmarks/`.
-
-You can also run the benchmark within docker:
-```console
-$ make benchmark-docker
-```
-
-which will build and run the image [docker/Dockerfile.benchmark](docker/Dockerfile.benchmark).
- The benchmark command can be used within `BENCHMARK_BACKENDS` and `BENCHMARK_SOURCE`.
+1. Set up your development environment (see [above](#developing-kornia))
+2. Edit files in `docs/`
+3. Build docs: `make build-docs`
+4. Preview: `open docs/build/html/index.html`
+5. Submit a PR following the [Pull Request](#pull-request) guidelines
# Coding Standards
-This section provides general guidance for developing code for the project. The following rules will serve as a guide in
-writing high-quality code that will allow us to scale the project and ensure that the code base remains readable and
-maintainable.
-
- Use meaningful names for variables, functions, and classes.
-- Write small incremental changes:
+- **Write small incremental changes:**
+ - Commit small, logical changes
+ - Write clear commit messages
+ - Avoid large files
- - To have a linear and clean commits history, we recommend committing each small change that you do to the
- source code.
- - Clear commit messages will help to understand the progress of your work.
- - Please, avoid pushing large files.
-
-- Add tests:
- - Tests are crucial and we expect you to write unit tests for each of the functionalities that you implement.
- It is also a good idea to group the tests for functionalities
- - At [testing/](./testing/) directory we have a bunch of functions to help you to produce meaningful tests. Feel free,
- to add any functionality that you think is essential and can be used with the test suite. Under this
- testing, directory should go all code which are needed under the tests and aren't tests or pytest configs (fixtures,
- etc).
+- **Add tests:**
+ - Write unit tests for each functionality
+ - Use helpers from [testing/](./testing/)
+ - Put test utilities (not tests or fixtures) in `testing/`
```python
from testing.base import BaseTester
@@ -339,9 +236,7 @@ maintainable.
pass
```
-- Tests should cover different devices (`CPU`, `CUDA`, etc), dtypes, and different input batch sizes. The `device`, and
- `dtype`, are generated from the arguments (`--dtype` and `--device`) as explained before. These arguments when invoking the
- tests suits with pytest, will generate all possibilities, providing fixtures for all functions. See an example:
+- **Test coverage:** Cover different devices, dtypes, and batch sizes. Use `--dtype` and `--device` pytest arguments to generate test combinations:
```python
import pytest
@@ -352,16 +247,12 @@ maintainable.
assert x.shape == (batch_size, 2, 3)
```
-- We give support to static type checker for Python >= 3.11
-
- - Please, read
- [MyPy cheatsheet](https://mypy.readthedocs.io/en/stable/cheat_sheet_py3.html#type-hints-cheat-sheet-python-3) for
- Python 3.
- - It is recommended to use typing inside the function, **when** it would increase readability.
- - Try to use all things available under `kornia.core`, e.g. `from kornia.core import Tensor`
- - For modules which not support anymore `JIT` consider, adding `from __future__ import annotations`, to enable the
- new features of typing.
- - **Always** type function input and output, e.g.:
+- **Type hints** (Python >= 3.11):
+ - Use typing when it improves readability
+ - Import from `kornia.core`, e.g. `from kornia.core import Tensor`
+ - For non-JIT modules, use `from __future__ import annotations`
+ - **Always** type function inputs and outputs:
+ - Run type checking with `pixi run typecheck` (uses `ty`)
```python
from __future__ import annotations
from kornia.core import Tensor
@@ -375,54 +266,39 @@ maintainable.
) -> Tensor:
```
-- We suggest using new Python 3's f-Strings improved string formatting syntax:
-
- Guidelines: [PEP 498 - Literal String Interpolation](https://peps.python.org/pep-0498/)
-
-- Format your code:
-
- - We follow [PEP8 style guide](https://www.python.org/dev/peps/pep-0008).
- - Use `pre-commit` to autoformat each commit before push: [pre-commit.com](https://pre-commit.com)
- To do so, just install it for this repository by running the command: `pre-commit install` on your terminal
-
-- Changes to PEP8:
- - Line length is 120 characters.
- - W504 (line break after binary operator) is sometimes acceptable. E.g.
+- **Code style:**
+ - Follow [PEP8](https://www.python.org/dev/peps/pep-0008/)
+ - Use f-strings: [PEP 498](https://peps.python.org/pep-0498/)
+ - Line length: 120 characters
+ - W504 (line break after binary operator) is sometimes acceptable. Example:
```python
determinant = A[:, :, 0:1, 0:1] * A[:, :, 1:2, 1:2] -
A[:, :, 0:1, 1:2] * A[:, :, 1:2, 0:1])
```
-- Using 3rd party libraries:
- - Everything from the standard library (https://docs.python.org/3/library/) and PyTorch (https://pytorch.org/) is OK.
- It doesnโ€™t mean, that one should import `urllib` just because, but doing it when needed is fine.
+- **Third-party libraries:** Not allowed. Only PyTorch.
# Pull Request
-Once you finish implementing a feature or bug fix, please send a Pull Request to https://github.com/kornia/kornia
-through the website.
-
-If you are not familiar with creating a Pull Request, here are some guides:
+**Requirements:**
+- Link PR to an issue (use "Closes #123" or "Fixes #123")
+- Pass all local tests before submission
+- 15-Day Rule: Inactive PRs (>15 days) will be closed
+- Quality: AI-generated PRs without oversight will be flagged/closed
+- Transparency: Keep discussions public
-- http://stackoverflow.com/questions/14680711/how-to-do-a-github-pull-request
-- https://help.github.com/articles/creating-a-pull-request
+**Note:** Tickets may be closed during cleanup. Feel free to reopen if you plan to finish the work.
-Once your pull request is created, our continuous build system will check your pull request. Continuous build will
-test that:
-- [pytest](https://docs.pytest.org/en/latest) all tests pass.
-- Test coverage remains high. Please add unit tests so we maintain our code coverage.
-- Typing with [mypy](http://mypy-lang.org) type checks the Python code.
-- If the docs can be generated successfully
-- [pre-commit ci](https://pre-commit.ci)
- - [ruff](https://pypi.org/project/ruff/) accepts the code style (our guidelines are based on PEP8) and checks if the code
- is well formatted
- - [docformatter](https://pypi.org/project/docformatter/) checks if the code docstrings are well formatted
- - and some other checks. Check our [pre-commit config](./.pre-commit-config.yaml)
+**CI checks:**
+- All tests pass
+- Test coverage maintained
+- Type checking (ty)
+- Documentation builds successfully
+- Code formatting (ruff, docformatter via pre-commit)
-If your code fails one of these checks, you will be expected to fix your pull request before it is considered.
+Fix any failing checks before your PR will be considered.
-# Licence
+# License
-By contributing to the project, you agree that your contributions will be licensed under the Apache LICENSE. Check the
-complete license [here](./LICENSE)
+By contributing, you agree to license your contributions under the Apache License. See [LICENSE](./LICENSE).
diff --git a/README.md b/README.md
index be7912e2a..f4fa4512c 100644
--- a/README.md
+++ b/README.md
@@ -25,7 +25,9 @@ English | [็ฎ€ไฝ“ไธญๆ–‡](README_zh-CN.md)
</p>
</div>
-**Kornia** is a differentiable computer vision library that provides a rich set of differentiable image processing and geometric vision algorithms. Built on top of [PyTorch](https://pytorch.org), Kornia integrates seamlessly into existing AI workflows, allowing you to leverage powerful [batch transformations](), [auto-differentiation]() and [GPU acceleration](). Whether youโ€™re working on image transformations, augmentations, or AI-driven image processing, Kornia equips you with the tools you need to bring your ideas to life.
+**Kornia** is a differentiable computer vision library that provides a rich set of differentiable image processing and geometric vision algorithms. Built on top of [PyTorch](https://pytorch.org), Kornia integrates seamlessly into existing AI workflows, allowing you to leverage powerful [batch transformations](), [auto-differentiation]() and [GPU acceleration](). Whether you're working on image transformations, augmentations, or AI-driven image processing, Kornia equips you with the tools you need to bring your ideas to life.
+
+> **๐Ÿ“ข Announcement**: Kornia is shifting towards end-to-end vision models. We are focusing on integrating state-of-the-art Vision Language Models (VLM) and Vision Language Agents (VLA) to provide comprehensive end-to-end vision solutions.
## Key Components
1. **Differentiable Image Processing**<br>
@@ -220,13 +222,16 @@ Are you passionate about computer vision, AI, and open-source development? Join
We are excited to announce our latest advancement: a new initiative designed to seamlessly integrate lightweight AI models into Kornia.
We aim to run any models as smooth as big models such as StableDiffusion, to support them well in many perspectives.
-We have already included a selection of lightweight AI models like [YuNet (Face Detection)](), [Loftr (Feature Matching)](), and [SAM (Segmentation)](). Now, we're looking for contributors to help us:
+**Priority Focus: VLM/VLA Models**
+
+Our primary focus is on integrating **Vision Language Models (VLM)** and **Vision Language Agents (VLA)** to enable end-to-end vision solutions. We're actively seeking contributors to help us:
+
+- **VLM/VLA Integration (Priority)**: Implement and integrate state-of-the-art Vision Language Models and Vision Language Agents. This includes models like Qwen2.5-VL, SAM-3, and other cutting-edge VLM/VLA architectures. If you are a researcher working on VLM/VLA models, Kornia is an excellent place for you to promote your model!
- Expand the Model Selection: Import decent models into our library. If you are a researcher, Kornia is an excellent place for you to promote your model!
- Model Optimization: Work on optimizing models to reduce their computational footprint while maintaining accuracy and performance. You may start from offering ONNX support!
- Model Documentation: Create detailed guides and examples to help users get the most out of these models in their projects.
-
### Documentation And Tutorial Optimization
Kornia's foundation lies in its extensive collection of classic computer vision operators, providing robust tools for image processing, feature extraction, and geometric transformations. We continuously seek for contributors to help us improve our documentation and present nice tutorials to our users.