Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Serving
提交
a001aec1
S
Serving
项目概览
PaddlePaddle
/
Serving
大约 1 年 前同步成功
通知
185
Star
833
Fork
253
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
105
列表
看板
标记
里程碑
合并请求
10
Wiki
2
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Serving
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
105
Issue
105
列表
看板
标记
里程碑
合并请求
10
合并请求
10
Pages
分析
分析
仓库分析
DevOps
Wiki
2
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
a001aec1
编写于
11月 12, 2020
作者:
B
BohaoWu
提交者:
BohaoWu
11月 13, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add pre-commit.
上级
a832f4bf
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
16 addition
and
11 deletion
+16
-11
core/preprocess/hwvideoframe/src/resize.cpp
core/preprocess/hwvideoframe/src/resize.cpp
+2
-1
core/preprocess/hwvideoframe/src/rgb_swap.cpp
core/preprocess/hwvideoframe/src/rgb_swap.cpp
+1
-1
core/preprocess/nvdec-extractframe/include/ExtractFrameJpeg.h
.../preprocess/nvdec-extractframe/include/ExtractFrameJpeg.h
+1
-1
python/paddle_serving_app/reader/test_preprocess.py
python/paddle_serving_app/reader/test_preprocess.py
+2
-0
python/paddle_serving_app/utils/__init__.py
python/paddle_serving_app/utils/__init__.py
+2
-1
python/setup.py.app.in
python/setup.py.app.in
+8
-7
未找到文件。
core/preprocess/hwvideoframe/src/resize.cpp
浏览文件 @
a001aec1
...
...
@@ -35,7 +35,8 @@ std::shared_ptr<OpContext> Resize::operator()(
percent
=
static_cast
<
float
>
(
_max_size
)
/
static_cast
<
float
>
(
im_max_size
);
}
resized_width
=
static_cast
<
int
>
(
round
(
input
->
nppi_size
().
width
*
percent
));
resized_height
=
static_cast
<
int
>
(
round
(
input
->
nppi_size
().
height
*
percent
));
resized_height
=
static_cast
<
int
>
(
round
(
input
->
nppi_size
().
height
*
percent
));
}
auto
output
=
std
::
make_shared
<
OpContext
>
(
resized_height
,
resized_width
);
auto
ret
=
resize_linear
(
input
->
p_frame
(),
...
...
core/preprocess/hwvideoframe/src/rgb_swap.cpp
浏览文件 @
a001aec1
...
...
@@ -14,8 +14,8 @@
#include <npp.h>
#include "core/preprocess/hwvideoframe/include/utils.h"
#include "core/preprocess/hwvideoframe/include/rgb_swap.h"
#include "core/preprocess/hwvideoframe/include/utils.h"
const
int
SwapChannel
::
_ORDER
[
CHANNEL_SIZE
]
=
{
2
,
1
,
0
};
...
...
core/preprocess/nvdec-extractframe/include/ExtractFrameJpeg.h
浏览文件 @
a001aec1
...
...
@@ -82,7 +82,7 @@ class ExtractFrameJpeg : public ExtractFrameBase {
int
jpeg_encode
(
uint8_t
*
p_image
,
int
width
,
int
height
,
FrameResult
&
result
);
const
FrameResult
&
result
);
nvjpegHandle_t
_nv_jpeg_handler
;
nvjpegEncoderState_t
_nv_enc_state
;
nvjpegEncoderParams_t
_nv_enc_params
;
...
...
python/paddle_serving_app/reader/test_preprocess.py
浏览文件 @
a001aec1
...
...
@@ -21,6 +21,7 @@ from paddle_serving_app.reader import Sequential, Resize, File2Image
import
libgpupreprocess
as
pp
import
libhwextract
class
TestOperators
(
unittest
.
TestCase
):
"""
test all operators, e.g. Div, Normalize
...
...
@@ -172,5 +173,6 @@ class TestOperators(unittest.TestCase):
item
.
free_memory
()
# have to release memor
if
__name__
==
'__main__'
:
unittest
.
main
()
python/paddle_serving_app/utils/__init__.py
浏览文件 @
a001aec1
...
...
@@ -11,5 +11,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# pylint: disable=doc-string-missing
from
.arr2image
import
Arr2Image
\ No newline at end of file
from
.arr2image
import
Arr2Image
python/setup.py.app.in
浏览文件 @
a001aec1
...
...
@@ -40,13 +40,14 @@ max_version, mid_version, min_version = python_version()
if '${PACK}' == 'ON':
copy_lib()
os.system('mkdir -p ./paddle_serving_app/reader/lib')
os.system('cp -a -f ../core/preprocess/hwvideoframe/libgpupreprocess.so ./paddle_serving_app/reader')
os.system('cp -a -f ../core/preprocess/nvdec-extractframe/libhwextract.so ./paddle_serving_app/reader')
os.system('cp -a -f ../core/preprocess/hwvideoframe/cuda/libgpu.so ./paddle_serving_app/reader/lib')
os.system('cp -a -f ../core/preprocess/nvdec-extractframe/cuda/libhwgpu.so ./paddle_serving_app/reader/lib')
os.system('cp -a -f ../../core/preprocess/nvdec-extractframe/lib/* ./paddle_serving_app/reader/lib')
os.system('export LD_LIBRARY_PATH="./paddle_serving_app/reader/lib"')
if os.path.exists(../core/preprocess/hwvideoframe/libgpupreprocess.so):
os.system('mkdir ./paddle_serving_app/reader/lib')
os.system('cp ../core/preprocess/hwvideoframe/libgpupreprocess.so ./paddle_serving_app/reader')
os.system('cp ../core/preprocess/nvdec-extractframe/libhwextract.so ./paddle_serving_app/reader')
os.system('cp ../core/preprocess/hwvideoframe/cuda/libgpu.so ./paddle_serving_app/reader/lib')
os.system('cp ../core/preprocess/nvdec-extractframe/cuda/libhwgpu.so ./paddle_serving_app/reader/lib')
os.system('cp -a -i ../../core/preprocess/nvdec-extractframe/lib/* ./paddle_serving_app/reader/lib')
os.system('export LD_LIBRARY_PATH="./paddle_serving_app/reader/lib"')
REQUIRED_PACKAGES = [
'six >= 1.10.0', 'sentencepiece', 'opencv-python<=4.2.0.32', 'pillow',
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录