What happened?
I successfully deployed the sedna with following the documentation of installation, then I saw gm and lc pod are running, like this:
archlab@cloud-master:~/gopath/src$ kubectl get pod -n sedna -o wide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
gm-f58b846ff-mlltx 1/1 Running 0 27h 10.244.0.3 cloud-master <none> <none>
lc-g799f 1/1 Running 0 27h 192.168.30.207 cloudnode-1 <none> <none>
lc-l7m5t 1/1 Running 0 27h 192.168.30.206 cloud-master <none> <none>
lc-q7jhf 1/1 Running 0 27h 192.168.60.36 edgenode2201 <none> <none>
Then I tried the Helmet Detection Experiment. And I built images and models we needed, like this:
archlab@cloud-master:~/gopath/src$ kubectl get Model -A
NAMESPACE NAME AGE
default helmet-detection-inference-big-model 9h
default helmet-detection-inference-little-model 8h
archlab@cloud-master:~/gopath/src$ kubectl get jointinferenceservices.sedna.io
NAME AGE
helmet-detection-inference-example 8h
Finally I Mock Video Stream for Inference in Edge Side:
archlab001@edgenode2201:~/joint_inference_example/data/video$ sudo ffmpeg -re -i video.mp4 -vcodec libx264 -strict -2 -f rtsp rtsp://localhost/video
sudo: 无法解析主机:edgenode2201
ffmpeg version 2.8.17-0ubuntu0.1 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.12) 20160609
configuration: --prefix=/usr --extra-version=0ubuntu0.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
libavutil 54. 31.100 / 54. 31.100
libavcodec 56. 60.100 / 56. 60.100
libavformat 56. 40.101 / 56. 40.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 40.101 / 5. 40.101
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.101 / 1. 2.101
libpostproc 53. 3.100 / 53. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'video.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isommp42
creation_time : 2019-03-31 14:46:46
Duration: 00:15:06.00, start: 0.000000, bitrate: 1430 kb/s
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720 [SAR 1:1 DAR 16:9], 1298 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc (default)
Metadata:
creation_time : 2019-03-31 14:46:46
handler_name : ISO Media file produced by Google Inc. Created on: 03/31/2019.
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
Metadata:
creation_time : 2019-03-31 14:46:46
handler_name : ISO Media file produced by Google Inc. Created on: 03/31/2019.
[libx264 @ 0x750740] using SAR=1/1
[libx264 @ 0x750740] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
[libx264 @ 0x750740] profile High, level 3.1
[libx264 @ 0x750740] 264 - core 148 r2643 5c65704 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=23 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, rtsp, to 'rtsp://localhost/video':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isommp42
encoder : Lavf56.40.101
Stream #0:0(und): Video: h264 (libx264), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 23.98 fps, 90k tbn, 23.98 tbc (default)
Metadata:
creation_time : 2019-03-31 14:46:46
handler_name : ISO Media file produced by Google Inc. Created on: 03/31/2019.
encoder : Lavc56.60.100 libx264
Stream #0:1(eng): Audio: aac, 44100 Hz, stereo, fltp, 128 kb/s (default)
Metadata:
creation_time : 2019-03-31 14:46:46
handler_name : ISO Media file produced by Google Inc. Created on: 03/31/2019.
encoder : Lavc56.60.100 aac
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
frame=21722 fps= 24 q=-1.0 Lsize=N/A time=00:15:05.99 bitrate=N/A
video:313537kB audio:19168kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
[libx264 @ 0x750740] frame I:172 Avg QP:21.53 size: 54827
[libx264 @ 0x750740] frame P:11817 Avg QP:24.38 size: 22320
[libx264 @ 0x750740] frame B:9733 Avg QP:27.95 size: 4919
[libx264 @ 0x750740] consecutive B-frames: 21.3% 49.7% 21.3% 7.6%
[libx264 @ 0x750740] mb I I16..4: 12.7% 70.1% 17.2%
[libx264 @ 0x750740] mb P I16..4: 4.6% 12.8% 2.5% P16..4: 44.0% 15.3% 6.2% 0.0% 0.0% skip:14.7%
[libx264 @ 0x750740] mb B I16..4: 0.3% 0.5% 0.2% B16..8: 39.8% 4.2% 0.8% direct: 2.7% skip:51.5% L0:45.2% L1:47.5% BI: 7.3%
[libx264 @ 0x750740] 8x8 transform intra:64.3% inter:63.0%
[libx264 @ 0x750740] coded y,uvDC,uvAC intra: 53.6% 36.5% 3.6% inter: 21.1% 9.3% 0.1%
[libx264 @ 0x750740] i16 v,h,dc,p: 23% 30% 11% 37%
[libx264 @ 0x750740] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 23% 19% 4% 5% 5% 7% 5% 8%
[libx264 @ 0x750740] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 24% 22% 15% 5% 8% 7% 9% 5% 6%
[libx264 @ 0x750740] i8c dc,h,v,p: 65% 17% 13% 4%
[libx264 @ 0x750740] Weighted P-Frames: Y:21.0% UV:4.7%
[libx264 @ 0x750740] ref P L0: 59.7% 18.9% 15.5% 5.3% 0.6%
[libx264 @ 0x750740] ref B L0: 85.8% 13.6% 0.5%
[libx264 @ 0x750740] ref B L1: 95.8% 4.2%
[libx264 @ 0x750740] kb/s:2835.01
After these, I can't see any container or pod is running, why? And there are no results in my ouput dir.
My Enviornment Settings
- create_big_model_resources.yaml
apiVersion: sedna.io/v1alpha1
kind: Model
metadata:
name: helmet-detection-inference-big-model
namespace: default
spec:
url: "/home/archlab/gopath/src/joint_inference_example/data/big-model/yolov3_darknet.pb"
format: "pb"
- create_little_model_resources.yaml
apiVersion: sedna.io/v1alpha1
kind: Model
metadata:
name: helmet-detection-inference-little-model
namespace: default
spec:
url: "/home/archlab/gopath/src/joint_inference_example/data/little-model/yolov3_resnet18.pb"
format: "pb"
- create_joint_inference_service.yaml
apiVersion: sedna.io/v1alpha1
kind: JointInferenceService
metadata:
name: helmet-detection-inference-example
namespace: default
spec:
edgeWorker:
model:
name: "helmet-detection-inference-little-model"
hardExampleMining:
name: "IBT"
parameters:
- key: "threshold_img"
value: "0.9"
- key: "threshold_box"
value: "0.9"
template:
spec:
nodeName: edgenode2201
containers:
- image: kubeedge/sedna-example-joint-inference-helmet-detection-little:v0.1.0
imagePullPolicy: IfNotPresent
name: little-model
env: # user defined environments
- name: input_shape
value: "416,736"
- name: "video_url"
value: "rtsp://localhost/video"
- name: "all_examples_inference_output"
value: "/data/output"
- name: "hard_example_cloud_inference_output"
value: "/data/hard_example_cloud_inference_output"
- name: "hard_example_edge_inference_output"
value: "/data/hard_example_edge_inference_output"
resources: # user defined resources
requests:
memory: 64M
cpu: 100m
limits:
memory: 2Gi
volumeMounts:
- name: outputdir
mountPath: /data/
volumes: # user defined volumes
- name: outputdir
hostPath:
# user must create the directory in host
path: /home/archlab001/joint_inference_example/joint_inference/output
type: Directory
cloudWorker:
model:
name: "helmet-detection-inference-big-model"
template:
spec:
nodeName: cloud-master
containers:
- image: kubeedge/sedna-example-joint-inference-helmet-detection-big:v0.1.0
name: big-model
imagePullPolicy: IfNotPresent
env: # user defined environments
- name: "input_shape"
value: "544,544"
resources: # user defined resources
requests:
memory: 2Gi
And my dir is:
# In Cloud Side
archlab@cloud-master:~/gopath/src/joint_inference_example$ ls
create_big_model_resources.yaml create_little_model_resources.yaml joint_inference
create_joint_inference_service.yaml data
archlab@cloud-master:~/gopath/src/joint_inference_example$ pwd
/home/archlab/gopath/src/joint_inference_example
# In Edge Side
archlab@cloud-master:~/gopath/src/joint_inference_example/joint_inference/output$ pwd
/home/archlab/gopath/src/joint_inference_example/joint_inference/output