提交 870320ff 编写于 作者: S Steffy-zxf

update version and requiremnets

上级 7240945e
#coding:utf-8 #coding:utf-8
import os import os
import paddlehub as hub import paddlehub as hub
import cv2
if __name__ == "__main__": if __name__ == "__main__":
ssd = hub.Module(name="ssd_mobilenet_v1_pascal") ssd = hub.Module(name="ssd_mobilenet_v1_pascal")
test_img_path = os.path.join("test", "test_img_bird.jpg") test_img_path = os.path.join("test", "test_img_bird.jpg")
# get the input keys for signature 'object_detection'
data_format = ssd.processor.data_format(sign_name='object_detection')
key = list(data_format.keys())[0]
# set input dict
input_dict = {key: [test_img_path]}
# execute predict and print the result # execute predict and print the result
results = ssd.object_detection(data=input_dict) results = ssd.object_detection(images=[cv2.imread(test_img_path)])
for result in results: for result in results:
hub.logger.info(result) print(result)
...@@ -22,6 +22,8 @@ if six.PY2: ...@@ -22,6 +22,8 @@ if six.PY2:
reload(sys) # noqa reload(sys) # noqa
sys.setdefaultencoding("UTF-8") sys.setdefaultencoding("UTF-8")
from .version import hub_version as __version__
from . import module from . import module
from . import common from . import common
from . import io from . import io
......
...@@ -13,5 +13,5 @@ ...@@ -13,5 +13,5 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
""" PaddleHub version string """ """ PaddleHub version string """
hub_version = "1.6.2" hub_version = "1.7.0"
module_proto_version = "1.0.0" module_proto_version = "1.0.0"
pre-commit pre-commit
protobuf >= 3.6.0 protobuf >= 3.6.0
yapf == 0.26.0 yapf == 0.26.0
pyyaml
Pillow
six >= 1.10.0 six >= 1.10.0
chardet == 3.0.4
requests
flask >= 1.1.0 flask >= 1.1.0
flake8 flake8
visualdl == 2.0.0a0 visualdl == 2.0.0a0
cma == 2.7.0 cma >= 2.7.0
sentencepiece sentencepiece
nltk
colorlog colorlog
opencv-python opencv-python
# numpy no longer support python2 in version 1.17 and above
numpy ; python_version >= "3"
numpy < 1.17.0 ; python_version < "3"
# pandas no longer support python2 in version 0.25 and above # pandas no longer support python2 in version 0.25 and above
pandas ; python_version >= "3" pandas ; python_version >= "3"
pandas < 0.25.0 ; python_version < "3"
# gunicorn not support windows # gunicorn not support windows
gunicorn >= 19.10.0; sys_platform != "win32" gunicorn >= 19.10.0; sys_platform != "win32"
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册