mirror of
https://github.com/open-mmlab/mmcv.git
synced 2025-06-03 21:54:52 +08:00
Fix the compiling bug when using pip install mmcv
(#88)
* rename flowWarp to FlowWarp * fix the compiling bug when using pip install * update version to v0.2.10
This commit is contained in:
parent
0ad15a508e
commit
e5ca8846c5
1
MANIFEST.in
Normal file
1
MANIFEST.in
Normal file
@ -0,0 +1 @@
|
|||||||
|
include mmcv/video/optflow_warp/*.hpp
|
@ -1 +1 @@
|
|||||||
__version__ = '0.2.9'
|
__version__ = '0.2.10'
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#include <flow_warp.hpp>
|
#include "flow_warp.hpp"
|
||||||
|
|
||||||
void flowWarp(double* img, double* flow, double* out, const int height,
|
void FlowWarp(double* img, double* flow, double* out, const int height,
|
||||||
const int width, const int channels, const int filling_value = 0,
|
const int width, const int channels, const int filling_value = 0,
|
||||||
const int interpolateMode = 0) {
|
const int interpolateMode = 0) {
|
||||||
for (int h = 0; h < height; h++) {
|
for (int h = 0; h < height; h++) {
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
void flowWarp(double* img, double* flow1, double* out, const int height,
|
void FlowWarp(double* img, double* flow1, double* out, const int height,
|
||||||
const int width, const int channels, const int filling_value,
|
const int width, const int channels, const int filling_value,
|
||||||
const int interpolateMode);
|
const int interpolateMode);
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ cimport numpy as np
|
|||||||
np.import_array()
|
np.import_array()
|
||||||
|
|
||||||
cdef extern from "flow_warp.hpp":
|
cdef extern from "flow_warp.hpp":
|
||||||
void flowWarp(double* img, double* flow1, double* out, const int height, const int width, const int channels, const int filling_value, const int interpolateMode)
|
void FlowWarp(double* img, double* flow1, double* out, const int height, const int width, const int channels, const int filling_value, const int interpolateMode)
|
||||||
|
|
||||||
def flow_warp_c(np.ndarray[double, ndim=3, mode="c"] img_array not None,
|
def flow_warp_c(np.ndarray[double, ndim=3, mode="c"] img_array not None,
|
||||||
np.ndarray[double, ndim=3, mode="c"] flow_array not None,
|
np.ndarray[double, ndim=3, mode="c"] flow_array not None,
|
||||||
@ -15,7 +15,7 @@ def flow_warp_c(np.ndarray[double, ndim=3, mode="c"] img_array not None,
|
|||||||
|
|
||||||
out_array = np.zeros_like(img_array)
|
out_array = np.zeros_like(img_array)
|
||||||
|
|
||||||
flowWarp(<double*> np.PyArray_DATA(img_array),
|
FlowWarp(<double*> np.PyArray_DATA(img_array),
|
||||||
<double*> np.PyArray_DATA(flow_array),
|
<double*> np.PyArray_DATA(flow_array),
|
||||||
<double*> np.PyArray_DATA(out_array),
|
<double*> np.PyArray_DATA(out_array),
|
||||||
out_array.shape[0],
|
out_array.shape[0],
|
||||||
|
2
setup.py
2
setup.py
@ -36,7 +36,7 @@ EXT_MODULES = [
|
|||||||
'./mmcv/video/optflow_warp/flow_warp.cpp',
|
'./mmcv/video/optflow_warp/flow_warp.cpp',
|
||||||
'./mmcv/video/optflow_warp/flow_warp_module.pyx'
|
'./mmcv/video/optflow_warp/flow_warp_module.pyx'
|
||||||
],
|
],
|
||||||
include_dirs=[numpy.get_include(), './mmcv/video/optflow_warp/'],
|
include_dirs=[numpy.get_include()],
|
||||||
language="c++",
|
language="c++",
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user