Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor project #32

Merged
merged 107 commits into from
Mar 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
024b9c2
remove vviz
edgarriba Jan 22, 2024
5488f4a
remove cv namespace
edgarriba Jan 22, 2024
ae594ca
use sophus ImageSize
edgarriba Jan 22, 2024
b1d5fa9
attempt sophus MutImage
edgarriba Jan 22, 2024
0519dd7
refactor repo
edgarriba Jan 25, 2024
bc1c051
refactor python bindings
edgarriba Jan 25, 2024
be5030e
improve build
edgarriba Jan 25, 2024
42fe44b
fix target
edgarriba Jan 25, 2024
38152b3
try cross
edgarriba Jan 25, 2024
3f5bba0
try actions-rs/cargo
edgarriba Jan 25, 2024
4388558
use cross flag
edgarriba Jan 25, 2024
8da922a
try x86_64 only
edgarriba Jan 25, 2024
ea960df
disable cross
edgarriba Jan 25, 2024
d0f0aa4
fix format
edgarriba Jan 25, 2024
da567d0
keep trying
edgarriba Jan 25, 2024
d53029c
keep trying
edgarriba Jan 25, 2024
5e9a930
enable cross compile
edgarriba Jan 26, 2024
bd4f283
use ndarray
edgarriba Jan 26, 2024
cdc8a36
remove clone
edgarriba Jan 26, 2024
2c75139
cargo fmt
edgarriba Jan 27, 2024
21fdf2e
fixes in the ci
edgarriba Jan 27, 2024
20d4d75
add missing cross command
edgarriba Jan 27, 2024
11863f5
move dockerfile
edgarriba Jan 27, 2024
e5daff6
move aarch64 docker
edgarriba Jan 27, 2024
99aef24
add cargo
edgarriba Jan 27, 2024
767dcc9
use cargo action for clippy
edgarriba Jan 27, 2024
70be187
use cross
edgarriba Jan 27, 2024
f32ed4d
use directly cross
edgarriba Jan 27, 2024
7a6b792
typo
edgarriba Jan 27, 2024
3e90ad0
cargo action
edgarriba Jan 27, 2024
59df311
install manually nasm
edgarriba Jan 27, 2024
fddeb60
install manually nasm
edgarriba Jan 27, 2024
150fa11
install manually nasm
edgarriba Jan 27, 2024
da76d46
use clippy-check
edgarriba Jan 27, 2024
885347d
not use cross in clippy
edgarriba Jan 27, 2024
275efff
fixes
edgarriba Jan 27, 2024
2e385a4
update crate metadata
edgarriba Jan 27, 2024
97319e0
add hello world example
edgarriba Jan 27, 2024
b0e5349
add examples and to grayscale
edgarriba Jan 27, 2024
e923fb8
add tests
edgarriba Jan 27, 2024
aa791be
add benchmark
edgarriba Jan 27, 2024
5d71594
add rust release workflow (#35)
carlosb1 Jan 28, 2024
07f1f1d
add benchmark
edgarriba Jan 28, 2024
8871d57
implement bilinear interpolation
edgarriba Jan 28, 2024
15d8dbd
add nearest neighbour
edgarriba Jan 28, 2024
f8eca33
some polishing
edgarriba Jan 28, 2024
61ffc33
simplify resize
edgarriba Jan 29, 2024
3ca55fa
small fix
edgarriba Jan 29, 2024
8e569cf
attempt to fix ci
edgarriba Jan 30, 2024
8eb46c1
use cargo nightly
edgarriba Jan 30, 2024
c5858ec
fix ci
edgarriba Jan 30, 2024
14bf440
candle is optional
edgarriba Jan 30, 2024
55b1da8
pass images a reference
edgarriba Jan 30, 2024
1e24af8
implement cast
edgarriba Jan 30, 2024
1cd281e
clarify mutability
edgarriba Jan 30, 2024
d8eea97
small improvements
edgarriba Jan 31, 2024
da0f11c
add some more benchmarks
edgarriba Feb 1, 2024
d7d22c2
small optimisation
edgarriba Feb 1, 2024
7239990
docs and cleanup
edgarriba Feb 2, 2024
e0b661d
add threshold, normalize
edgarriba Feb 2, 2024
af55ae2
add generics
edgarriba Feb 2, 2024
41904ce
add generics
edgarriba Feb 2, 2024
8ed793c
add vanilla distance transform
edgarriba Feb 4, 2024
296a914
attempt improve image api
edgarriba Feb 4, 2024
f2169ba
image channels as generic
edgarriba Feb 6, 2024
1512345
make grayscale float only
edgarriba Feb 12, 2024
41874db
enable back resize
edgarriba Feb 14, 2024
e442e11
revives stuff
edgarriba Feb 15, 2024
17288b0
apply clippy
edgarriba Feb 15, 2024
4d255ea
add types in examples
edgarriba Feb 15, 2024
106fe84
rename from_size
edgarriba Feb 15, 2024
e2fb618
add image docs
edgarriba Feb 15, 2024
7c5fc1f
builder resize options
edgarriba Feb 24, 2024
40c3835
some tweaks in grayscale
edgarriba Feb 24, 2024
7822728
renable threshold
edgarriba Feb 24, 2024
e4dd63e
more docs, io::functional
edgarriba Feb 24, 2024
e265f4f
add horizontal/vertical flip
edgarriba Feb 27, 2024
e87a36c
fix distance transform interface
edgarriba Feb 27, 2024
c449579
image size copy
edgarriba Mar 1, 2024
f9fdc35
to numpy
edgarriba Mar 1, 2024
d9d5486
fix python and decompres api
edgarriba Mar 3, 2024
d9f87dd
add python test workflow
edgarriba Mar 4, 2024
2bb1dcd
add dependencies
edgarriba Mar 4, 2024
4c51f2b
add dev dependencies
edgarriba Mar 4, 2024
844d55c
add torch cpu
edgarriba Mar 4, 2024
b4b04ea
remove makefile filter
edgarriba Mar 4, 2024
cf66634
fixes in ci
edgarriba Mar 4, 2024
25b0b4a
check release workflow
edgarriba Mar 4, 2024
5ba67f8
change working directory
edgarriba Mar 4, 2024
8b01f54
rest release workflow
edgarriba Mar 4, 2024
8477eb4
point to cargo
edgarriba Mar 4, 2024
375a3b8
enable push again
edgarriba Mar 4, 2024
c4a2c7f
bump crate 0.0.2
edgarriba Mar 4, 2024
0a86bb2
Update Makefile
edgarriba Mar 4, 2024
8c627b9
Update py-kornia/pyproject.toml
edgarriba Mar 4, 2024
6296839
Update py-kornia/Cargo.toml
edgarriba Mar 4, 2024
d4f69c7
update cargo toml/lock
edgarriba Mar 4, 2024
001e5c3
restore candle optional
edgarriba Mar 4, 2024
a238c9e
fix clippy
edgarriba Mar 4, 2024
2894a66
rename python test
edgarriba Mar 7, 2024
82895f7
pass image as reference
edgarriba Mar 9, 2024
0799bce
fix reference
edgarriba Mar 9, 2024
df0d4cb
rewrite readme
edgarriba Mar 9, 2024
e5c1d4f
small fix
edgarriba Mar 9, 2024
48cd89e
Update README.md
edgarriba Mar 9, 2024
bcd98e5
add more emojis
edgarriba Mar 9, 2024
a9d15c8
bit more improvement
edgarriba Mar 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 0 additions & 81 deletions .github/workflows/ci.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release
name: Python Release

on:
release:
Expand All @@ -16,6 +16,7 @@ jobs:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
target: [x86_64, aarch64]

steps:
- uses: actions/checkout@v3
- name: Set up QEMU
Expand All @@ -33,7 +34,7 @@ jobs:
container: ghcr.io/kornia/kornia-rs/release-${{ matrix.target }}:latest
target: ${{ matrix.target }}
manylinux: auto
args: --release --out dist -i python${{ matrix.python-version }}
args: --release --out dist -i python${{ matrix.python-version }} -m py-kornia/Cargo.toml
- name: Upload wheels
uses: actions/upload-artifact@v2
with:
Expand Down Expand Up @@ -63,7 +64,7 @@ jobs:
with:
maturin-version: latest
command: build
args: --target ${{ matrix.target }}-apple-darwin --release --out dist -i python${{ matrix.python-version }}
args: --target ${{ matrix.target }}-apple-darwin --release --out dist -i python${{ matrix.python-version }} -m py-kornia/Cargo.toml
- name: Upload wheels
uses: actions/upload-artifact@v2
with:
Expand Down Expand Up @@ -92,7 +93,7 @@ jobs:
with:
maturin-version: latest
command: build
args: --release --out dist -i python${{ matrix.python-version }}
args: --release --out dist -i python${{ matrix.python-version }} -m py-kornia/Cargo.toml
- name: Upload wheels
uses: actions/upload-artifact@v2
with:
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/python_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Python Test

on:
pull_request:
paths:
- Cargo.lock
- py-kornia/**
- .github/workflows/test-python.yml
push:
branches:
- main
paths:
- Cargo.lock
- py-kornia/**
- .github/workflows/test-python.yml

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test-python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: sudo apt-get install -y cmake nasm
- name: Build and test
run: make test-python
61 changes: 61 additions & 0 deletions .github/workflows/rust_lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Rust Lint

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- name: Install system dependencies
run: sudo apt-get install -y cmake nasm
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: clippy
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features
name: Clippy Output

check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: check
args: --all --all-features
use-cross: true
35 changes: 35 additions & 0 deletions .github/workflows/rust_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Rust Release

on:
workflow_dispatch:
release:
types: [published]

jobs:
release:
name: Release Rust
strategy:
matrix:
target:
- x86_64-unknown-linux-gnu
- aarch64-unknown-linux-gnu
runs-on: ubuntu-latest
steps:
- name: Install system dependencies
run: sudo apt-get install -y cmake nasm
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: ${{ matrix.target }}
override: true
- uses: actions-rs/cargo@v1
with:
command: login
args: ${{ secrets.CARGO_REGISTRY_TOKEN_KORNIA }}
- name: Cargo Publish
uses: actions-rs/cargo@v1
with:
command: publish
args: --verbose --target ${{ matrix.target }}
37 changes: 37 additions & 0 deletions .github/workflows/rust_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Rust Test

on:
push:
branches:
- main
pull_request:
branches:
- main

env:
# https://github.com/huggingface/candle/issues/1516
CUDA_COMPUTE_CAP: 75

jobs:
build_and_test:
name: Test Suite - ${{ matrix.target }}
strategy:
matrix:
target:
- x86_64-unknown-linux-gnu
- aarch64-unknown-linux-gnu

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
target: ${{ matrix.target }}
override: true
- uses: actions-rs/cargo@v1
with:
command: test
args: --target ${{ matrix.target }}
use-cross: true
74 changes: 3 additions & 71 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,72 +1,4 @@
/target

# Byte-compiled / optimized / DLL files
__pycache__/
.pytest_cache/
*.py[cod]

# C extensions
*.so

# Distribution / packaging
.Python
.venv/
env/
bin/
build/
develop-eggs/
dist/
eggs/
lib/
lib64/
parts/
sdist/
var/
include/
man/
venv/
*.egg-info/
.installed.cfg
*.egg

# Installer logs
pip-log.txt
pip-delete-this-directory.txt
pip-selfcheck.json

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.cache
nosetests.xml
coverage.xml

# Translations
*.mo

# Mr Developer
.mr.developer.cfg
.project
.pydevproject

# Rope
.ropeproject

# Django stuff:
*.log
*.pot

.DS_Store

# Sphinx documentation
docs/_build/

# PyCharm
.idea/

# VSCode
.vscode/

# Pyenv
.python-version
.venv/
target/
docker/
4 changes: 1 addition & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,4 @@ repos:
- repo: https://github.com/doublify/pre-commit-rust
rev: v1.0
hooks:
- id: fmt
- id: cargo-check
- id: clippy
- id: fmt
Loading
Loading