|
本帖最后由 jwseey2019 于 2020-2-24 10:17 编辑
是的, 生成人脸数据库时出的错!详见红色那一行
def get_face_feature(image_path):
img = cv2.imread(image_path)
img_h, img_w = img.shape[:2]
print("alex====line: %d, w:%d,h:%d"%(sys._getframe().f_lineno, img_w, img_h))
ret, results = face_det_handle.rockx_face_detect(img, img_w, img_h, RockX.ROCKX_PIXEL_FORMAT_BGR888)
if ret != RockX.ROCKX_RET_SUCCESS:
return None, None
max_face = get_max_face(results)
print("alex====line: %d, max_face:%s"%(sys._getframe().f_lineno, max_face))
if max_face is None:
return None, None
ret, align_img = face_landmark5_handle.rockx_face_align(img, img_w, img_h,
RockX.ROCKX_PIXEL_FORMAT_BGR888,
max_face.box, None)
if ret != RockX.ROCKX_RET_SUCCESS:
return None, None
#print("align_img = ", align_img)
if align_img is not None:
print("alex====line: ", sys._getframe().f_lineno)
ret, face_feature = face_recog_handle.rockx_face_recognize(align_img)
print("alex====line: ", sys._getframe().f_lineno)
if ret == RockX.ROCKX_RET_SUCCESS:
return face_feature, align_img
return None, None
是必现的
我的环境如下
PC是ubuntu18.04 64位系统,从你们的网站下载下来的RockX_SDK_V1.1.2_20191218.zip解压出来的,PC上插入的是计算棒rk1808,已经升级了最新版的固件,可以从运行过程看出来
这是运行sample打印的完成log
:~/RockX_SDK_V1.1.2_20191218/python/test/camera$ python3 rockx_face_recog.py -b t.db -i data/image/
camera= None
db_file= t.db
image_dir= data/image/
alex====line: 395, lib_dir:/home/alpha_gpu/.local/lib/python3.6/site-packages/rockx/sdk/rockx-x86-64-Linux/lib64,RockXBase.systeminux, RockXBase.lib:<CDLL '/home/alpha_gpu/.local/lib/python3.6/site-packages/rockx/sdk/rockx-x86-64-Linux/lib64/librockx.so', handle 230f9f0 at 0x7f3d4dc1d668>
D RKNNAPI: ==============================================
D RKNNAPI: RKNN VERSION:
D RKNNAPI: API: 1.2.0 (1190a71 build: 2019-09-25 12:39:14)
D RKNNAPI: DRV: 1.3.0 (c4f8c23 build: 2019-11-25 10:39:29)
D RKNNAPI: ==============================================
D RKNNAPI: ==============================================
D RKNNAPI: RKNN VERSION:
D RKNNAPI: API: 1.2.0 (1190a71 build: 2019-09-25 12:39:14)
D RKNNAPI: DRV: 1.3.0 (c4f8c23 build: 2019-11-25 10:39:29)
D RKNNAPI: ==============================================
E RKNNAPI: rknn_init, msg_load_ack fail, ack = 1(ACK_FAIL), expect 0(ACK_SUCC)!
E RKNNAPI: ==============================================
E RKNNAPI: RKNN VERSION:
E RKNNAPI: API: 1.2.0 (1190a71 build: 2019-09-25 12:39:14)
E RKNNAPI: DRV: 1.3.0 (c4f8c23 build: 2019-11-25 10:39:29)
E RKNNAPI: ==============================================
1582509309429 rockx load_model(74): rknn_init fail! ret=-6
1582509309434 rockx init(72): init module(3) error -1
alex===image_path = data/image/gbt.jpg
alex====line: 68, w:533,h:300
alex====line: 73, max_face:Object(id=0, cls_idx=0, box=Rect(left=198, top=27, right=267, bottom=134), score=0.9998824596405029)
alex====line: 83
alex====line: 258
alex====line: 261
Segmentation fault最后出错的地方就是ret, face_feature = face_recog_handle.rockx_face_recognize(align_img)这是使用的so文件的信息
~/.local/lib/python3.6/site-packages/rockx/sdk/rockx-x86-64-Linux/lib64$ ll -h
total 51M
drwxrwxrwx 3 alpha_gpu alpha_gpu 4.0K 2月 24 10:15 ./
drwxr-xr-x 4 alpha_gpu alpha_gpu 4.0K 1月 2 16:51 ../
-rwxr-xr-x 1 alpha_gpu alpha_gpu 712K 1月 2 16:51 librknn_api.so*
-rwxrwxrwx 1 alpha_gpu alpha_gpu 50M 1月 2 16:51 librockx.so*
drwxr-xr-x 2 alpha_gpu alpha_gpu 4.0K 1月 2 16:51 npu_transfer_proxy/
你看还有其他需要提供的讯息没有
对了,运行其他sample没有任何错误。
下面是ssh到计算棒上用ps看到的内容ps ax
PID TTY STAT TIME COMMAND
1 ? Ss 0:04 /usr/lib/systemd/systemd --switched-root --system --deserialize 22
2 ? S 0:00 [kthreadd]
3 ? S 0:00 [ksoftirqd/0]
5 ? S< 0:00 [kworker/0:0H]
6 ? S 0:00 [kworker/u4:0]
7 ? R 0:00 [rcu_preempt]
8 ? S 0:00 [rcu_sched]
9 ? S 0:00 [rcu_bh]
10 ? S 0:00 [migration/0]
11 ? S 0:00 [watchdog/0]
12 ? S 0:00 [watchdog/1]
13 ? S 0:00 [migration/1]
14 ? R 0:00 [ksoftirqd/1]
16 ? S< 0:00 [kworker/1:0H]
17 ? S 0:00 [kdevtmpfs]
18 ? S< 0:00 [perf]
19 ? S 0:00 [kconsole]
20 ? S 0:00 [khungtaskd]
21 ? S< 0:00 [writeback]
22 ? S< 0:00 [crypto]
23 ? S< 0:00 [bioset]
24 ? S< 0:00 [kblockd]
26 ? S< 0:00 [devfreq_wq]
27 ? S< 0:00 [cfg80211]
28 ? S 0:00 [cfinteractive]
30 ? S 0:00 [kworker/1:1]
56 ? S 0:00 [kswapd0]
57 ? S< 0:00 [vmstat]
58 ? S 0:00 [fsnotify_mark]
59 ? S< 0:00 [SquashFS read w]
60 ? S< 0:00 [xfsalloc]
61 ? S< 0:00 [xfs_mru_cache]
82 ? S 0:00 [irq/191-rockchi]
83 ? S< 0:00 [vcodec]
84 ? S 0:00 [irq/16-ffb80000]
85 ? S 0:00 [irq/17-ffb80000]
86 ? S< 0:00 [libertastf]
87 ? S< 0:00 [uether]
88 ? S 0:00 [irq/9-rockchip_]
89 ? S< 0:00 [ipv6_addrconf]
90 ? S 0:00 [kworker/1:2]
91 ? S< 0:00 [krfcommd]
94 ? S 0:00 [irq/13-rga]
95 ? S< 0:00 [deferwq]
128 ? S< 0:00 [bioset]
130 ? S 0:01 [mmcqd/0]
131 ? S< 0:00 [bioset]
132 ? S 0:00 [mmcqd/0boot0]
133 ? S< 0:00 [bioset]
134 ? S 0:00 [mmcqd/0boot1]
135 ? S< 0:00 [bioset]
136 ? S 0:00 [mmcqd/0rpmb]
148 ? S 0:00 [kworker/0:2]
168 ? S 0:00 [jbd2/mmcblk0p4-]
169 ? S< 0:00 [ext4-rsv-conver]
230 ? Ss 0:00 /usr/lib/systemd/systemd-journald
231 ? S< 0:00 [kworker/1:1H]
244 ? Ss 0:00 /usr/lib/systemd/systemd-udevd
250 ? S< 0:00 [kworker/0:1H]
264 ? Ss 0:00 /usr/sbin/lvmetad -f -t 3600
271 ? S 0:00 [kworker/u4:2]
272 ? S< 0:00 [ext4-rsv-conver]
293 ? Ssl 0:00 /usr/sbin/rsyslogd -n
294 ? Ss 0:00 /usr/sbin/smartd -n -q never
296 ? Ss 0:00 /usr/bin/toybrickd start
298 ? Ss 0:07 /sbin/rngd -f
301 ? Ss 0:00 /usr/lib/systemd/systemd-logind
302 ? Ss 0:00 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
310 ? S 0:00 /usr/sbin/chronyd
312 ? Sl 0:00 /usr/bin/tee-supplicant
317 ? Ss 0:00 /usr/sbin/sshd -D -oCiphers=aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes256-ctr,aes256-cbc,aes128-gcm@openssh.com,aes128-c
326 ? Ssl 0:00 /usr/sbin/gssproxy -D
346 ? Ss 0:00 /usr/sbin/crond -n
349 ttyFIQ0 Ss+ 0:00 /sbin/agetty -o -p -- \u --keep-baud 115200,38400,9600 ttyFIQ0 vt220
363 ? S 0:00 /bin/bash /usr/local/bin/indicator_led
368 ? S< 0:00 [npu_power_off_w]
369 ? S< 0:00 [galcore workque]
374 ? S 0:00 [galcore_deamon/]
458 ? S 0:00 ntbd
461 ? S 0:00 [file-storage]
462 ? S 0:00 [irq/192-dwc3]
488 ? S 0:00 /bin/sh /usr/bin/start_rknn.sh
490 ? S 0:00 sh -c cd /usr/lib/webui &&python manage.py runserver 0.0.0.0:80 &
493 ? S 0:06 python manage.py runserver 0.0.0.0:80
502 ? Sl 0:02 rknn_server
532 ? Sl 1:39 /usr/bin/python manage.py runserver 0.0.0.0:80
854 ? S 0:00 [kworker/0:0]
1020 ? S 0:00 [kworker/1:0]
1151 ? Ss 0:00 sshd: root [priv]
1157 ? S 0:00 [kworker/u4:1]
1164 ? Ss 0:00 /usr/lib/systemd/systemd --user
1167 ? S 0:00 (sd-pam)
1174 ? R 0:00 sshd: root@pts/0
1181 pts/0 Ss 0:00 -bash
1231 ? S 0:00 sleep 10
1234 pts/0 R+ 0:00 ps ax
[root@rk1808 ~]# vi /usr/bin/start_rknn.sh
[root@rk1808 ~]#
[root@rk1808 ~]#
[root@rk1808 ~]# cat /var/log/rknn.log
start rknn server, version:1.3.0 (c4f8c23 build: 2019-11-25 10:39:29)
I NPUTransfer: Starting NPU Transfer Server, Transfer version 1.9.7 (17de7ce@2019-08-02T17:45:43)
|
|