Skip to content

Commit

Permalink
update readme and equilib versions
Browse files Browse the repository at this point in the history
  • Loading branch information
haruishi43 committed Dec 22, 2020
1 parent b2e0553 commit c071de4
Show file tree
Hide file tree
Showing 8 changed files with 107 additions and 119 deletions.
4 changes: 4 additions & 0 deletions .readme/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@
## Grid Sample

- [`grid_sample`](grid_sample.md)

## Benchmarks

- [`bencmarks`](benchmarks.md
135 changes: 99 additions & 36 deletions .readme/benchmarks.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,99 @@
tests/test_cube2equi.py test_numpy_single
Func:run_cube2equi: 0.0360
.test_numpy_batch
Func:run_cube2equi: 0.1180
.test_torch_single
Func:run_cube2equi: 0.0218
.test_torch_batch
Func:run_cube2equi: 0.0199
.
tests/test_equi2cube.py test_numpy_single
Func:run_equi2cube: 0.1174
.test_numpy_batch
Func:run_equi2cube: 0.4759
.test_torch_single
Func:run_equi2cube: 0.0060
.test_torch_batch
Func:run_equi2cube: 0.0205
.
tests/test_equi2equi.py test_numpy_single
Func:run_equi2equi: 2.4446
.test_numpy_batch
Func:run_equi2equi: 9.8693
.test_torch_single
Func:run_equi2equi: 0.1816
.test_torch_batch
Func:run_equi2equi: 0.5867
.
tests/test_equi2pers.py test_numpy_single
Func:run_equi2pers: 0.0734
.test_numpy_batch
Func:run_equi2pers: 0.2994
.test_torch_single
Func:run_equi2pers: 0.0026
.test_torch_batch
Func:run_equi2pers: 0.0084
.
# Benchmarks

Environment:
- CPU: Intel i9-9960X CPU @ 3.10 GHz
- GPU: Nvidia Qudaro RTX 8000
- RAM: 128 GB

RAM usage doesn't exceed 20 GB, GPU memory usage at batch 64 is roughly 45 GB.

**Transform**|** Type**|** Method**|** Input Size**|** Output Size**|** Batch Size**|** Time (seconds)**
:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:
cube2equi| numpy| default| 256x256| 480x240| 1| 0.0360
cube2equi| numpy| default| 256x256| 480x240| 4| 0.1180
cube2equi| numpy| default| 256x256| 480x240| 16| 0.4512
cube2equi| numpy| default| 256x256| 480x240| 32| 1.0650
cube2equi| numpy| default| 256x256| 480x240| 64| 2.1363
cube2equi| torch| default| 256x256| 480x240| 1| 0.0218
cube2equi| torch| default| 256x256| 480x240| 4| 0.0199
cube2equi| torch| default| 256x256| 480x240| 16| 0.0228
cube2equi| torch| default| 256x256| 480x240| 32| 0.0335
cube2equi| torch| default| 256x256| 480x240| 64| 0.0438
equi2cube| numpy| default| 4000x2000| 256x256| 1| 0.1174
equi2cube| numpy| default| 4000x2000| 256x256| 4| 0.4759
equi2cube| numpy| default| 4000x2000| 256x256| 16| 1.8907
equi2cube| numpy| default| 4000x2000| 256x256| 32| 4.9468
equi2cube| numpy| default| 4000x2000| 256x256| 64| 10.0229
equi2cube| torch| default| 4000x2000| 256x256| 1| 0.0155
equi2cube| torch| default| 4000x2000| 256x256| 4| 0.0328
equi2cube| torch| default| 4000x2000| 256x256| 16| 0.0940
equi2cube| torch| default| 4000x2000| 256x256| 32| 0.1698
equi2cube| torch| default| 4000x2000| 256x256| 64| 0.3200
equi2equi| numpy| default| 4000x2000| 640x320| 1| 2.4446
equi2equi| numpy| default| 4000x2000| 640x320| 4| 9.8693
equi2equi| numpy| default| 4000x2000| 640x320| 16| 42.6679
equi2equi| numpy| default| 4000x2000| 640x320| 32| 96.5504
equi2equi| numpy| default| 4000x2000| 640x320| 64| 193.8804
equi2equi| torch| default| 4000x2000| 640x320| 1| 0.1816
equi2equi| torch| default| 4000x2000| 640x320| 4| 0.5867
equi2equi| torch| default| 4000x2000| 640x320| 16| 2.5047
equi2equi| torch| default| 4000x2000| 640x320| 32| 4.4535
equi2equi| torch| default| 4000x2000| 640x320| 64| 8.7202
equi2pers| numpy| default| 4000x2000| 640x480| 1| 0.0734
equi2pers| numpy| default| 4000x2000| 640x480| 4| 0.2994
equi2pers| numpy| default| 4000x2000| 640x480| 16| 1.1730
equi2pers| numpy| default| 4000x2000| 640x480| 32| 2.7934
equi2pers| numpy| default| 4000x2000| 640x480| 64| 5.4712
equi2pers| torch| default| 4000x2000| 640x480| 1| 0.0026
equi2pers| torch| default| 4000x2000| 640x480| 4| 0.0084
equi2pers| torch| default| 4000x2000| 640x480| 16| 0.0293
equi2pers| torch| default| 4000x2000| 640x480| 32| 0.0447
equi2pers| torch| default| 4000x2000| 640x480| 64| 0.0770


---

CSV:
```
Transform, Type, Method, Input Size, Output Size, Batch Size, Time (seconds)
cube2equi, numpy, default, 256x256, 480x240, 1, 0.0360
cube2equi, numpy, default, 256x256, 480x240, 4, 0.1180
cube2equi, numpy, default, 256x256, 480x240, 16, 0.4512
cube2equi, numpy, default, 256x256, 480x240, 32, 1.0650
cube2equi, numpy, default, 256x256, 480x240, 64, 2.1363
cube2equi, torch, default, 256x256, 480x240, 1, 0.0218
cube2equi, torch, default, 256x256, 480x240, 4, 0.0199
cube2equi, torch, default, 256x256, 480x240, 16, 0.0228
cube2equi, torch, default, 256x256, 480x240, 32, 0.0335
cube2equi, torch, default, 256x256, 480x240, 64, 0.0438
equi2cube, numpy, default, 4000x2000, 256x256, 1, 0.1174
equi2cube, numpy, default, 4000x2000, 256x256, 4, 0.4759
equi2cube, numpy, default, 4000x2000, 256x256, 16, 1.8907
equi2cube, numpy, default, 4000x2000, 256x256, 32, 4.9468
equi2cube, numpy, default, 4000x2000, 256x256, 64, 10.0229
equi2cube, torch, default, 4000x2000, 256x256, 1, 0.0155
equi2cube, torch, default, 4000x2000, 256x256, 4, 0.0328
equi2cube, torch, default, 4000x2000, 256x256, 16, 0.0940
equi2cube, torch, default, 4000x2000, 256x256, 32, 0.1698
equi2cube, torch, default, 4000x2000, 256x256, 64, 0.3200
equi2equi, numpy, default, 4000x2000, 640x320, 1, 2.4446
equi2equi, numpy, default, 4000x2000, 640x320, 4, 9.8693
equi2equi, numpy, default, 4000x2000, 640x320, 16, 42.6679
equi2equi, numpy, default, 4000x2000, 640x320, 32, 96.5504
equi2equi, numpy, default, 4000x2000, 640x320, 64, 193.8804
equi2equi, torch, default, 4000x2000, 640x320, 1, 0.1816
equi2equi, torch, default, 4000x2000, 640x320, 4, 0.5867
equi2equi, torch, default, 4000x2000, 640x320, 16, 2.5047
equi2equi, torch, default, 4000x2000, 640x320, 32, 4.4535
equi2equi, torch, default, 4000x2000, 640x320, 64, 8.7202
equi2pers, numpy, default, 4000x2000, 640x480, 1, 0.0734
equi2pers, numpy, default, 4000x2000, 640x480, 4, 0.2994
equi2pers, numpy, default, 4000x2000, 640x480, 16, 1.1730
equi2pers, numpy, default, 4000x2000, 640x480, 32, 2.7934
equi2pers, numpy, default, 4000x2000, 640x480, 64, 5.4712
equi2pers, torch, default, 4000x2000, 640x480, 1, 0.0026
equi2pers, torch, default, 4000x2000, 640x480, 4, 0.0084
equi2pers, torch, default, 4000x2000, 640x480, 16, 0.0293
equi2pers, torch, default, 4000x2000, 640x480, 32, 0.0447
equi2pers, torch, default, 4000x2000, 640x480, 64, 0.0770
```
9 changes: 0 additions & 9 deletions .readme/cube2equi.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,6 @@

Cubemap to equirectangular transformation

## Usage

```Python


```



- `w_out` and `h_out` must be divisible by 8.
- if `w_out, h_out` is large respect to the input cubemap, it may leave some artifacts

Expand Down
24 changes: 1 addition & 23 deletions .readme/equi2cube.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,9 @@
## equi2cube

equirectangular to cubemap transformation

```Python
class SomeEqui2Cube(BaseEqui2Cube):
def __init__(self, w_face: int):
...
def run(self, equi, rot, cube_format, **kwargs):
...
```

### Numpy

```Python
from equilib.equi2cube import NumpyEqui2Cube
```

### PyTorch

```Python
from equilib.equi2cube import TorchEqui2Cube
```

### TODO:

- [x] Implement `numpy`
- [x] Implement `torch`
- [x] Implement `torch` with batches
- [x] Fix rotation axis
- [ ] Implement `c++` with `cuda`
- [ ] Implement `c++` with `cuda`
24 changes: 0 additions & 24 deletions .readme/equi2equi.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,5 @@
## equi2equi

equirectangular to equirectangular transformation

I try to keep a common api that can be used in both `c++`, `numpy`, and `pytorch`.

```Python
class SomeEqui2Equi(BaseEqui2Equi):
def __init__(self, h_out: int, w_out: int):
...
def run(self, src, rot, **kwargs):
...
```

### Numpy

```Python
from equilib.equi2equi import NumpyEqui2Equi
```

### PyTorch

```Python
from equilib.equi2equi import TorchEqui2Equi
```

### TODO:

- [x] Implement `numpy`
Expand Down
25 changes: 0 additions & 25 deletions .readme/equi2pers.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,6 @@

equirectangular to perspective transformation

I try to keep a common api that can be used in both `c++`, `numpy`, and `pytorch`.

```Python
class SomeEqui2Pers(BaseEqui2Pers):
def __init__(self, w_pers, h_pers, fov_x):
...
def run(self, equi, rot, **kwargs):
...
```

### Numpy

```Python
from equilib.equi2pers import NumpyEqui2Pers
```

### PyTorch

```Python
from equilib.equi2pers import TorchEqui2Pers
```

### C++

__WIP__

### TODO:

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ pers_img = equi2pers(
</table>

For more information about how each APIs work, take a look in [.readme](.readme/) or go through example codes in the `tests` or `demo`.
See performance and benchmarking results of the APIs in [.readme/benchmark.md](.readme/benchmark.md).


### Coordinate System:
Expand Down Expand Up @@ -185,7 +186,7 @@ Check [CONTRIBUTING.md](./CONTRIBUTING.md) for more information
### TODO:

- [ ] Documentations for each transform
- [ ] Add graphs and statistics for speed improvements
- [x] Add table and statistics for speed improvements


## Acknowledgements:
Expand Down
2 changes: 1 addition & 1 deletion equilib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"equi2pers",
]

__version__ = "0.2.0"
__version__ = "0.2.1"
__author__ = "Haruya Ishikawa"
__homepage__ = "www.hoge.com"
__description__ = "equirectangular processing"
Expand Down

0 comments on commit c071de4

Please sign in to comment.