NanoVLM - NVIDIA Jetson AI Lab
NanoVLM - Efficient Multimodal Pipeline We saw in the previous LLaVA tutorial how to run vision-language models through tools like text-generation-webui and llama.cpp. In a similar vein to the SLM page on Small Language Models, here we'll explore optimizin
www.jetson-ai-lab.com
VLM이란?
VLM(Vision-Language Model, 비전-언어 모델)은 컴퓨터 비전(Computer Vision)과 자연어 처리(Natural Language Processing)를 결합한 모델을 의미한다. 이 모델은 이미지나 비디오와 같은 시각적 데이터와 텍스트 입력을 동시에 이해하고 처리할 수 있다. 주로 이미지나 비디오에 대한 설명 생성, 이미지 캡션 생성, 이미지와 관련된 질문에 답변하는 등의 작업에 활용된다.
NanoVLM
NanoVLM은 Jetson AI Lab에서 제공하는 VLM 모델로, AGX Orin, Orin Nx, Orin Nano에서 사용할 수 있는 소형 멀티모달 모델이다.Nvidia의 jetson-container를 통해 Llava, VILA, Obsidian 모델을 간단하게 사용할 수 있으며, 자세한 사항은 아래와 같다.
요구사항
1. Jetpack 6가 설치된 Jetson Orin 계열 디바이스
2. NVMe SSD
3. Orin Nano 8GB, Orin NX 16GB는 swap 메모리를 사용할 것
4. Orin Nano 4GB 모델은 사용 불가능
Orin Nano 사용 시 참고사항
🔖 Memory optimization - NVIDIA Jetson AI Lab
RAM Optimization Running a LLM requires a huge RAM space. Especially if you are on Jetson Orin Nano that only has 8GB of RAM, it is crucial to leave as much RAM space available for models. Here we share a couple of ways to optimize the system RAM usage. Di
www.jetson-ai-lab.com
설치
git clone https://github.com/dusty-nv/jetson-containers
bash jetson-containers/install.sh
실행
jetson-containers run $(autotag nano_llm)
비디오 스트리밍
영상이나 이미지 파일을 사용하기 위해서는 먼저 마운팅 된 폴더(~/jetson-containers/data) 안에 파일을 넣어줘야 한다.
그리고 input 이나 chatbot 등에서 파일을 사용할 때 경로는 /data/images/hoover.jpg 와 같이 입력한다.
python3 -m nano_llm.agents.video_query --api=mlc \
--model Efficient-Large-Model/VILA1.5-3b \
--max-context-len 256 \
--max-new-tokens 32 \
--video-input <파일경로 or RTSP 주소 등> \
--video-output webrtc://@:8554/output
위 커맨드를 실행하고 https://<IP_ADDRESS>:8050 에 접속하면 위와 같은 화면을 볼 수 있는데 NanoDB는 따로 DB를 연동시켜줘야하므로 영상과 같이 나오지는 않고, 왼쪽의 이미지 캡셔닝 화면만 볼 수 있다.
그 외
이외에도 Jetson AI Lab에서는 sLLM, ViT, NanoDB, 오디오, 이미지 생성 등 Jetson에서 사용할 수 있는 다양한 AI 모델을 제공하며, Agent Studio라는 전용 툴을 통해 챗봇이나 생성형 AI 등 다양한 엣지 AI 시스템을 빠르게 실험해볼 수 있다.
'dev' 카테고리의 다른 글
Apple Depth Pro: Sharp Monocular Metric Depth in Less Than a Second (0) | 2024.10.07 |
---|---|
[Jetson] Jetpack6 Jetson 디바이스에 PyQt6, PySide6 설치하기 (0) | 2024.08.13 |
[Label Studio] Docker Compose로 사용하기 + 로컬 스토리지에서 YOLO 사전 주석 데이터 불러오기 (0) | 2024.07.03 |
[Label Studio] 라벨 스튜디오 사용해보기 (0) | 2024.07.02 |
YOLOv10: 새로운 실시간 종단간 객체 감지 모델 (0) | 2024.05.30 |