Side Project/NVIDIA Jetson Orin Nano

[Jetson Orin Nano] ViT tutorial: NanoOWL

이성훈 Ethan 2025. 8. 2. 03:00

https://www.jetson-ai-lab.com/vit/tutorial_nanoowl.html

 

NanoOWL - NVIDIA Jetson AI Lab

Tutorial - NanoOWL Let's run NanoOWL , OWL-ViT optimized to run real-time on Jetson with NVIDIA TensorRT . What you need One of the following Jetson: Jetson AGX Orin (64GB) Jetson AGX Orin (32GB) Jetson Orin NX (16GB) Jetson Orin Nano (8GB) Running one of

www.jetson-ai-lab.com

Task 는 text 입력을 주고 그에 해당하는 물체를 detect 하는 것으로, Google research 에서 ECCV 2022 에 발표한 OWL-ViT 를 경량화하여 만든 튜토리얼입니다.

 

튜토리얼 순서대로 진행해봅시다.

Jeston containers 설치 및 run

git clone https://github.com/dusty-nv/jetson-containers

bash jetson-containers/install.sh

jetson-containers run --workdir /opt/nanoowl $(autotag nanoowl)

 

카메라 입력 확인

ls /dev/video*

위 명령어를 실행하여 아래와 같이 카메라 입력이 뜨는지 확인

만약 아래 이미지와 같이 카메라가 잡히지 않는 경우 카메라를 잡아야합니다.

저는 pi cam v2를 csi 포트로 연결했는데, jetson 보드 설정에 들어가서 csi 쪽 설정을 해주고 리부팅이 필요하다고 합니다.

cd /opt/nvidia/jetson-io/

sudo python jetson-io.py

# 유튜브 영상을 따라서 설정 진행

# Reboot

아래 유튜브 링크 참고 부탁드립니다.

https://youtu.be/gJPIJ3yxME0?si=RY90NTlGLttdADeO

리부팅을 진행하고 나면 잘 인식되는 것을 확인할 수 있습니다.

 


참고로 저는 카메라 입력을 확인하는 과정에서 문제가 좀 있었습니다..

카메라 모듈을 사는 돈이 아까워서 집에 있는 카메라들을 연결해서 되지 않을까? 라는 생각으로, 보유하고 있던 액션캠인 insta360 x4 를 연결해봤는데, ls 명령어에 뜨긴 하지만 실제로 잡히지는 않았습니다.

저와 같이 삽질하는 분이 없길 바랍니다.😂


필요한 모듈 다운로드

pip install aiohttp

위 명령어를 실행하면 되는데, 아래와 같은 에러가 발생할 수 있습니다.

원인을 검색해보니 엔비디아측에서 주소를 조금 바꿨다고 하네요... 그럼 명령어를 수정해주지..
https://forums.developer.nvidia.com/t/problems-running-nanoowl/339372

 

Problems running nanoOWL

I have a 8GB Orin Nano and am trying to run the NanoOWL tutorial project at NanoOWL - NVIDIA Jetson AI Lab Below is the result of running the container, and when I try to install aoihttp. I did install aoihttp as a user, it just searches without success as

forums.developer.nvidia.com

따라서 아래 명령어를 사용하시면 됩니다.

pip install --index-url https://pypi.jetson-ai-lab.io/jp6/cu126 aiohttp

 

Demo 실행

cd examples/tree_demo

python3 tree_demo.py --camera 0 --resolution 640x480 ../../data/owl_image_encoder_patch32.engine

- Reference

[1] Minderer, Matthias, et al. "Simple open-vocabulary object detection." ECCV 2022 [Paper link]