Skip to content

Commit

Permalink
Merge pull request #36 from hmorimitsu/new_models2
Browse files Browse the repository at this point in the history
New models2
  • Loading branch information
hmorimitsu authored Aug 1, 2022
2 parents 413b9ad + c1be215 commit 44d3b8a
Show file tree
Hide file tree
Showing 99 changed files with 15,142 additions and 381 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/flake8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.6]
python-version: ['3.10']

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
Expand Down
38 changes: 0 additions & 38 deletions .github/workflows/pytest.yml

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/pytest_pip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.6]
python-version: ['3.8']

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install build==0.4.0
python -m pip install --upgrade setuptools wheel
python -m pip install --upgrade setuptools==59.5.0 wheel
python -m pip install --upgrade pytest
- name: Install package and remove local dir
run: |
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# This workflow will install Python dependencies, run tests with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: python

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.9', '3.10']

steps:
- uses: actions/checkout@v3
- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- name: Replace python
uses: jacobtomlinson/gha-find-replace@v2
with:
find: "python>=3.8,<=3.10"
replace: "python==${{ matrix.python-version }}"
regex: false
include: "environment.yml"
- name: Install dependencies
run: |
conda env update --file environment.yml --name base
python -m pip install --upgrade pip setuptools==59.5.0 wheel
python -m pip install --upgrade pytest
- name: Test with pytest
run: |
python -m pytest
41 changes: 41 additions & 0 deletions .github/workflows/pytorch-lightning.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# This workflow will install Python dependencies, run tests with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: pytorch-lightning

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
pytorch-lightning: [1.1.8, 1.2.10, 1.5.10, 1.6.5]

steps:
- uses: actions/checkout@v3
- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- name: Replace pytorch-lightning
uses: jacobtomlinson/gha-find-replace@v2
with:
find: "pytorch-lightning>=1.1.0,<=1.6"
replace: "pytorch-lightning==${{ matrix.pytorch-lightning }}"
regex: false
include: "environment.yml"
- name: Install dependencies
run: |
conda env update --file environment.yml --name base
python -m pip install --upgrade pip setuptools==59.5.0 wheel
python -m pip install --upgrade pytest
- name: Test with pytest
run: |
python -m pytest
41 changes: 41 additions & 0 deletions .github/workflows/pytorch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# This workflow will install Python dependencies, run tests with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: pytorch

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
pytorch: [1.8.1, 1.9.1, 1.10.1, 1.11.0, 1.12.0]

steps:
- uses: actions/checkout@v3
- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- name: Replace pytorch
uses: jacobtomlinson/gha-find-replace@v2
with:
find: "pytorch>=1.8.1,<=1.12"
replace: "pytorch==${{ matrix.pytorch }}"
regex: false
include: "environment.yml"
- name: Install dependencies
run: |
conda env update --file environment.yml --name base
python -m pip install --upgrade pip setuptools==59.5.0 wheel
python -m pip install --upgrade pytest
- name: Test with pytest
run: |
python -m pytest
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# PyTorch Lightning Optical Flow

![GitHub CI flake8 status](https://github.com/hmorimitsu/ptlflow/actions/workflows/flake8.yml/badge.svg)
![GitHub CI pytest status](https://github.com/hmorimitsu/ptlflow/actions/workflows/pytest.yml/badge.svg)
![GitHub CI python status](https://github.com/hmorimitsu/ptlflow/actions/workflows/python.yml/badge.svg)
![GitHub CI pytorch status](https://github.com/hmorimitsu/ptlflow/actions/workflows/pytorch.yml/badge.svg)
![GitHub CI pytorch-lightning status](https://github.com/hmorimitsu/ptlflow/actions/workflows/pytorch-lightning.yml/badge.svg)
![GitHub CI pytest pip status](https://github.com/hmorimitsu/ptlflow/actions/workflows/pytest_pip.yml/badge.svg)
[![DOI](https://zenodo.org/badge/375416785.svg)](https://zenodo.org/badge/latestdoi/375416785)

Expand All @@ -13,6 +15,7 @@ The work and code from many others are present here. I tried to make sure everyt

This is still under development, so some things may not work as intended. I plan to add more models in the future, as well keep improving the platform.

- [What's new](#whats-new)
- [Available models](#available-models)
- [Results](#results)
- [Getting started](#getting-started)
Expand All @@ -21,13 +24,31 @@ This is still under development, so some things may not work as intended. I plan
- [Citing](#citing)
- [Acknowledgements](#acknowledgements)

## What's new

### July 30, 2022 - v0.2.6

- Added new models:
- CRAFT [https://arxiv.org/abs/2203.16896](https://arxiv.org/abs/2203.16896)
- CSFlow [https://arxiv.org/abs/2202.00909](https://arxiv.org/abs/2202.00909)
- FlowFormer [https://arxiv.org/abs/2203.16194](https://arxiv.org/abs/2203.16194)
- GMFlow [https://arxiv.org/abs/2111.13680](https://arxiv.org/abs/2111.13680)
- GMFlowNet [https://arxiv.org/abs/2203.11335](https://arxiv.org/abs/2203.11335)
- Added support for AutoFlow dataset [https://arxiv.org/abs/2104.14544](https://arxiv.org/abs/2104.14544)
- Fix Compatibility with Pytorch Lightning 1.6

## Available models

- CRAFT [https://arxiv.org/abs/2203.16896](https://arxiv.org/abs/2203.16896)
- CSFlow [https://arxiv.org/abs/2202.00909](https://arxiv.org/abs/2202.00909)
- DICL-Flow [https://arxiv.org/abs/2010.14851](https://arxiv.org/abs/2010.14851)
- FastFlowNet [https://arxiv.org/abs/2103.04524](https://arxiv.org/abs/2103.04524)
- FlowFormer [https://arxiv.org/abs/2203.16194](https://arxiv.org/abs/2203.16194)
- FlowNet - [https://arxiv.org/abs/1504.06852](https://arxiv.org/abs/1504.06852)
- FlowNet2 - [https://arxiv.org/abs/1612.01925](https://arxiv.org/abs/1612.01925)
- GMA - [https://arxiv.org/abs/2104.02409](https://arxiv.org/abs/2104.02409)
- GMFlow [https://arxiv.org/abs/2111.13680](https://arxiv.org/abs/2111.13680)
- GMFlowNet [https://arxiv.org/abs/2203.11335](https://arxiv.org/abs/2203.11335)
- HD3 - [https://arxiv.org/abs/1812.06264](https://arxiv.org/abs/1812.06264)
- IRR - [https://arxiv.org/abs/1904.05290](https://arxiv.org/abs/1904.05290)
- LCV - [https://arxiv.org/abs/2007.11431](https://arxiv.org/abs/2007.11431)
Expand Down
22 changes: 11 additions & 11 deletions docs/source/_static/kitti_2012_epe_outlier-drop_kitti_sintel.html

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions docs/source/_static/kitti_2015_epe_outlier-drop_kitti_sintel.html

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions docs/source/_static/sintel_clean_epe_outlier-drop_kitti_sintel.html

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions docs/source/_static/sintel_final_epe_outlier-drop_kitti_sintel.html

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions docs/source/_static/speed_plot-all.html

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions docs/source/models/checkpoint_list.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
PTLFlow name,Original name,Source
craft-kitti-4d99b0c1.ckpt,craft-kitti.pth,https://github.com/askerlee/craft
craft-sintel-ff8e6563.ckpt,craft-sintel.pth,
craft-things-5a41930c.ckpt,craft-things.pth,
csflow-chairs-458a9436.ckpt,CSFlow-chairs.pth,https://github.com/MasterHow/CSFlow
csflow-kitti-dc66357a.ckpt,CSFlow-kitti.pth,
csflow-things-ebdd403b.ckpt,CSFlow-things.pth,
dicl-chairs-fdc24e2f.ckpt,ckpt_chairs.pth.tar,https://github.com/jytime/DICL-Flow
dicl-kitti-4813ccab.ckpt,ckpt_kitti.pth.tar,
dicl-sintel-fa9fc259.ckpt,ckpt_sintel.pth.tar,
Expand All @@ -8,6 +14,10 @@ fastflownet-kitti-6d3526a8.ckpt,fastflownet_ft_kitti.pth,
fastflownet-mix-fd9b8c0d.ckpt,fastflownet_ft_mix.pth,
fastflownet-sintel-6475ea96.ckpt,fastflownet_ft_sintel.pth,
fastflownet-things3d-fc093d29.ckpt,fastflownet_things.pth,
flowformer-chairs-2b34ea4b.ckpt,chairs.pth,https://github.com/drinkingcoder/FlowFormer-Official
flowformer-kitti-1e45a6c8.ckpt,kitti.pth,
flowformer-sintel-27cc959a.ckpt,sintel.pth,
flowformer-things-ab5f3255.ckpt,things.pth,
flownet2-things-d63b53a7.ckpt,FlowNet2_checkpoint.pth.tar,https://github.com/NVIDIA/flownet2-pytorch
flownetc-things-cc8ac7fd.ckpt,FlowNet2-C_checkpoint,
flownetcs-things-4bdecffa.ckpt,FlowNet2-CS_checkpoint,
Expand All @@ -18,6 +28,18 @@ gma-chairs-d4ec321d.ckpt,gma-chairs.pth,https://github.com/zacjiang/GMA
gma-things-90aafb63.ckpt,gma-things.pth,
gma-sintel-98d6f3d0.ckpt,gma-sintel.pth,
gma-kitti-8ca3ec80.ckpt,gma-kitti.pth,
gmflow-chairs-4922131e.ckpt,gmflow_chairs-1d776046.pth,https://github.com/haofeixu/gmflow
gmflow-kitti-af50eb2e.ckpt,gmflow_kitti-285701a8.pth,
gmflow-sintel-d6f83ccd.ckpt,gmflow_sintel-0c07dcb3.pth,
gmflow-things-5a18a9e8.ckpt,gmflow_things-e9887eda.pth,
gmflow_refine-chairs-88cdc009.ckpt,gmflow_with_refine_chairs-020cc9be.pth,
gmflow_refine-kitti-b7bf2fda.ckpt,gmflow_with_refine_kitti-8d3b9786.pth,
gmflow_refine-sintel-ee46a2c4.ckpt,gmflow_with_refine_sintel-3ed1cf48.pth,
gmflow_refine-things-e40899f5.ckpt,gmflow_with_refine_things-36579974.pth,
gmflownet-kitti-712b4660.ckpt,gmflownet-kitti.pth,https://github.com/xiaofeng94/GMFlowNet
gmflownet-things-9f061ac7.ckpt,gmflownet-things.pth,
gmflownet_mix-sintel-33492618.ckpt,gmflownet_mix-sintel.pth,
gmflownet_mix-things-8396f0a1.ckpt,gmflownet_mix-things.pth,
hd3-chairs-0d46c9fd.ckpt,hd3f_chairs-04bf114d.pth,https://github.com/ucbdrive/hd3
hd3-kitti-6eb77dd3.ckpt,hd3f_chairs_things-462a3896.pth,
hd3-sintel-10689995.ckpt,hd3f_chairs_things_kitti-41b15827.pth,
Expand Down
55 changes: 55 additions & 0 deletions docs/source/models/models_list.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,28 @@ Below is a list and a brief explanation about the models currently available on
List of models
==============

CRAFT
-----

`[source code] <https://github.com/hmorimitsu/ptlflow/tree/main/ptlflow/models/craft>`__

- Paper: **CRAFT: Cross-Attentional Flow Transformers for Robust Optical Flow** - `https://arxiv.org/abs/2203.16896 <https://arxiv.org/abs/2203.16896>`_

- Reference code: `https://github.com/askerlee/craft <https://github.com/askerlee/craft>`_

- Model names: ``craft``

CSFlow
------

`[source code] <https://github.com/hmorimitsu/ptlflow/tree/main/ptlflow/models/csflow>`__

- Paper: **CSFlow: Learning optical flow via cross strip correlation for autonomous driving* - `https://arxiv.org/abs/2202.00909 <https://arxiv.org/abs/2202.00909>`_
- Reference code: `https://github.com/MasterHow/CSFlow <https://github.com/MasterHow/CSFlow>`_

- Model names: ``csflow``

DICL-Flow
---------

Expand All @@ -29,6 +51,17 @@ FastFlownet

- Model names: ``fastflownet``

FlowFormer
----------

`[source code] <https://github.com/hmorimitsu/ptlflow/tree/main/ptlflow/models/flowformer>`__

- Paper: **FlowFormer: A Transformer Architecture for Optical Flow* - `https://arxiv.org/abs/2203.16194 <https://arxiv.org/abs/2203.16194>`_
- Reference code: `https://github.com/drinkingcoder/FlowFormer-Official <https://github.com/drinkingcoder/FlowFormer-Official>`_

- Model names: ``flowformer``

Flownet
-------

Expand All @@ -55,6 +88,28 @@ GMA

- Model names: ``gma``

GMFlow
------

`[source code] <https://github.com/hmorimitsu/ptlflow/tree/main/ptlflow/models/gmflow>`__

- Paper: **GMFlow: Learning Optical Flow via Global Matching** - `https://arxiv.org/abs/2111.13680 <https://arxiv.org/abs/2111.13680>`_

- Reference code: `https://github.com/haofeixu/gmflow <https://github.com/haofeixu/gmflow>`_

- Model names: ``gmflow``, ``gmflow_refine``

GMFlowNet
---------

`[source code] <https://github.com/hmorimitsu/ptlflow/tree/main/ptlflow/models/gmflownet>`__

- Paper: **Global Matching with Overlapping Attention for Optical Flow Estimation** - `https://arxiv.org/abs/2203.11335 <https://arxiv.org/abs/2203.11335>`_

- Reference code: `https://github.com/xiaofeng94/GMFlowNet <https://github.com/xiaofeng94/GMFlowNet>`_

- Model names: ``gmflownet``, ``gmflownet_mix``

HD3
---

Expand Down
Loading

0 comments on commit 44d3b8a

Please sign in to comment.