Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleClas
提交
24727034
P
PaddleClas
项目概览
PaddlePaddle
/
PaddleClas
接近 2 年 前同步成功
通知
116
Star
4999
Fork
1114
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
19
列表
看板
标记
里程碑
合并请求
6
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleClas
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
19
Issue
19
列表
看板
标记
里程碑
合并请求
6
合并请求
6
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
24727034
编写于
6月 22, 2021
作者:
T
Tingquan Gao
提交者:
GitHub
6月 22, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update whl (#871)
* Update whl * Optimize usage of CLI args
上级
27849b7a
变更
6
展开全部
隐藏空白更改
内联
并排
Showing
6 changed file
with
355 addition
and
288 deletion
+355
-288
MANIFEST.in
MANIFEST.in
+4
-3
deploy/python/preprocess.py
deploy/python/preprocess.py
+6
-0
deploy/utils/config.py
deploy/utils/config.py
+11
-2
paddleclas.py
paddleclas.py
+306
-276
ppcls/arch/backbone/__init__.py
ppcls/arch/backbone/__init__.py
+19
-1
setup.py
setup.py
+9
-6
未找到文件。
MANIFEST.in
浏览文件 @
24727034
include LICENSE.txt
include README.md
include docs/en/whl_en.md
recursive-include deploy/python predict_cls.py preprocess.py postprocess.py det_preprocess.py
recursive-include deploy/utils get_image_list.py config.py logger.py predictor.py
recursive-include tools/infer utils.py predict.py
recursive-include ppcls/utils logger.py
recursive-include ppcls/utils imagenet1k_label_list.txt
include ppcls/arch/backbone/__init__.py
recursive-include ppcls/arch/backbone/ *.py
\ No newline at end of file
deploy/python/preprocess.py
浏览文件 @
24727034
...
...
@@ -128,6 +128,12 @@ class CropImage(object):
def
__call__
(
self
,
img
):
w
,
h
=
self
.
size
img_h
,
img_w
=
img
.
shape
[:
2
]
if
img_h
<
h
or
img_w
<
w
:
raise
Exception
(
f
"The size(
{
h
}
,
{
w
}
) of CropImage must be greater than size(
{
img_h
}
,
{
img_w
}
) of image. Please check image original size and size of ResizeImage if used."
)
w_start
=
(
img_w
-
w
)
//
2
h_start
=
(
img_h
-
h
)
//
2
...
...
deploy/utils/config.py
浏览文件 @
24727034
...
...
@@ -170,7 +170,7 @@ def get_config(fname, overrides=None, show=True):
return
config
def
parse
_args
():
def
parse
r
():
parser
=
argparse
.
ArgumentParser
(
"generic-image-rec train script"
)
parser
.
add_argument
(
'-c'
,
...
...
@@ -184,5 +184,14 @@ def parse_args():
action
=
'append'
,
default
=
[],
help
=
'config options to be overridden'
)
args
=
parser
.
parse_args
()
parser
.
add_argument
(
'-v'
,
'--verbose'
,
action
=
'store_true'
,
help
=
'wheather print the config info'
)
return
parser
def
parse_args
():
args
=
parser
().
parse_args
()
return
args
paddleclas.py
浏览文件 @
24727034
此差异已折叠。
点击以展开。
ppcls/arch/backbone/__init__.py
浏览文件 @
24727034
...
...
@@ -12,6 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import
sys
import
inspect
from
ppcls.arch.backbone.legendary_models.mobilenet_v1
import
MobileNetV1_x0_25
,
MobileNetV1_x0_5
,
MobileNetV1_x0_75
,
MobileNetV1
from
ppcls.arch.backbone.legendary_models.mobilenet_v3
import
MobileNetV3_small_x0_35
,
MobileNetV3_small_x0_5
,
MobileNetV3_small_x0_75
,
MobileNetV3_small_x1_0
,
MobileNetV3_small_x1_25
,
MobileNetV3_large_x0_35
,
MobileNetV3_large_x0_5
,
MobileNetV3_large_x0_75
,
MobileNetV3_large_x1_0
,
MobileNetV3_large_x1_25
from
ppcls.arch.backbone.legendary_models.resnet
import
ResNet18
,
ResNet18_vd
,
ResNet34
,
ResNet34_vd
,
ResNet50
,
ResNet50_vd
,
ResNet101
,
ResNet101_vd
,
ResNet152
,
ResNet152_vd
,
ResNet200_vd
...
...
@@ -51,7 +54,22 @@ from ppcls.arch.backbone.model_zoo.rexnet import ReXNet_1_0, ReXNet_1_3, ReXNet_
from
ppcls.arch.backbone.model_zoo.gvt
import
pcpvt_small
,
pcpvt_base
,
pcpvt_large
,
alt_gvt_small
,
alt_gvt_base
,
alt_gvt_large
from
ppcls.arch.backbone.model_zoo.levit
import
LeViT_128S
,
LeViT_128
,
LeViT_192
,
LeViT_256
,
LeViT_384
from
ppcls.arch.backbone.model_zoo.dla
import
DLA34
,
DLA46_c
,
DLA46x_c
,
DLA60
,
DLA60x
,
DLA60x_c
,
DLA102
,
DLA102x
,
DLA102x2
,
DLA169
from
ppcls.arch.backbone.model_zoo.rednet
import
RedNet26
,
RedNet38
,
RedNet50
,
RedNet101
,
RedNet152
from
ppcls.arch.backbone.model_zoo.rednet
import
RedNet26
,
RedNet38
,
RedNet50
,
RedNet101
,
RedNet152
from
ppcls.arch.backbone.model_zoo.tnt
import
TNT_small
from
ppcls.arch.backbone.model_zoo.hardnet
import
HarDNet68
,
HarDNet85
,
HarDNet39_ds
,
HarDNet68_ds
from
ppcls.arch.backbone.variant_models.resnet_variant
import
ResNet50_last_stage_stride1
def
get_apis
():
current_func
=
sys
.
_getframe
().
f_code
.
co_name
current_module
=
sys
.
modules
[
__name__
]
api
=
[]
for
_
,
obj
in
inspect
.
getmembers
(
current_module
,
inspect
.
isclass
)
+
inspect
.
getmembers
(
current_module
,
inspect
.
isfunction
):
api
.
append
(
obj
.
__name__
)
api
.
remove
(
current_func
)
return
api
__all__
=
get_apis
()
setup.py
浏览文件 @
24727034
# Copyright (c) 202
0
PaddlePaddle Authors. All Rights Reserved.
# Copyright (c) 202
1
PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
...
...
@@ -11,14 +11,14 @@
# 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.
from
setuptools
import
setup
from
io
import
open
from
setuptools
import
setup
with
open
(
'requirements.txt'
,
encoding
=
"utf-8-sig"
)
as
f
:
requirements
=
f
.
readlines
()
def
readme
():
with
open
(
'docs/en/whl_en.md'
,
encoding
=
"utf-8-sig"
)
as
f
:
README
=
f
.
read
()
...
...
@@ -30,7 +30,9 @@ setup(
packages
=
[
'paddleclas'
],
package_dir
=
{
'paddleclas'
:
''
},
include_package_data
=
True
,
entry_points
=
{
"console_scripts"
:
[
"paddleclas= paddleclas.paddleclas:main"
]},
entry_points
=
{
"console_scripts"
:
[
"paddleclas= paddleclas.paddleclas:main"
]
},
version
=
'0.0.0'
,
install_requires
=
requirements
,
license
=
'Apache License 2.0'
,
...
...
@@ -40,10 +42,11 @@ setup(
url
=
'https://github.com/PaddlePaddle/PaddleClas'
,
download_url
=
'https://github.com/PaddlePaddle/PaddleClas.git'
,
keywords
=
[
'A treasure chest for image classification powered by PaddlePaddle.'
'A treasure chest for image classification powered by PaddlePaddle.'
],
classifiers
=
[
'Intended Audience :: Developers'
,
'Operating System :: OS Independent'
,
'Intended Audience :: Developers'
,
'Operating System :: OS Independent'
,
'Natural Language :: Chinese (Simplified)'
,
'Programming Language :: Python :: 3'
,
'Programming Language :: Python :: 3.2'
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录