ubuntu-20.04-npu-odroidm1s-20231226에서 2.5 fps 밖에 안 나오는 이유가 무엇일까요?

ODROID-M1/M1S
Post Reply
tory45
Posts: 10
Joined: Thu Apr 18, 2024 8:55 am
languages_spoken: korea
Has thanked: 0
Been thanked: 0
Contact:

ubuntu-20.04-npu-odroidm1s-20231226에서 2.5 fps 밖에 안 나오는 이유가 무엇일까요?

Post by tory45 »

안녕하세요. m1s를 구입하여 yolo v5를 detection을 테스트 하고 있습니다.

무엇을 잘못했는지 모르겠지만
detection 처리가 2.5~3.0 fps 밖에 나오지 않습니다.
m1s 홈페이지는 npu에서 70ms(약 11 fps) 정도는나오는것으로 되어 있는데...

무엇을 더 해야 하는지 알려주시면 감사하겠습니다.
Attachments
이미지2.png
이미지2.png (23.97 KiB) Viewed 145 times
이미지.png
이미지.png (717.53 KiB) Viewed 145 times

steve.jeong
Posts: 306
Joined: Wed Dec 01, 2021 10:18 am
languages_spoken: english
Has thanked: 40 times
Been thanked: 93 times
Contact:

Re: ubuntu-20.04-npu-odroidm1s-20231226에서 2.5 fps 밖에 안 나오는 이유가 무엇일까요?

Post by steve.jeong »

11~12fps 사용가능한 하드커널에서 제공하는 예제는 다음과 같습니다.
https://github.com/hardkernel/rknpu2/tr ... n_cam_demo

파이썬 예제의 경우 카메라 데이터 처리 속도와 npu 프로세스 최적화 문제 등으로 사용을 추천드리지 않습니다.

tory45
Posts: 10
Joined: Thu Apr 18, 2024 8:55 am
languages_spoken: korea
Has thanked: 0
Been thanked: 0
Contact:

Re: ubuntu-20.04-npu-odroidm1s-20231226에서 2.5 fps 밖에 안 나오는 이유가 무엇일까요?

Post by tory45 »

감사합니다.
확인 해 보겠습니다.

tory45
Posts: 10
Joined: Thu Apr 18, 2024 8:55 am
languages_spoken: korea
Has thanked: 0
Been thanked: 0
Contact:

Re: ubuntu-20.04-npu-odroidm1s-20231226에서 2.5 fps 밖에 안 나오는 이유가 무엇일까요?

Post by tory45 »

늦은 답변 드립니다.

결과 : OpenCV 에러로 더이상 진행 하지 못하였고
아래 1번과 2번을 시도하였지만 모두 실패 하였는데 다른 해결 방법이 있는지 문의 드립니다.

1. 컴파일 시 opencv 에러가 나서 더 이상 진행하지 못함.
======================================================================
odroid@gnome-desktop:~/cam_demo/rknpu2/examples/rknn_cam_demo$ ./build-linux_RK3566_RK3568.sh

CMake Error at CMakeLists.txt:45 (find_package):
By not providing "FindOpenCV.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "OpenCV", but
CMake did not find one.

Could not find a package configuration file provided by "OpenCV" with any
of the following names:

OpenCVConfig.cmake
opencv-config.cmake

Add the installation prefix of "OpenCV" to CMAKE_PREFIX_PATH or set
"OpenCV_DIR" to a directory containing one of the above files. If "OpenCV"
provides a separate development package or SDK, be sure it has been
installed.


-- Configuring incomplete, errors occurred!
See also "/home/odroid/cam_demo/rknpu2/examples/rknn_cam_demo/build/build_linux_aarch64/CMakeFiles/CMakeOutput.log".

========================================================
2. ODROID Wiki에서 opencv install을 순서대로 진행하였으나 에러가 나서 더 이상 진행 하지 못함.
(https://wiki.odroid.com/etc/opencv/installation)

odroid@gnome-desktop:~$ cd && git clone https://github.com/opencv/opencv.git

Cloning into 'opencv'...
remote: Enumerating objects: 331257, done.
remote: Counting objects: 100% (67/67), done.
remote: Compressing objects: 100% (52/52), done.
error: RPC failed; curl 92 HTTP/2 stream 0 was not closed cleanly: CANCEL (err 8)
fatal: the remote end hung up unexpectedly
fatal: early EOFs: 63% (208692/331257), 363.55 MiB | 2.50 MiB/s
fatal: index-pack failed
=============================================================



3. 해결 방법이 있는지 문의 드립니다.

User avatar
tobetter
Posts: 13216
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 1014 times
Been thanked: 2301 times
Contact:

Re: ubuntu-20.04-npu-odroidm1s-20231226에서 2.5 fps 밖에 안 나오는 이유가 무엇일까요?

Post by tobetter »

tory45 wrote:
Mon May 13, 2024 8:50 pm
늦은 답변 드립니다.

결과 : OpenCV 에러로 더이상 진행 하지 못하였고
아래 1번과 2번을 시도하였지만 모두 실패 하였는데 다른 해결 방법이 있는지 문의 드립니다.

1. 컴파일 시 opencv 에러가 나서 더 이상 진행하지 못함.
======================================================================
odroid@gnome-desktop:~/cam_demo/rknpu2/examples/rknn_cam_demo$ ./build-linux_RK3566_RK3568.sh

CMake Error at CMakeLists.txt:45 (find_package):
By not providing "FindOpenCV.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "OpenCV", but
CMake did not find one.

Could not find a package configuration file provided by "OpenCV" with any
of the following names:

OpenCVConfig.cmake
opencv-config.cmake

Add the installation prefix of "OpenCV" to CMAKE_PREFIX_PATH or set
"OpenCV_DIR" to a directory containing one of the above files. If "OpenCV"
provides a separate development package or SDK, be sure it has been
installed.


-- Configuring incomplete, errors occurred!
See also "/home/odroid/cam_demo/rknpu2/examples/rknn_cam_demo/build/build_linux_aarch64/CMakeFiles/CMakeOutput.log".

========================================================
2. ODROID Wiki에서 opencv install을 순서대로 진행하였으나 에러가 나서 더 이상 진행 하지 못함.
(https://wiki.odroid.com/etc/opencv/installation)

odroid@gnome-desktop:~$ cd && git clone https://github.com/opencv/opencv.git

Cloning into 'opencv'...
remote: Enumerating objects: 331257, done.
remote: Counting objects: 100% (67/67), done.
remote: Compressing objects: 100% (52/52), done.
error: RPC failed; curl 92 HTTP/2 stream 0 was not closed cleanly: CANCEL (err 8)
fatal: the remote end hung up unexpectedly
fatal: early EOFs: 63% (208692/331257), 363.55 MiB | 2.50 MiB/s
fatal: index-pack failed
=============================================================



3. 해결 방법이 있는지 문의 드립니다.
2번 에러에 대해서, HOME디렉토리에서 git clone https://github.com/opencv/opencv.git만 실행해도 에러가 발생하나요?

tory45
Posts: 10
Joined: Thu Apr 18, 2024 8:55 am
languages_spoken: korea
Has thanked: 0
Been thanked: 0
Contact:

Re: ubuntu-20.04-npu-odroidm1s-20231226에서 2.5 fps 밖에 안 나오는 이유가 무엇일까요?

Post by tory45 »

네.. 에러가 발생합니다.
===============================================================
odroid@gnome-desktop:~$ git clone https://github.com/opencv/opencv.git
Cloning into 'opencv'...
remote: Enumerating objects: 331266, done.
remote: Counting objects: 100% (76/76), done.
remote: Compressing objects: 100% (59/59), done.
error: RPC failed; curl 92 HTTP/2 stream 0 was not closed cleanly: CANCEL (err 8)
fatal: the remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

odroid@gnome-desktop:~$
odroid@gnome-desktop:~$ ls
Downloads Public Templates Videos cam_demo opencv_contrib rknn-toolkit2 rknn_model_zoo rknpu2
odroid@gnome-desktop:~$ pwd
/home/odroid
odroid@gnome-desktop:~$

User avatar
tobetter
Posts: 13216
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 1014 times
Been thanked: 2301 times
Contact:

Re: ubuntu-20.04-npu-odroidm1s-20231226에서 2.5 fps 밖에 안 나오는 이유가 무엇일까요?

Post by tobetter »

tory45 wrote:
Tue May 14, 2024 11:56 am
네.. 에러가 발생합니다.
===============================================================
odroid@gnome-desktop:~$ git clone https://github.com/opencv/opencv.git
Cloning into 'opencv'...
remote: Enumerating objects: 331266, done.
remote: Counting objects: 100% (76/76), done.
remote: Compressing objects: 100% (59/59), done.
error: RPC failed; curl 92 HTTP/2 stream 0 was not closed cleanly: CANCEL (err 8)
fatal: the remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

odroid@gnome-desktop:~$
odroid@gnome-desktop:~$ ls
Downloads Public Templates Videos cam_demo opencv_contrib rknn-toolkit2 rknn_model_zoo rknpu2
odroid@gnome-desktop:~$ pwd
/home/odroid
odroid@gnome-desktop:~$
아래 링크 참고해서 다시 다운로드 해보시기 바랍니다.
https://erim1005.tistory.com/entry/git- ... e_vignette
https://stackoverflow.com/questions/592 ... tocol-erro

tory45
Posts: 10
Joined: Thu Apr 18, 2024 8:55 am
languages_spoken: korea
Has thanked: 0
Been thanked: 0
Contact:

Re: ubuntu-20.04-npu-odroidm1s-20231226에서 2.5 fps 밖에 안 나오는 이유가 무엇일까요?

Post by tory45 »

쉽지가 않네요..

opencv와 ./build-linux_RK3566_RK3568.sh 은 컴파일까지 성공했습니다. 감사합니다.

근데 컴파일 된 파일을 실행하면 에러가 발생합니다.
다시 컴파일을 했는데도 에러가 나는 이유가 무엇일까요?

==========================================================================
odroid@gnome-desktop:~/rknn_demo/rknpu2/examples/rknn_cam_demo$ ./build-linux_RK3566_RK3568.sh
-- Configuring done
-- Generating done
-- Build files have been written to: /home/odroid/rknn_demo/rknpu2/examples/rknn_cam_demo/build/build_linux_aarch64
[100%] Built target rknn_cam_demo
[100%] Built target rknn_cam_demo
Install the project...
-- Install configuration: ""
-- Installing: /home/odroid/rknn_demo/rknpu2/examples/rknn_cam_demo/install/rknn_cam_demo_Linux/./rknn_cam_demo
-- Up-to-date: /home/odroid/rknn_demo/rknpu2/examples/rknn_cam_demo/install/rknn_cam_demo_Linux/lib/librknnrt.so
-- Up-to-date: /home/odroid/rknn_demo/rknpu2/examples/rknn_cam_demo/install/rknn_cam_demo_Linux/lib/librga.so
-- Up-to-date: /home/odroid/rknn_demo/rknpu2/examples/rknn_cam_demo/install/rknn_cam_demo_Linux/.//model
-- Up-to-date: /home/odroid/rknn_demo/rknpu2/examples/rknn_cam_demo/install/rknn_cam_demo_Linux/.//model/RK3566_RK3568
-- Up-to-date: /home/odroid/rknn_demo/rknpu2/examples/rknn_cam_demo/install/rknn_cam_demo_Linux/.//model/RK3566_RK3568/yolov5s-640-640.rknn
-- Up-to-date: /home/odroid/rknn_demo/rknpu2/examples/rknn_cam_demo/install/rknn_cam_demo_Linux/.//model/coco_80_labels_list.txt
-- Up-to-date: /home/odroid/rknn_demo/rknpu2/examples/rknn_cam_demo/install/rknn_cam_demo_Linux/.//model/RK3588
-- Up-to-date: /home/odroid/rknn_demo/rknpu2/examples/rknn_cam_demo/install/rknn_cam_demo_Linux/.//model/RK3588/yolov5s-640-640.rknn


================================================================================
odroid@gnome-desktop:~/rknn_demo/rknpu2/examples/rknn_cam_demo/install/rknn_cam_demo_Linux$ sudo ./rknn_cam_demo model/RK3566_RK3568/yolov5s-640-640.rknn 640 640
Start..................
Start2..................
terminate called after throwing an instance of 'cv::Exception'
what(): OpenCV(4.9.0-dev) /home/odroid/opencv/modules/highgui/src/window.cpp:1284: error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function 'cvNamedWindow'

Aborted


=====================================================================================
libgtk2.0-dev 와 pkg-config 은 설치 해 주었고 ./build-linux_RK3566_RK3568.sh를 다시 실행하였습니다.
제가 놓친 부분이 또 있을까요?
Attachments
err3.png
err3.png (27.66 KiB) Viewed 46 times
err2.png
err2.png (24.53 KiB) Viewed 46 times

tory45
Posts: 10
Joined: Thu Apr 18, 2024 8:55 am
languages_spoken: korea
Has thanked: 0
Been thanked: 0
Contact:

Re: ubuntu-20.04-npu-odroidm1s-20231226에서 2.5 fps 밖에 안 나오는 이유가 무엇일까요?

Post by tory45 »

opecv에 GTK를 포함시켜 재 컴파일 후 다시 실행 했더니
이번엔 Gstreamer pipline이 생성되지 않아 카메라를 open 할 수 없다는 에러가 나오네요..
====================================================================================
odroid@gnome-desktop:~/rknn_demo/rknpu2/examples/rknn_cam_demo/install/rknn_cam_demo_Linux$ sudo ./rknn_cam_demo model/RK3566_RK3568/yolov5s-640-640.rknn 640 640
Start..................
[ WARN:0@0.461] global cap_gstreamer.cpp:1777 open OpenCV | GStreamer warning: Cannot query video position: status=0, value=-1, duration=-1
[ WARN:0@0.962] global cap_gstreamer.cpp:2839 handleMessage OpenCV | GStreamer warning: Embedded video playback halted; module v4l2src0 reported: Internal data stream error.
[ WARN:0@0.965] global cap_gstreamer.cpp:1208 startPipeline OpenCV | GStreamer warning: unable to start pipeline
ERROR! Unable to open camera
====================================================================================

아래와 같이 gstreamer를 직접 실행하면 영상은 느리긴 하지만 나옵니다.
gst-launch-1.0 v4l2src device=/dev/video0 ! videoconvert ! videoscale ! autovideosink
Attachments
err5.png
err5.png (635.8 KiB) Viewed 29 times
err4.png
err4.png (34.42 KiB) Viewed 31 times

Post Reply

Return to “M1/M1S”

Who is online

Users browsing this forum: No registered users and 2 guests