RaspberryPi와 Movidius로 시작하는 OpenVINO 심층 학습 시작 2
RaspberryPi와 Movidius로 시작하는 OpenVINO 심층 학습 2
OpenVINO를 처음 사용하는 경우에 대한 기본적인 설명과 설치에 대해서는 다음 기사를 참조하십시오.
RaspberryPi와 Movidius로 시작하는 OpenVINO 심층 학습 시작
이 기사에서는 https://download.01.org/opencv/2019/open_model_zoo/R3/ 샘플이 다양하기 때문에 RaspberryPi 및 Movidius 환경에서 작동하는 방법의 예를 설명합니다.
이번 시도한 것 이외에도 여러가지 준비되어 있으므로, 시험에 움직여 보세요.
각 샘플의 해설 페이지는 이쪽(2020/01/08 시점):
htps : // / cs. 오페 ゔ ぃ ㄱ ㅇ 오 rg / st / 우세 rg 납 p1. HTML
각 샘플의 모델 다운로드처는 이쪽(2020/01/08 시점):
h tps : // 어쨌든 d. 01. rg/오펜 cv/2019/오펜_모수 l_조오/R3/20190905_163000_모도 ls_병/
person-vehicle-bike-detection-crossroad-0078 시도
교차로에서 사람, 자동차, 자전거 (자전거)를 인식하는 샘플입니다.
person-vehicle-bike-detection-crossroad-0078
OpenVINO용 작업 디렉토리 "~/OpenVINO" 아래에 디렉토리 "person-vehicle-bike-detection-crossroad-0078" 만들기
pi@raspberrypi:~ $ cd ~/OpenVINO
pi@raspberrypi:~/OpenVINO $ mkdir person-vehicle-bike-detection-crossroad-0078 && cd person-vehicle-bike-detection-crossroad-0078
Object Detection(물체 감지) 샘플을 빌드합니다.
pi@raspberrypi:~/OpenVINO/face-detection $ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-march=armv7-a" /opt/intel/openvino/deployment_tools/inference_engine/samples
마지막으로 다음이 표시되어 빌드 파일을 만들 수 있는지 확인합니다.
-- Build files have been written to: /home/pi/OpenVINO/person-vehicle-bike-detection-crossroad-0078
make 합니다.
조금 시간이 걸립니다.
pi@raspberrypi:~/OpenVINO/person-vehicle-bike-detection-crossroad-0078 $ make -j2 object_detection_sample_ssd
훈련된 모델을 다운로드합니다.
pi@raspberrypi:~/OpenVINO/person-vehicle-bike-detection-crossroad-0078 $ wget --no-check-certificate https://download.01.org/opencv/2019/open_model_zoo/R3/20190905_163000_models_bin/person-vehicle-bike-detection-crossroad-0078/FP16/person-vehicle-bike-detection-crossroad-0078.bin
pi@raspberrypi:~/OpenVINO/person-vehicle-bike-detection-crossroad-0078 $ wget --no-check-certificate https://download.01.org/opencv/2019/open_model_zoo/R3/20190905_163000_models_bin/person-vehicle-bike-detection-crossroad-0078/FP16/person-vehicle-bike-detection-crossroad-0078.xml
테스트
테스트를 위해 교차로 이미지 파일 kudanshita_sample.bmp를 준비했습니다.
위치는 ~/OpenVINO/person-vehicle-bike-detection-crossroad-0078
pi@raspberrypi:~/OpenVINO/person-vehicle-bike-detection-crossroad-0078 $ ./armv7l/Release/object_detection_sample_ssd -m person-vehicle-bike-detection-crossroad-0078.xml -d MYRIAD -i /home/pi/OpenVINO/person-vehicle-bike-detection-crossroad-0078/kudanshita_sample.bmp
실행 예:
pi@raspberrypi:~/OpenVINO/person-vehicle-bike-detection-crossroad-0078 $ ./armv7l/Release/object_detection_sample_ssd -m person-vehicle-bike-detection-crossroad-0078.xml -d MYRIAD -i /home/pi/OpenVINO/person-vehicle-bike-detection-crossroad-0078/kudanshita_sample.bmp
[ INFO ] InferenceEngine:
API version ............ 2.1
Build .................. custom_releases/2019/R3_cb6cad9663aea3d282e0e8b3e0bf359df665d5d0
Description ....... API
Parsing input parameters
[ INFO ] Files were added: 1
[ INFO ] /home/pi/OpenVINO/person-vehicle-bike-detection-crossroad-0078/kudanshita_sample.bmp
[ INFO ] Loading Inference Engine
[ INFO ] Device info:
MYRIAD
myriadPlugin version ......... 2.1
Build ........... 30677
[ INFO ] Loading network files:
person-vehicle-bike-detection-crossroad-0078.xml
person-vehicle-bike-detection-crossroad-0078.bin
[ INFO ] Preparing input blobs
[ INFO ] Batch size is 1
[ INFO ] Preparing output blobs
[ INFO ] Loading model to the device
[ INFO ] Create infer request
[ WARNING ] Image is resized from (640, 480) to (1024, 1024)
[ INFO ] Batch size is 1
[ INFO ] Start inference
[ INFO ] Processing output blobs
[0,1] element, prob = 0.998047 (9,304)-(38,386) batch id : 0 WILL BE PRINTED!
[1,1] element, prob = 0.97998 (395,304)-(439,392) batch id : 0 WILL BE PRINTED!
[2,1] element, prob = 0.974121 (44,306)-(73,386) batch id : 0 WILL BE PRINTED!
[3,1] element, prob = 0.96875 (478,306)-(530,406) batch id : 0 WILL BE PRINTED!
[4,1] element, prob = 0.602051 (0,306)-(24,380) batch id : 0 WILL BE PRINTED!
[5,1] element, prob = 0.384521 (170,306)-(181,336) batch id : 0
[6,1] element, prob = 0.283936 (572,308)-(580,332) batch id : 0
[7,1] element, prob = 0.224854 (593,311)-(599,330) batch id : 0
[8,1] element, prob = 0.185547 (602,310)-(608,329) batch id : 0
[9,1] element, prob = 0.183594 (370,309)-(380,328) batch id : 0
[10,1] element, prob = 0.169434 (99,351)-(116,393) batch id : 0
[11,1] element, prob = 0.159546 (550,315)-(557,330) batch id : 0
[12,1] element, prob = 0.148193 (128,300)-(159,339) batch id : 0
[13,1] element, prob = 0.141724 (543,316)-(549,330) batch id : 0
[14,1] element, prob = 0.140137 (533,316)-(540,330) batch id : 0
[15,1] element, prob = 0.135376 (581,311)-(586,327) batch id : 0
[16,1] element, prob = 0.130005 (222,312)-(244,336) batch id : 0
[17,1] element, prob = 0.122803 (160,309)-(167,326) batch id : 0
[18,1] element, prob = 0.121155 (409,262)-(420,298) batch id : 0
[19,1] element, prob = 0.119385 (508,317)-(518,334) batch id : 0
[20,1] element, prob = 0.115723 (202,304)-(210,330) batch id : 0
[21,1] element, prob = 0.115112 (54,308)-(86,389) batch id : 0
[22,1] element, prob = 0.11377 (399,303)-(430,356) batch id : 0
[23,1] element, prob = 0.113464 (192,308)-(197,325) batch id : 0
[24,1] element, prob = 0.110657 (182,309)-(187,326) batch id : 0
[25,1] element, prob = 0.108093 (163,307)-(173,330) batch id : 0
[26,1] element, prob = 0.104553 (217,309)-(234,333) batch id : 0
[27,1] element, prob = 0.1026 (244,311)-(266,337) batch id : 0
[28,1] element, prob = 0.102173 (153,309)-(161,327) batch id : 0
[29,1] element, prob = 0.102173 (210,303)-(220,333) batch id : 0
[30,1] element, prob = 0.100403 (235,312)-(255,337) batch id : 0
[31,1] element, prob = 0.100159 (368,300)-(385,326) batch id : 0
[32,1] element, prob = 0.0998535 (248,299)-(263,331) batch id : 0
[33,1] element, prob = 0.0993042 (543,309)-(554,330) batch id : 0
[34,1] element, prob = 0.098938 (430,304)-(459,344) batch id : 0
[35,1] element, prob = 0.0982666 (146,305)-(162,331) batch id : 0
[36,1] element, prob = 0.0973511 (-1,304)-(13,368) batch id : 0
[37,1] element, prob = 0.0964355 (523,313)-(529,328) batch id : 0
[38,1] element, prob = 0.0963135 (205,306)-(215,332) batch id : 0
[39,1] element, prob = 0.0942993 (240,287)-(249,310) batch id : 0
[40,1] element, prob = 0.0934448 (433,302)-(482,352) batch id : 0
[41,1] element, prob = 0.0922241 (303,311)-(327,337) batch id : 0
[42,1] element, prob = 0.0916138 (389,294)-(405,317) batch id : 0
[43,1] element, prob = 0.0914917 (596,309)-(604,330) batch id : 0
[44,1] element, prob = 0.0913086 (126,280)-(142,330) batch id : 0
[45,1] element, prob = 0.0912476 (391,296)-(399,312) batch id : 0
[46,1] element, prob = 0.0909424 (219,310)-(228,327) batch id : 0
[47,1] element, prob = 0.0905762 (295,312)-(318,338) batch id : 0
[48,1] element, prob = 0.090332 (271,282)-(279,308) batch id : 0
[49,1] element, prob = 0.0889282 (422,305)-(447,345) batch id : 0
[50,1] element, prob = 0.0883179 (400,304)-(407,319) batch id : 0
[51,1] element, prob = 0.0881958 (496,313)-(516,340) batch id : 0
[52,1] element, prob = 0.0870972 (620,311)-(627,328) batch id : 0
[53,1] element, prob = 0.0866699 (487,301)-(503,343) batch id : 0
[54,1] element, prob = 0.0862427 (413,288)-(419,302) batch id : 0
[55,1] element, prob = 0.0861816 (409,253)-(418,281) batch id : 0
[56,1] element, prob = 0.0861206 (38,294)-(54,333) batch id : 0
[57,1] element, prob = 0.0859375 (250,285)-(265,307) batch id : 0
[58,1] element, prob = 0.0858154 (511,314)-(518,328) batch id : 0
[59,1] element, prob = 0.0847778 (284,252)-(305,308) batch id : 0
[60,1] element, prob = 0.0844727 (67,318)-(97,391) batch id : 0
[61,1] element, prob = 0.0844116 (373,291)-(379,301) batch id : 0
[62,1] element, prob = 0.0841064 (476,304)-(493,343) batch id : 0
[63,1] element, prob = 0.0839233 (410,272)-(418,291) batch id : 0
[64,1] element, prob = 0.0838013 (292,295)-(297,309) batch id : 0
[65,1] element, prob = 0.0837402 (411,278)-(418,297) batch id : 0
[66,1] element, prob = 0.0836182 (202,305)-(207,322) batch id : 0
[67,1] element, prob = 0.0835571 (250,302)-(260,322) batch id : 0
[68,1] element, prob = 0.083313 (213,308)-(220,327) batch id : 0
[69,1] element, prob = 0.0825806 (86,336)-(103,382) batch id : 0
[70,1] element, prob = 0.0822144 (391,291)-(398,302) batch id : 0
[71,1] element, prob = 0.0819702 (239,290)-(250,322) batch id : 0
[72,1] element, prob = 0.0819092 (290,284)-(298,308) batch id : 0
[73,1] element, prob = 0.0817871 (259,282)-(269,308) batch id : 0
[74,1] element, prob = 0.0817871 (460,304)-(468,318) batch id : 0
[75,1] element, prob = 0.0817871 (483,308)-(513,350) batch id : 0
[76,1] element, prob = 0.081665 (565,310)-(574,330) batch id : 0
[77,1] element, prob = 0.0811157 (382,291)-(388,301) batch id : 0
[78,1] element, prob = 0.0809937 (530,302)-(541,331) batch id : 0
[79,2] element, prob = 0.0658569 (314,448)-(377,478) batch id : 0
[80,2] element, prob = 0.0534668 (240,237)-(311,272) batch id : 0
[81,2] element, prob = 0.051239 (128,301)-(159,339) batch id : 0
[ INFO ] Image out_0.bmp created!
[ INFO ] Execution successful
[ INFO ] This sample is an API example, for any performance measurements please use the dedicated benchmark_app tool
처리 전 비트맵 이미지(kudanshita_sample.bmp):
Qiita로 표시하기 위해 Jpeg 형식으로 변환하고 있습니다.
처리 후 비트맵 이미지(out_0.bmp):
Qiita로 표시하기 위해 Jpeg 형식으로 변환하고 있습니다.
(먼 쪽은 인식할 수 없지만, 앞의 보행자는 인식할 수 있습니다)
Reference
이 문제에 관하여(RaspberryPi와 Movidius로 시작하는 OpenVINO 심층 학습 시작 2), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/tagucchan/items/e872797b35ef12e37e3c
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
pi@raspberrypi:~ $ cd ~/OpenVINO
pi@raspberrypi:~/OpenVINO $ mkdir person-vehicle-bike-detection-crossroad-0078 && cd person-vehicle-bike-detection-crossroad-0078
pi@raspberrypi:~/OpenVINO/face-detection $ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-march=armv7-a" /opt/intel/openvino/deployment_tools/inference_engine/samples
-- Build files have been written to: /home/pi/OpenVINO/person-vehicle-bike-detection-crossroad-0078
pi@raspberrypi:~/OpenVINO/person-vehicle-bike-detection-crossroad-0078 $ make -j2 object_detection_sample_ssd
pi@raspberrypi:~/OpenVINO/person-vehicle-bike-detection-crossroad-0078 $ wget --no-check-certificate https://download.01.org/opencv/2019/open_model_zoo/R3/20190905_163000_models_bin/person-vehicle-bike-detection-crossroad-0078/FP16/person-vehicle-bike-detection-crossroad-0078.bin
pi@raspberrypi:~/OpenVINO/person-vehicle-bike-detection-crossroad-0078 $ wget --no-check-certificate https://download.01.org/opencv/2019/open_model_zoo/R3/20190905_163000_models_bin/person-vehicle-bike-detection-crossroad-0078/FP16/person-vehicle-bike-detection-crossroad-0078.xml
pi@raspberrypi:~/OpenVINO/person-vehicle-bike-detection-crossroad-0078 $ ./armv7l/Release/object_detection_sample_ssd -m person-vehicle-bike-detection-crossroad-0078.xml -d MYRIAD -i /home/pi/OpenVINO/person-vehicle-bike-detection-crossroad-0078/kudanshita_sample.bmp
pi@raspberrypi:~/OpenVINO/person-vehicle-bike-detection-crossroad-0078 $ ./armv7l/Release/object_detection_sample_ssd -m person-vehicle-bike-detection-crossroad-0078.xml -d MYRIAD -i /home/pi/OpenVINO/person-vehicle-bike-detection-crossroad-0078/kudanshita_sample.bmp
[ INFO ] InferenceEngine:
API version ............ 2.1
Build .................. custom_releases/2019/R3_cb6cad9663aea3d282e0e8b3e0bf359df665d5d0
Description ....... API
Parsing input parameters
[ INFO ] Files were added: 1
[ INFO ] /home/pi/OpenVINO/person-vehicle-bike-detection-crossroad-0078/kudanshita_sample.bmp
[ INFO ] Loading Inference Engine
[ INFO ] Device info:
MYRIAD
myriadPlugin version ......... 2.1
Build ........... 30677
[ INFO ] Loading network files:
person-vehicle-bike-detection-crossroad-0078.xml
person-vehicle-bike-detection-crossroad-0078.bin
[ INFO ] Preparing input blobs
[ INFO ] Batch size is 1
[ INFO ] Preparing output blobs
[ INFO ] Loading model to the device
[ INFO ] Create infer request
[ WARNING ] Image is resized from (640, 480) to (1024, 1024)
[ INFO ] Batch size is 1
[ INFO ] Start inference
[ INFO ] Processing output blobs
[0,1] element, prob = 0.998047 (9,304)-(38,386) batch id : 0 WILL BE PRINTED!
[1,1] element, prob = 0.97998 (395,304)-(439,392) batch id : 0 WILL BE PRINTED!
[2,1] element, prob = 0.974121 (44,306)-(73,386) batch id : 0 WILL BE PRINTED!
[3,1] element, prob = 0.96875 (478,306)-(530,406) batch id : 0 WILL BE PRINTED!
[4,1] element, prob = 0.602051 (0,306)-(24,380) batch id : 0 WILL BE PRINTED!
[5,1] element, prob = 0.384521 (170,306)-(181,336) batch id : 0
[6,1] element, prob = 0.283936 (572,308)-(580,332) batch id : 0
[7,1] element, prob = 0.224854 (593,311)-(599,330) batch id : 0
[8,1] element, prob = 0.185547 (602,310)-(608,329) batch id : 0
[9,1] element, prob = 0.183594 (370,309)-(380,328) batch id : 0
[10,1] element, prob = 0.169434 (99,351)-(116,393) batch id : 0
[11,1] element, prob = 0.159546 (550,315)-(557,330) batch id : 0
[12,1] element, prob = 0.148193 (128,300)-(159,339) batch id : 0
[13,1] element, prob = 0.141724 (543,316)-(549,330) batch id : 0
[14,1] element, prob = 0.140137 (533,316)-(540,330) batch id : 0
[15,1] element, prob = 0.135376 (581,311)-(586,327) batch id : 0
[16,1] element, prob = 0.130005 (222,312)-(244,336) batch id : 0
[17,1] element, prob = 0.122803 (160,309)-(167,326) batch id : 0
[18,1] element, prob = 0.121155 (409,262)-(420,298) batch id : 0
[19,1] element, prob = 0.119385 (508,317)-(518,334) batch id : 0
[20,1] element, prob = 0.115723 (202,304)-(210,330) batch id : 0
[21,1] element, prob = 0.115112 (54,308)-(86,389) batch id : 0
[22,1] element, prob = 0.11377 (399,303)-(430,356) batch id : 0
[23,1] element, prob = 0.113464 (192,308)-(197,325) batch id : 0
[24,1] element, prob = 0.110657 (182,309)-(187,326) batch id : 0
[25,1] element, prob = 0.108093 (163,307)-(173,330) batch id : 0
[26,1] element, prob = 0.104553 (217,309)-(234,333) batch id : 0
[27,1] element, prob = 0.1026 (244,311)-(266,337) batch id : 0
[28,1] element, prob = 0.102173 (153,309)-(161,327) batch id : 0
[29,1] element, prob = 0.102173 (210,303)-(220,333) batch id : 0
[30,1] element, prob = 0.100403 (235,312)-(255,337) batch id : 0
[31,1] element, prob = 0.100159 (368,300)-(385,326) batch id : 0
[32,1] element, prob = 0.0998535 (248,299)-(263,331) batch id : 0
[33,1] element, prob = 0.0993042 (543,309)-(554,330) batch id : 0
[34,1] element, prob = 0.098938 (430,304)-(459,344) batch id : 0
[35,1] element, prob = 0.0982666 (146,305)-(162,331) batch id : 0
[36,1] element, prob = 0.0973511 (-1,304)-(13,368) batch id : 0
[37,1] element, prob = 0.0964355 (523,313)-(529,328) batch id : 0
[38,1] element, prob = 0.0963135 (205,306)-(215,332) batch id : 0
[39,1] element, prob = 0.0942993 (240,287)-(249,310) batch id : 0
[40,1] element, prob = 0.0934448 (433,302)-(482,352) batch id : 0
[41,1] element, prob = 0.0922241 (303,311)-(327,337) batch id : 0
[42,1] element, prob = 0.0916138 (389,294)-(405,317) batch id : 0
[43,1] element, prob = 0.0914917 (596,309)-(604,330) batch id : 0
[44,1] element, prob = 0.0913086 (126,280)-(142,330) batch id : 0
[45,1] element, prob = 0.0912476 (391,296)-(399,312) batch id : 0
[46,1] element, prob = 0.0909424 (219,310)-(228,327) batch id : 0
[47,1] element, prob = 0.0905762 (295,312)-(318,338) batch id : 0
[48,1] element, prob = 0.090332 (271,282)-(279,308) batch id : 0
[49,1] element, prob = 0.0889282 (422,305)-(447,345) batch id : 0
[50,1] element, prob = 0.0883179 (400,304)-(407,319) batch id : 0
[51,1] element, prob = 0.0881958 (496,313)-(516,340) batch id : 0
[52,1] element, prob = 0.0870972 (620,311)-(627,328) batch id : 0
[53,1] element, prob = 0.0866699 (487,301)-(503,343) batch id : 0
[54,1] element, prob = 0.0862427 (413,288)-(419,302) batch id : 0
[55,1] element, prob = 0.0861816 (409,253)-(418,281) batch id : 0
[56,1] element, prob = 0.0861206 (38,294)-(54,333) batch id : 0
[57,1] element, prob = 0.0859375 (250,285)-(265,307) batch id : 0
[58,1] element, prob = 0.0858154 (511,314)-(518,328) batch id : 0
[59,1] element, prob = 0.0847778 (284,252)-(305,308) batch id : 0
[60,1] element, prob = 0.0844727 (67,318)-(97,391) batch id : 0
[61,1] element, prob = 0.0844116 (373,291)-(379,301) batch id : 0
[62,1] element, prob = 0.0841064 (476,304)-(493,343) batch id : 0
[63,1] element, prob = 0.0839233 (410,272)-(418,291) batch id : 0
[64,1] element, prob = 0.0838013 (292,295)-(297,309) batch id : 0
[65,1] element, prob = 0.0837402 (411,278)-(418,297) batch id : 0
[66,1] element, prob = 0.0836182 (202,305)-(207,322) batch id : 0
[67,1] element, prob = 0.0835571 (250,302)-(260,322) batch id : 0
[68,1] element, prob = 0.083313 (213,308)-(220,327) batch id : 0
[69,1] element, prob = 0.0825806 (86,336)-(103,382) batch id : 0
[70,1] element, prob = 0.0822144 (391,291)-(398,302) batch id : 0
[71,1] element, prob = 0.0819702 (239,290)-(250,322) batch id : 0
[72,1] element, prob = 0.0819092 (290,284)-(298,308) batch id : 0
[73,1] element, prob = 0.0817871 (259,282)-(269,308) batch id : 0
[74,1] element, prob = 0.0817871 (460,304)-(468,318) batch id : 0
[75,1] element, prob = 0.0817871 (483,308)-(513,350) batch id : 0
[76,1] element, prob = 0.081665 (565,310)-(574,330) batch id : 0
[77,1] element, prob = 0.0811157 (382,291)-(388,301) batch id : 0
[78,1] element, prob = 0.0809937 (530,302)-(541,331) batch id : 0
[79,2] element, prob = 0.0658569 (314,448)-(377,478) batch id : 0
[80,2] element, prob = 0.0534668 (240,237)-(311,272) batch id : 0
[81,2] element, prob = 0.051239 (128,301)-(159,339) batch id : 0
[ INFO ] Image out_0.bmp created!
[ INFO ] Execution successful
[ INFO ] This sample is an API example, for any performance measurements please use the dedicated benchmark_app tool
Reference
이 문제에 관하여(RaspberryPi와 Movidius로 시작하는 OpenVINO 심층 학습 시작 2), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/tagucchan/items/e872797b35ef12e37e3c텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)