Toybrick

灵异事件~~~虚拟机和板子上(错误)的推理结果不一致!

zhouzhouzlove

高级会员

积分
614
楼主
发表于 2019-3-12 17:44:42    查看: 24785|回复: 17 | [复制链接]    打印 | 只看该作者
本帖最后由 zhouzhouzlove 于 2019-3-12 17:44 编辑

小白一枚,遇到了灵异事件:Ubuntu虚拟机和3399pro开发板的推理结果不一致,Demo和自己找的模型都是这样的问题。贴图如下:

mobilenet_v1:
ubuntu推理结果:(左侧ubuntu虚拟机,右侧开发板)

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复

使用道具 举报

zhouzhouzlove

高级会员

积分
614
沙发
 楼主| 发表于 2019-3-13 09:27:26 | 只看该作者
手工置顶~~~
官方大牛帮忙指导一下吧~~~~
回复

使用道具 举报

elooon

注册会员

积分
139
板凳
发表于 2019-3-13 10:48:38 | 只看该作者
It works ok on my board.
Maybe something is wrong with your rknn environment?
My personal advice is uninstall all rknn related python packages and re-install.
回复

使用道具 举报

zhouzhouzlove

高级会员

积分
614
地板
 楼主| 发表于 2019-3-13 11:04:30 | 只看该作者
elooon 发表于 2019-3-13 10:48
It works ok on my board.
Maybe something is wrong with your rknn environment?
My personal advice is ...

thanks,i will try it。 Could you please share your rknn related python packages version?I want to consistent with yours.
回复

使用道具 举报

elooon

注册会员

积分
139
5#
发表于 2019-3-13 12:05:42 | 只看该作者
zhouzhouzlove 发表于 2019-3-13 11:04
thanks,i will try it。 Could you please share your rknn related python packages version?I want t ...


    absl-py (0.7.0)
    asn1crypto (0.24.0)
    astor (0.7.1)
    Babel (2.5.3)
    blivet (3.0.0b1)
    blivet-gui (2.1.9)
    CairoSVG (1.0.20)
    cffi (1.11.5)
    chardet (3.0.4)
    Click (7.0)
    coverage (4.5.1)
    cryptography (2.3)
    cupshelpers (1.0)
    cycler (0.10.0)
    decorator (4.2.1)
    dill (0.2.8.2)
    dnspython (1.15.0)
    docker (3.2.1)
    docker-pycreds (0.2.2)
    Flask (1.0.2)
    flatbuffers (1.9)
    fros (1.1)
    gast (0.2.2)
    gpg (1.10.0)
    grpcio (1.17.1)
    gssapi (1.5.0)
    h5py (2.7.1)
    humanize (0.5.1)
    idna (2.5)
    iniparse (0.4)
    initial-setup (0.3.56)
    ipaclient (4.7.2)
    ipalib (4.7.2)
    ipaplatform (4.7.2)
    ipapython (4.7.2)
    IPy (0.81)
    isc (2.0)
    itsdangerous (1.1.0)
    Jinja2 (2.10)
    jwcrypto (0.4.2)
    kiwisolver (1.0.1)
    langtable (0.0.38)
    lmdb (0.94)
    Markdown (3.0.1)
    MarkupSafe (0.23)
    matplotlib (2.2.3)
    netaddr (0.7.19)
    netifaces (0.10.6)
    networkx (1.11)
    notify2 (0.3.1)
    ntplib (0.3.3)
    numpy (1.14.5)
    olefile (0.46)
    onnx (1.4.1)
    ordered-set (2.0.2)
    pid (2.1.1)
    Pillow (5.1.1)
    pip (9.0.3)
    ply (3.9)
    protobuf (3.6.1)
    pwquality (1.4.0)
    pyasn1 (0.3.7)
    pyasn1-modules (0.1.5)
    pycairo (1.16.3)
    pycparser (2.14)
    pycrypto (2.6.1)
    pycups (1.9.72)
    pycurl (7.43.0.2)
    pydbus (0.6.0)
    pyenchant (2.0.0)
    pygobject (3.28.3)
    pyinotify (0.9.6)
    pykickstart (3.12)
    pyOpenSSL (17.3.0)
    pyparsing (2.1.10)
    pyparted (3.11.0)
    PySocks (1.6.8)
    pystray (0.14.3)
    python-augeas (0.5.0)
    python-dateutil (2.6.1)
    python-dmidecode (3.12.2)
    python-ldap (3.1.0)
    python-meh (0.46)
    python-xlib (0.20)
    python-yubico (1.3.2)
    pytoml (0.1.18)
    pytz (2017.2)
    pyudev (0.21.0)
    pyusb (1.0.2)
    pyxdg (0.25)
    PyYAML (3.12)
    qrcode (5.1)
    registries (0.1)
    requests (2.20.0)
    requests-file (1.4.3)
    requests-ftp (0.3.1)
    rknn-toolkit (0.9.8.1)
    rpm (4.14.2.1)
    ruamel.yaml (0.15.82)
    scipy (1.2.1)
    sepolicy (1.1)
    setools (4.1.1)
    setroubleshoot (1.1)
    setuptools (39.1.0)
    sh (1.12.14)
    simpleline (1.1)
    six (1.11.0)
    slip (0.6.4)
    slip.dbus (0.6.4)
    smartcols (0.3.0)
    sos (3.6)
    SSSDConfig (1.16.3)
    systemd-python (234)
    tensorboard (1.10.0)
    tensorflow (1.10.1)
    termcolor (1.1.0)
    typing (3.6.6)
    typing-extensions (3.7.2)
    urllib3 (1.24.1)
    websocket-client (0.47.0)
    Werkzeug (0.14.1)
    wheel (0.32.3)
    wrapt (1.10.11)
回复

使用道具 举报

zhouzhouzlove

高级会员

积分
614
6#
 楼主| 发表于 2019-3-13 20:29:56 | 只看该作者
elooon 发表于 2019-3-13 12:05
absl-py (0.7.0)
asn1crypto (0.24.0)
astor (0.7.1)

I  boot my board again , and installed the packages again.
The result is still wrong. I have no idea. maybe something wrong with my board?
回复

使用道具 举报

zhouzhouzlove

高级会员

积分
614
7#
 楼主| 发表于 2019-3-13 20:31:46 | 只看该作者
[toybrick@localhost mobilenet_v1]$ ls
dataset.txt  dog_224x224.jpg  mobilenet_v1.tflite  test.py
[toybrick@localhost mobilenet_v1]$ python3 test.py
--> config model
done
--> Loading model
done
--> Building model
done
--> Export RKNN model
done
--> Init runtime environment
done
--> Running model
mobilenet_v1
-----TOP 5-----
[464]: 0.29833984375
[601]: 0.131103515625
[732]: 0.0784912109375
[900]: 0.0311279296875
[677 853]: 0.0280914306640625

done
--> Begin evaluate model performance
========================================================================
                               Performance                              
========================================================================
Total Time(us): 4796
FPS: 208.51
回复

使用道具 举报

zhouzhouzlove

高级会员

积分
614
8#
 楼主| 发表于 2019-3-13 21:15:37 | 只看该作者
[toybrick@localhost mobilenet_v2]$ python3
Python 3.6.8 (default, Jan 31 2019, 09:06:51)
[GCC 8.2.1 20181215 (Red Hat 8.2.1-6)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> numpy.__version__
'1.16.2'
>>> import scipy
>>>
>>> scipy.__version__
'1.2.1'
>>> import PIL
>>> PIL.__version__
'5.1.1'
>>> import h5py
>>> h5py.__version__
'2.9.0'
>>> import lmdb
>>> lmdb.__version__
'0.94'
>>> import networkx
>>> networkx.__version__
'1.11'
>>> import flatbuffers
>>> flatbuffers.__version__
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'flatbuffers' has no attribute '__version__'
>>> import protobuf
>>> protobuf.__version__
'3.7.0'
>>> import onnx
>>> onnx.__version__
'1.4.1'
>>> import flask
>>> flsak.__version__
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'flsak' is not defined
>>> flask.__version__
'1.0.2'
>>> import tensorflow
>>> tensorflow.__version__
'1.10.1'
>>> import dill
>>> dill.__version__
'0.2.8.2'
>>> import cv2
>>> cv2.__version__
'3.4.1'
回复

使用道具 举报

zhouzhouzlove

高级会员

积分
614
9#
 楼主| 发表于 2019-3-13 21:19:13 | 只看该作者
[toybrick@localhost mobilenet_v2]$ pip3 list
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
absl-py (0.7.0)
asn1crypto (0.24.0)
astor (0.7.1)
Babel (2.5.3)
blivet (3.0.0b1)
blivet-gui (2.1.9)
cffi (1.11.5)
chardet (3.0.4)
Click (7.0)
coverage (4.5.1)
cryptography (2.3)
cupshelpers (1.0)
decorator (4.2.1)
dill (0.2.8.2)
dnspython (1.15.0)
docker (3.2.1)
docker-pycreds (0.2.2)
Flask (1.0.2)
flatbuffers (1.9)
fros (1.1)
gast (0.2.2)
gpg (1.10.0)
grpcio (1.19.0)
gssapi (1.5.0)
h5py (2.9.0)
humanize (0.5.1)
idna (2.5)
iniparse (0.4)
initial-setup (0.3.56)
ipaclient (4.7.2)
ipalib (4.7.2)
ipaplatform (4.7.2)
ipapython (4.7.2)
IPy (0.81)
isc (2.0)
itsdangerous (1.1.0)
Jinja2 (2.10)
jwcrypto (0.4.2)
langtable (0.0.38)
lmdb (0.94)
Markdown (3.0.1)
MarkupSafe (0.23)
netaddr (0.7.19)
netifaces (0.10.6)
networkx (1.11)
ntplib (0.3.3)
numpy (1.16.2)
olefile (0.46)
onnx (1.4.1)
ordered-set (2.0.2)
pid (2.1.1)
Pillow (5.1.1)
pip (9.0.3)
ply (3.9)
protobuf (3.7.0)
pwquality (1.4.0)
pyasn1 (0.3.7)
pyasn1-modules (0.1.5)
pycairo (1.16.3)
pycparser (2.14)
pycrypto (2.6.1)
pycups (1.9.72)
pycurl (7.43.0.2)
pydbus (0.6.0)
pyenchant (2.0.0)
pygobject (3.28.3)
pyinotify (0.9.6)
pykickstart (3.12)
pyOpenSSL (17.3.0)
pyparted (3.11.0)
PySocks (1.6.8)
pystray (0.14.3)
python-augeas (0.5.0)
python-dateutil (2.6.1)
python-dmidecode (3.12.2)
python-ldap (3.1.0)
python-meh (0.46)
python-xlib (0.20)
python-yubico (1.3.2)
pytoml (0.1.18)
pytz (2017.2)
pyudev (0.21.0)
pyusb (1.0.2)
pyxdg (0.25)
PyYAML (3.12)
qrcode (5.1)
registries (0.1)
requests (2.20.0)
requests-file (1.4.3)
requests-ftp (0.3.1)
rknn-toolkit (0.9.8.1)
rpm (4.14.2.1)
scipy (1.2.1)
sepolicy (1.1)
setools (4.1.1)
setroubleshoot (1.1)
setuptools (39.1.0)
sh (1.12.14)
simpleline (1.1)
six (1.11.0)
slip (0.6.4)
slip.dbus (0.6.4)
smartcols (0.3.0)
sos (3.6)
SSSDConfig (1.16.3)
systemd-python (234)
tensorboard (1.10.0)
tensorflow (1.10.1)
termcolor (1.1.0)
typing (3.6.6)
typing-extensions (3.7.2)
urllib3 (1.24.1)
virtualenv (16.4.3)
websocket-client (0.47.0)
Werkzeug (0.14.1)
wheel (0.33.1)
wrapt (1.10.11)
回复

使用道具 举报

zhouzhouzlove

高级会员

积分
614
10#
 楼主| 发表于 2019-3-14 09:20:46 | 只看该作者
I am sure I use the same file(another Demo also wrong ) :

Ubuntu:
(venv) bit@ubuntu:~/Desktop/rknn-toolkit/example/mobilenet_v2$ md5sum mobilenet_v2.prototxt
487b2742b889fa1ca76de2f9bdd69fcf  mobilenet_v2.prototxt
(venv) bit@ubuntu:~/Desktop/rknn-toolkit/example/mobilenet_v2$ md5sum mobilenet_v2.caffemodel
54aab8425ea068d472e8e4015f22360c  mobilenet_v2.caffemodel

3399pro:
[toybrick@localhost mobilenet_v2]$ md5sum mobilenet_v2.prototxt
487b2742b889fa1ca76de2f9bdd69fcf  mobilenet_v2.prototxt
[toybrick@localhost mobilenet_v2]$ md5sum mobilenet_v2.caffemodel
54aab8425ea068d472e8e4015f22360c  mobilenet_v2.caffemodel

3399pro result:
[toybrick@localhost mobilenet_v2]$ md5sum mobilenet_v2.caffemodel
54aab8425ea068d472e8e4015f22360c  mobilenet_v2.caffemodel
[toybrick@localhost mobilenet_v2]$ python3 test.py
--> config model
done
--> Loading model
done
--> Building model
done
--> Export RKNN model
done
--> Init runtime environment
done
--> Running model
mobilenet_v2
-----TOP 5-----
[151 412 421 427 428 447 457 462 463 469 488 515 523 541 587 596 600 618
620 641 643 676 696 700 725 728 731 733 758 769 772 778 784 792 808 813
818 828 836 837 840 845 851 852 868 879 882 898 899 902 907 910 987]: 0.01183319091796875
[151 412 421 427 428 447 457 462 463 469 488 515 523 541 587 596 600 618
620 641 643 676 696 700 725 728 731 733 758 769 772 778 784 792 808 813
818 828 836 837 840 845 851 852 868 879 882 898 899 902 907 910 987]: 0.01183319091796875
[151 412 421 427 428 447 457 462 463 469 488 515 523 541 587 596 600 618
620 641 643 676 696 700 725 728 731 733 758 769 772 778 784 792 808 813
818 828 836 837 840 845 851 852 868 879 882 898 899 902 907 910 987]: 0.01183319091796875
[151 412 421 427 428 447 457 462 463 469 488 515 523 541 587 596 600 618
620 641 643 676 696 700 725 728 731 733 758 769 772 778 784 792 808 813
818 828 836 837 840 845 851 852 868 879 882 898 899 902 907 910 987]: 0.01183319091796875
[151 412 421 427 428 447 457 462 463 469 488 515 523 541 587 596 600 618
620 641 643 676 696 700 725 728 731 733 758 769 772 778 784 792 808 813
818 828 836 837 840 845 851 852 868 879 882 898 899 902 907 910 987]: 0.01183319091796875

done
--> Begin evaluate model performance
========================================================================
                               Performance                              
========================================================================
Total Time(us): 6713
FPS: 148.96
========================================================================

done

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

产品中心 购买渠道 开源社区 Wiki教程 资料下载 关于Toybrick


快速回复 返回顶部 返回列表