Raspberry Pi Zero W로 Coral USB TPU Accelerator(EdgeTPU)를 사용해 보십시오.

[목적]


Edge TPU를 Raspberry Pi Zero W에 연결하여 실시간 물체 탐지를 수행합니다.

[주석]


순조로워 보이지만 결국 이상하게 끝나서 지금 실시간 검사가 쉽지 않은데...

【내용】


부싯돌 크기의 다람쥐 파이 제로우와 엣지TPU의 조합으로 물체가 바삭바삭하게 검출되면 대단하지 않나요?
나는 그런 꿈을 그려서 해 보았다.

【환경 구축】


기본 절차는 lazu 파이 3B 때와 같지만 처음 다운로드한 파일은 다르다.
아래 URL 다운로드 모듈을 참조하십시오.
【EdgeTPU Platforms - Releases】
Coral의 Giithub 코드 등은 그대로 움직이지 않는 경우가 많은데 여긴 여전히 오류가...
다음은 수정된 단계입니다.
wget https://github.com/google-coral/edgetpu-platforms/releases/download/v1.9.2/edgetpu_api_1.9.2.tar.gz
tar xzf edgetpu_api_1.9.2.tar.gz
cd edgetpu_api 
sudo apt update
bash ./install.sh
설치 후의 절차는 아래의 문장의 절차를 따를 것이다.
[먼저 Coral USB TPU Accelerator(EdgeTPU)(Quick Start)를 사용하십시오.]
[Coral USB TPU Accelerator(EdgeTPU)를 사용하여 물체 먼저 감지]

[렌즈로 제로우를 보내 물체를 감지한다.]


먼저 애플파이의 공식 카메라를 사용해 보세요.
cd ~/examples-camera/raspicam/
python3 classify_capture.py
움직인다~!!
결과를 내보냅니다.txt
/usr/lib/python3/dist-packages/picamera/encoders.py:521: PiCameraAlphaStripping: using alpha-stripping to convert to non-alpha format; you may find the equivalent alpha format faster
  "using alpha-stripping to convert to non-alpha "
Inference: 143.72ms FPS: 5.5
22% desk
13% notebook, notebook computer
7% desktop computer
Inference: 21.72ms FPS: 6.9
21% desk
12% notebook, notebook computer
7% desktop computer
Inference: 21.21ms FPS: 7.1
30% desk
11% desktop computer
4% mouse, computer mouse
Inference: 20.93ms FPS: 7.8
33% desk
10% desktop computer
4% mouse, computer mouse
Inference: 21.09ms FPS: 7.8
28% desk
11% desktop computer
5% mouse, computer mouse
Inference: 20.99ms FPS: 8.3
23% desk
10% desktop computer
5% web site, website, internet site, site
Inference: 21.28ms FPS: 8.3
23% desk
12% desktop computer
6% screen, CRT screen
고무 3B의 절반 정도의 퍼포먼스였지만, 생각보다 빠른 속도로 움직이고 있었다.
이 꿈은 커질 것이다.
30초 뒤에...
결과 내보내기잘못 1txt
Inference: 20.00ms FPS: 10.4
39% notebook, notebook computer
12% laptop, laptop computer
11% modem
Inference: 20.65ms FPS: 10.7
48% notebook, notebook computer
16% laptop, laptop computer
9% modem
Inference: 5906.01ms FPS: 2.6
50% notebook, notebook computer
14% laptop, laptop computer
9% modem
Inference: 5936.29ms FPS: 1.5
41% notebook, notebook computer
14% laptop, laptop computer
12% modem
Inference: 5889.02ms FPS: 1.0
39% notebook, notebook computer
13% laptop, laptop computer
10% modem
F /home/pi/edgetpu-ml-cpp-release-rpi0-1.9.2/darwinn/third_party/darwinn/driver/usb/usb_driver.cc:834] transfer on tag 1 failed. Abort. Deadline exceeded: USB transfer error 2 [LibUsbDataOutCallback]
中止
처리 속도가 갑자기 느려져서 결국 이상이 끝났다.
오류 내용에 Edge TPU의 USB 드라이버에 오류가 표시됩니다.
나는 처리 속도가 너무 빠르다고 생각해서 수면을 넣어 처리 속도를 낮추려고 했지만 같은 문제가 발생했다.
아직 계속 처리할 방법을 찾지 못했다.
꿈이 갑자기 깨졌다.
Edge TPU의 USB 드라이버에 문제가 있을 수 있습니다.
Coral 회사에서 새 드라이버를 발표할 때까지 기다려야 합니까?

[Edge TPU를 사용하지 않는 경우]


Edge TPU를 사용하지 않는 모델은 다음과 같습니다.
식별 시간은 4000ms에 가깝고 실시간성이 없다.
Edge TPU의 유용성이 느껴집니다.
결과 내보내기CPU 버전.txt
/usr/lib/python3/dist-packages/picamera/encoders.py:521: PiCameraAlphaStripping: using alpha-stripping to convert to non-alpha format; you may find the equivalent alpha format faster
  "using alpha-stripping to convert to non-alpha "
Inference: 3964.48ms FPS: 0.5
45% spotlight, spot
10% toilet tissue, toilet paper, bathroom tissue
7% table lamp
Inference: 3953.47ms FPS: 0.3
60% spotlight, spot
6% toilet tissue, toilet paper, bathroom tissue
5% table lamp
Inference: 3948.12ms FPS: 0.3
20% projector
18% toilet tissue, toilet paper, bathroom tissue
9% printer
Inference: 3949.64ms FPS: 0.3
21% projector
12% printer
12% toilet tissue, toilet paper, bathroom tissue
Inference: 4036.60ms FPS: 0.2
23% projector
12% toilet tissue, toilet paper, bathroom tissue
11% printer
Inference: 3940.51ms FPS: 0.2
17% toilet tissue, toilet paper, bathroom tissue
15% projector
10% printer
Inference: 3657.90ms FPS: 0.2
19% projector
16% toilet tissue, toilet paper, bathroom tissue
10% printer
Inference: 3699.61ms FPS: 0.2
24% toilet tissue, toilet paper, bathroom tissue
12% projector
9% printer

좋은 웹페이지 즐겨찾기