소형 캐리어 보드가 있는 스트리밍 4x 카메라: 빠른 프로토타입

임베디드 비전 구성 요소는 인기가 있으며 수많은 애플리케이션에 통합되고 있습니다. 이러한 모든 애플리케이션에 공통점은 점점 더 많은 기능을 좁은 공간에 넣어야 한다는 것입니다. 이는 이러한 시스템이 에지에서 결정을 내리는 데도 매우 유용한 경우가 많습니다. Teledyne FLIR는 프로토타입을 신속하게 제작할 수 있는 기능을 포함하여 이러한 시스템을 지원하기 위해 TX2용 Quartet™ 임베디드 솔루션을 도입했습니다. 이 맞춤형 캐리어 보드를 사용하면 풀 대역폭에서 최대 4대의 USB3 머신 비전 카메라를 간편하게 통합할 수 있습니다. 여기에는 NVidia Jetson 딥 러닝 하드웨어 액셀러레이터가 포함되며, 이는 Teledyne FLIR의 Spinnaker® SDK와 사전 통합된 상태로 제공됩니다. 이러한 시스템이 에지에서 특히 검사, 모바일 로봇, 트래픽 시스템 및 다양한 유형의 무인 차량에 대한 결정을 내리는 데도 매우 유용합니다.

Quartet을 통해 가능한 사항을 강조하고 있는 매우 실용적인 이 문서에서는 딥 러닝을 사용하는 4가지 동시 애플리케이션을 실행하는 ITS(트래픽 시스템)에 영감을 받은 프로토타입을 개발하는 데 필요한 단계를 설명합니다.

  • 애플리케이션 1: 딥 러닝을 이용한 라이선스 플레이트 인식
  • 애플리케이션 2: 딥 러닝을 사용한 차량 유형 분류
  • 애플리케이션 3: 딥 러닝을 이용한 차량 색상 분류
  • 애플리케이션 4: 앞유리를 통해 보기(과거 반사 및 눈부심)

image002.png

그림 1: 네 가지 애플리케이션 모두에 대한 프로토타입 설정

쇼핑 목록: 하드웨어 및 소프트웨어 구성 요소

1) 프로세싱용 SOM :

새로운 TX2용 Teledyne FLIR Quartet 캐리어 보드에는 다음이 포함됩니다.

  • 전용 USB3 컨트롤러가 있는 4x TF38 커넥터
  • Nvidia Jetson TX2 모듈
  • Teledyne FLIR의 강력하고 사용하기 쉬운 Spinnaker SDK가 사전 설치되어 있어서 Teledyne FLIR Blackfly S 보드 수준 카메라와 플러그 앤 플레이 호환성이 보장됩니다.
  • Nvidia Jetson 딥 러닝 하드웨어 액셀러레이터를 사용하면 하나의 소형 보드에서 완벽한 의사 결정 시스템을 구현할 수 있습니다.

Quartet_4_cameras.jpg

그림 2: 4개의 Blackfly S 카메라와 4개의 FPC 케이블이 있는 TX2가 포함된 쿼트 임베디드 솔루션.

2) 카메라 및 케이블

  • 최신 CMOS 센서에 적용된 케이스 버전과 동일한 다양한 기능 세트를 사용하는 표준 3대의 Teledyne FLIR Blackfly S USB3 보드 레벨 카메라, Quartet와의 원활한 통합 가능
  • 맞춤형 카메라 1대: Sony IMX250MZR 편광 센서가 있는 Blackfly S USB3 보드 레벨 카메라
  • 케이블: TF38 FPC 케이블을 통해 전원과 데이터를 하나의 케이블로 전송하여 공간 절약

BFS-BL-Blue-Cable-02-0519-JPEG (Web - 72 dpi).jpg

그림 3: FPC 케이블을 사용하는 Blackfly S 보드 레벨 카메라


가입하여 이와 같은 문서 더 보기

가입

3) 조명: LED 조명으로 번호판에 대한 모션 블러를 피하기에 충분한 조명을 제공합니다.

애플리케이션 1: 딥 러닝을 이용한 라이선스 플레이트 인식

개발 시간: 주로 2~3주, 더 견고하고 빠르게 실행

교육 이미지: LPDNet에 포함

라이센스 플레이트 인식을 위해 기성품인 Nvidia의 라이센스 플레이트 감지(LPDNet) 딥 러닝 모델을 사용하여 라이센스 플레이트의 위치를 감지합니다. 문자 및 번호를 인식하기 위해 Tesseract 오픈 소스 OCR 엔진을 사용했습니다. 카메라는 Sony IMX267 센서가 장착된 Blackfly S 보드 레벨 8.9 MP 컬러 카메라(BFS-U3-88S6C-BD)입니다. 당사는 성능 향상을 위해 라이선스 플레이트 감지를 위한 관심 영역을 제한하고 견고성을 향상하기 위해 추적 기능을 적용했습니다. 출력 사항에는 해당 번호판 문자와 함께 번호판의 바운딩 박스가 포함됩니다.

license_plate_result.jpg

그림 4: 번호판의 바운딩 박스와 번호판 문자를 통한 스트리밍.

애플리케이션 2: 딥 러닝을 사용한 차량 유형 분류

개발 시간: 영상 수집 및 주석을 포함하여 약 12시간

교육 이미지: 약 300개

차량 유형 분류의 경우, 전이학습을 사용하여 SUV, 세단 및 트럭으로 이름을 지정한 세 가지 장난감 차량에 대한 딥 러닝 물체 감지 모델을 교육했습니다. 다양한 거리와 각도에서 촬영한 설치물의 약 300개의 훈련 이미지를 수집했습니다. 카메라는 Sony IMX250 센서가 장착된 Blackfly S 보드 레벨 5 MP 컬러 카메라(BFS-U3-51S5C-BD)입니다. 우리는 약 3시간 동안 장난감 차량의 바운딩 박스에 주석을 달았습니다. 전이학습을 수행하여 Nvidia GTX1080 Ti GPU에 대해 약 하루 반 동안 SSD MobileNet 물체 감지 모델을 교육했습니다. Jetson TX2 모듈은 GPU 하드웨어 액셀러레이터를 사용하여 딥 러닝 추론을 효율적으로 수행하고 해당 차량 유형과 함께 차량의 바운딩 박스를 출력할 수 있습니다.

Picture1.png

그림 5: 바운딩 박스와 사전 설정된 차량 유형 및 신뢰 인자 식별을 통한 스트리밍

애플리케이션 3: 딥 러닝을 이용한 차량 색상 분류

개발 시간: 추가 2일 동안 색상 분류, 통합 및 테스트를 수행하는 “차량 유형 애플리케이션”의 재사용 모델
교육 이미지: “차량 유형 애플리케이션”과 동일한 300개 이미지 재사용

차량 색상 분류의 경우, 차량 감지를 위해 위와 동일한 딥 러닝 물체 감지 모델을 실행했으며, 그 후 바운딩 박스의 색상 분류를 위한 이미지 분석을 수행했습니다. 출력 사항에는 차량의 바운딩 박스와 해당 차량 색상이 포함됩니다. 카메라는 Sony IMX252 센서가 장착된 Blackfly S 보드 레벨 3 MP 컬러 카메라입니다.

Picture2.png

그림 6: 바운딩 박스와 사전 설정된 색상 유형 식별을 통한 스트리밍

애플리케이션 4: 앞유리를 통해 보기(과거 반사 및 눈부심)

앞유리를 통해 HOV 레인을 모니터링하고, 안전벨트 준수 여부를 확인하고, 심지어 운전 중 전화기 사용을 확인하는 것과 같은 교통 관련 응용 분야에서 눈부심을 감소하는 것은 매우 중요합니다. 이를 위해 Blackfly S USB3 보드 레벨 카메라와 5MP 편광 Sony IMX250MZR 센서를 결합하여 맞춤형 카메라를 제작했습니다. 이 보드 레벨 편광 카메라는 표준 제품이 아니지만, Teledyne FLIR는 다양한 센서로 쉽게 교체하여 눈부심 제거 기능을 보여주는 맞춤형 카메라 옵션을 제공할 수 있습니다. 카메라 이미지를 Teledyne FLIR의 SpinView GUI를 통해 스트리밍했습니다. 이 GUI는 쿼드 모드, 눈부심 감소 모드와 같은 다양한 “편광 알고리즘” 옵션을 제공하여 정지한 상태의 장난감 차량에 대한 눈부심 감소를 보여줍니다.

Picture3.png

그림 7: Spinnaker SDK GUI는 쿼드 모드, 눈부심 감소 모드와 같은 다양한 “편광 알고리즘” 옵션을 제공하여 정지한 상태의 장난감 차량에 대한 눈부심 감소를 보여줍니다. 쿼드 모드는 4개의 서로 다른 편광 각도에 해당하는 4개의 이미지를 보여줍니다.

전반적인 시스템 최적화

IMG_8455.jpg

네 개의 프로토타입은 독립적으로는 잘 작동했지만, 모든 딥러닝 모델이 동시에 실행되었을 때 전반적인 성능이 매우 좋지 않다는 것을 알게 되었습니다. Nvidia의 TensorRT SDK는 Jetson TX2 모듈과 같은 Nvidia 하드웨어에 대한 딥러닝 추론 최적화 도구 및 런타임을 제공합니다. TensorRT SDK를 사용하여 딥러닝 모델을 최적화하여 성능을 약 10배 향상시켰습니다. 하드웨어 측면에서는 모든 애플리케이션이 작동하면서 매우 뜨거워졌기 때문에 과열을 방지하기 위해 열싱크를 TX2 모듈에 부착했습니다. 그 결과, 4개의 모든 애플리케이션이 함께 작동하면서 차량 유형 식별의 경우 14fps, 차량 색상 분류의 경우 9fps, 자동 번호판 인식의 경우 4FPS, 편광 카메라의 경우 8FPS의 좋은 프레임률을 달성했습니다.

Quartet 임베디드 솔루션과 Blackfly S 보드 레벨 카메라의 사용 편의성과 신뢰성 덕분에 비교적 짧은 시간 내에 이 프로토타입을 개발했습니다. Spinnaker SDK가 사전 설치된 TX2 모듈을 사용하면 TF38 연결을 통해 전체 USB3 대역폭에서 안정적으로 스트리밍할 수 있는 모든 Blackfly S 보드 레벨 카메라와 플러그 앤 플레이가 호환됩니다. Nvidia가 제공하는 많은 도구를 사용하면 간편하게 TX2 모듈을 개발하고 최적화할 수 있습니다. Quartet은 이제 flir.com에서 온라인으로 구매하는 것은 물론 당사와 글로벌 대리점 네트워크를 통해 구매할 수 있습니다.


3) Lighting: LED lights to provide sufficient illumination to avoid motion blur for the license plates. 

Application 1: License plate recognition using deep learning

Development time: 2-3 weeks primarily to make it more robust and run faster

Training Images: Included with LPDNet

For license plate recognition, we deployed an off-the-shelf License Plate Detection (LPDNet) deep learning model from Nvidia to detect the location the license plates.   To recognize the letter & numbers we used the Tesseract open-source OCR engine.  The camera is a Blackfly S board level 8.9 MP color camera (BFS-U3-88S6C-BD) with the Sony IMX267 sensor.  We limited the region of interest for license plate detection to speed up performance and applied tracking to improve the robustness.  The output includes bounding boxes of the license plates together with the corresponding license plate characters.

license_plate_result.jpg

Figure 4: Streaming with bounding boxes of the license plates and license plate characters.

Application 2: Vehicle type categorization using deep learning

Development time: ~12 hours including image collection and annotation

Training Images: ~300

For vehicle type categorization, using transfer learning, we trained our own Deep Learning object detection model for the three toy cars used, namely SUV, sedan and truck.  We collected approximately 300 training images of the setup, taken at various distances and angles. The camera is a Blackfly S board level 5 MP color camera (BFS-U3-51S5C-BD) with the Sony IMX250 sensor. We annotated the bounding boxes of the toy cars which took approximately 3 hours.  We performed transfer learning to train our own SSD MobileNet object detection model which took around half a day on an Nvidia GTX1080 Ti GPU.  With the GPU hardware accelerator, the Jetson TX2 module can perform deep learning inference efficiently and output bounding boxes of the cars together with the corresponding vehicle types.

Picture1.png

Figure 5: Streaming with bounding boxes and pre-set vehicle types & confidence factor identified

Application 3: Vehicle color classification using deep learning

Development time: Re-used model from “Vehicle Type application” with additional 2 days to classify color, integrate & test
Training Images: Re-used same 300 images as “Vehicle Type application”

For vehicle color classification, we ran the same deep learning object detection model as above to detect the cars, followed by image analysis on the bounding boxes to classify its color.  The output includes bounding boxes of the cars together with the corresponding vehicle colors. The camera is a Blackfly S board level 3 MP color camera (BFS-U3-32S4C-BD) with the Sony IMX252 sensor.

Picture2.png

Figure 6: Streaming with bounding boxes and pre-set color types identified

Application 4: See through windshield (past reflection & glare)

Glare reduction is critical for traffic related applications such as seeing through a windshield to monitor HOV lanes, check for seatbelt compliance and even check for using their phones while driving.  For this purpose, we made a custom camera by combining a Blackfly S USB3 board level camera with the 5MP polarization Sony IMX250MZR sensor.  This board level polarization camera is not a standard product, but Teledyne FLIR is able to swap in different sensors easily to offer custom camera options to showcase its glare removal functionality.  We simply streamed the camera images via Teledyne FLIR’s SpinView GUI, which offers various "Polarization Algorithm" options such as quad mode, glare reduction mode, to show the glare reduction on a stationary toy car.

Picture3.png

Figure 7:  Spinnaker SDK GUI offers various "Polarization Algorithm" options such as quad mode, glare reduction mode, to show the glare reduction on a stationary toy car.  The quad mode shows the 4 images corresponding to the four different polarization angles.

Overall System Optimization

IMG_8455.jpg

While each of the four prototypes worked well independently, we noticed that the overall performance was quite poor when all the deep learning models were running simultaneously.  Nvidia’s TensorRT SDK provides a deep learning inference optimizer and runtime for Nvidia hardware such as the Jetson TX2 module.  We optimized our deep learning models using the TensorRT SDK, resulting in around 10x performance improvement.  On the hardware side, we attached a heat sink onto the TX2 module to avoid overheating, as it was quite hot with all the applications running.  At the end, we managed to achieve good frame rates with all four applications running together: 14 fps for vehicle type identification, 9 fps for vehicle color classification, 4 FPS for automatic number plate recognition and 8 FPS for the polarization camera.

We developed this prototype within a relatively short period of time thanks to the ease-of-use and reliability of the Quartet Embedded Solution and Blackfly S board level cameras.  The TX2 module with pre-installed Spinnaker SDK ensures plug & play compatibility with all the Blackfly S board level cameras which can stream reliably at full USB3 bandwidth via the TF38 connection.  Nvidia provides many tools to facilitate development and optimization on the TX2 module. The Quartet is now available for purchase online on flir.com as well as through our offices and global distributor network.  

관련 기사