Xilinx / smartcam

Other
25 stars 21 forks source link

Kria KV260 Vision AI Starter Kit Applications - Smart Camera #10

Open skruglewicz opened 7 months ago

skruglewicz commented 7 months ago

Can someone help ME with my problem: I have been experimenting with the Smart Camera example on the AMD KV260 Vision kit. I am having trouble with a script in the examples section of the Smart Camera GitHub repository. My problem is in the examples section https://github.com/Xilinx/smartcam#example-scripts and on the AMD smart camera page

I have followed all the instructions in the README.md file, but I am still unsuccessful. I am using the KV260 Vision Kit with Ubuntu 22.04 the documentation mentioned advises me to: 1.use the docker image "docker pull xilinx/smartcam:2022.1" 2.run the following docker command: docker run \ --env="DISPLAY" \ -h "xlnx-docker" \ --env="XDG_SESSION_TYPE" \ --net=host \ --privileged \ --volume="$HOME/.Xauthority:/root/.Xauthority:rw" \ -v /tmp:/tmp \ -v /dev:/dev \ -v /sys:/sys \ -v /etc/vart.conf:/etc/vart.conf \ -v /lib/firmware/xilinx:/lib/firmware/xilinx \ -v /run:/run \ -it xilinx/smartcam:2022.1 bash

  1. run the scrip-ts from withing the docker image?

I am trying to run the MIPI DP display example. I have made sure the monitor is connected correctly, as per the instructions in the documentation. The script accepts {width} {height} as the first and second parameters, and the default is 1920 x 1080. However, when I invoke the script as "bash 02.mipi-dp.sh", I get the following error: failed to open device 'xlnx': No such file or directory I have also tried running the Smart Camera command without the script, directly as "smartcam -u 0 -W 1024 -H 768", but I get the same error. Can you please help me understand why this is happening and what I am doing wrong? I would appreciate a response. Thank you Steve K

xlnx-yuxiz commented 7 months ago

Hi Steve K, Can you show more driver info like using lsmod? And also can you try to use the file input command, and can also try -n, --nodet no AI inference option which turns off the AI inference, to help locating the issue?

skruglewicz commented 7 months ago

Hello @xlnx-yuxiz Thank you for your quick response. I will try the lsmod command and the input command and the options you suggested. I will need some verification on the running of these commands before I proceed. You suggested the following 3 task for me to do:

1.Can you show more driver info like using lsmod? 2,And also can you try to use the file input command, 3.and can also try -n, --nodet no AI inference option which turns off the AI inference, to help locating the issue?

On question 1 .... Where is lsmod run from? I ran lsmod from both places (inside the docker image and outside) and came out with the same output. I have the log in a comment below:

On question 2 ... what is the input command and how do I run it? On question3 ... what command do I put these arguments on?

I am fairly new to running the examples on Ubuntu... Thanks for all your help Steve k

skruglewicz commented 7 months ago

hello again @xlnx-yuxiz as you know I am running the docker image "docker pull xilinx/smartcam:2022.1" and then I run the scripts from within the image after run the following docker command: docker run \ --env="DISPLAY" \ -h "xlnx-docker" \ --env="XDG_SESSION_TYPE" \ --net=host \ --privileged \ --volume="$HOME/.Xauthority:/root/.Xauthority:rw" \ -v /tmp:/tmp \ -v /dev:/dev \ -v /sys:/sys \ -v /etc/vart.conf:/etc/vart.conf \ -v /lib/firmware/xilinx:/lib/firmware/xilinx \ -v /run:/run \ -it xilinx/smartcam:2022.1 bash

skruglewicz commented 7 months ago

hello @xlnx-yuxiz

you wrote >>> Can you show more driver info like using lsmod? here is the screen for running the lsmod command. I ran lsmod from both places (inside the docker image and outside)\and received the same output as follows: buntu@kria:~$ lsmod Module Size Used by al5d 24576 0 al5e 24576 0 ap1302 45056 1 allegro 57344 2 al5e,al5d i2c_mux_pca954x 16384 0 xlnx_vcu 24576 5 allegro tls 110592 0 xt_conntrack 16384 1 nft_chain_nat 16384 3 xt_MASQUERADE 20480 1 nf_nat 49152 2 nft_chain_nat,xt_MASQUERADE nf_conntrack 180224 3 xt_conntrack,nf_nat,xt_MASQUERADE nf_defrag_ipv6 24576 1 nf_conntrack nf_defrag_ipv4 16384 1 nf_conntrack nft_counter 16384 15 xt_addrtype 16384 2 nft_compat 20480 4 nf_tables 233472 43 nft_compat,nft_counter,nft_chain_nat nfnetlink 20480 3 nft_compat,nf_tables zocl 204800 1 binfmt_misc 24576 1 input_leds 16384 0 ina260_adc 20480 0 tpm_tis_spi 20480 0 mali 282624 5 uio_pdrv_genirq 20480 0 sch_fq_codel 28672 3 dm_multipath 45056 0 scsi_dh_rdac 24576 0 scsi_dh_emc 16384 0 scsi_dh_alua 28672 0 usb5744 16384 0 dmaproxy 20480 0 iptable_filter 16384 0 ip6table_filter 16384 0 ip6_tables 36864 1 ip6table_filter br_netfilter 32768 0 bridge 323584 1 br_netfilter arp_tables 32768 0 efi_pstore 16384 0 ip_tables 36864 1 iptable_filter x_tables 57344 9 ip6table_filter,xt_conntrack,iptable_filter,nft_compat,xt_addrtype,ip6_tables,ip_tables,xt_MASQUERADE,arp_tables autofs4 53248 2 raid10 73728 0 raid456 196608 0 async_raid6_recov 20480 1 raid456 async_memcpy 20480 1 raid456 async_pq 20480 1 raid456 async_xor 20480 2 async_pq,raid456 async_tx 20480 5 async_pq,async_memcpy,async_xor,raid456,async_raid6_recov raid1 57344 0 raid0 24576 0 multipath 24576 0 linear 20480 0 da9121_regulator 24576 0 rtc_zynqmp 16384 1 spi_zynqmp_gqspi 24576 0 zynqmp_dpsub 57344 0 i2c_cadence 24576 0 usbhid 69632 0 crct10dif_ce 20480 1 aes_neon_bs 32768 0 aes_neon_blk 32768 1 aes_neon_bs aes_ce_blk 36864 0 crypto_simd 24576 3 aes_neon_bs,aes_ce_blk,aes_neon_blk cryptd 28672 1 crypto_simd aes_ce_cipher 20480 1 aes_ce_blk

skruglewicz commented 6 months ago

hello @xlnx-yuxiz

you wrote >>> Can you show more driver info like using lsmod? Did you get my comment above?

xlnx-yuxiz commented 6 months ago

sorry, can you please also run these commands to see the output?

sudo smartcam --mipi -W 1920 -H 1080 --target file sudo smartcam --file ./test.h264 -i h264 -W 1920 -H 1080 -r 30 --target file sudo smartcam --file ./test.h264 -i h264 -W 1920 -H 1080 -r 30 --target file -n about how to prepare the input h264 file please refer to the user guide you mentioned above.

skruglewicz commented 6 months ago

sorry, can you please also run these commands to see the output?

sudo smartcam --mipi -W 1920 -H 1080 --target file sudo smartcam --file ./test.h264 -i h264 -W 1920 -H 1080 -r 30 --target file sudo smartcam --file ./test.h264 -i h264 -W 1920 -H 1080 -r 30 --target file -n about how to prepare the input h264 file please refer to the user guide you mentioned above.

OK I will try this Thanks

skruglewicz commented 6 months ago

hello @xlnx-yuxiz I ran the 3 commands you recommended. and i have included the results in the next 3 comments

sudo smartcam --mipi -W 1920 -H 1080 --target file sudo smartcam --file ./test.h264 -i h264 -W 1920 -H 1080 -r 30 --target file sudo smartcam --file ./test.h264 -i h264 -W 1920 -H 1080 -r 30 --target file -n

the first 2 commands had errors and the 3rd worked?

I hope this will shed some light on my problems with this docker image of the smart camera application? Let me know your thoughts please...

skruglewicz commented 6 months ago

@xlnx-yuxiz command 1 sudo smartcam --mipi -W 1920 -H 1080 --target file

--- output--------------------- root@xlnx-docker:/# smartcam --mipi -W 1920 -H 1080 --target file XRT build version: 2.13.0 Build hash: Build date: 2022-09-15 17:01:20 Git branch: PID: 185 UID: 0 [Thu Mar 21 04:12:39 2024 GMT] HOST: EXE: /opt/xilinx/kv260-smartcam/bin/smartcam [XRT] ERROR: unable to issue xclExecBuf terminate called after throwing an instance of 'xrt_core::system_error' what(): failed to load xclbin: Operation not permitted Aborted (core dumped) end of output---------------------------------------------

skruglewicz commented 6 months ago

@xlnx-yuxiz command 2 Note: sudo is not available in the container. so I'm not using it

smartcam --file ./test.h264 -i h264 -W 1920 -H 1080 -r 30 --target file

--- output---------------------

Build Date: 2022/09/26 15:21 root@xlnx-docker:/# smartcam --file ./test.h264 -i h264 -W 1920 -H 1080 -r 30 --target file XRT build version: 2.13.0 Build hash: Build date: 2022-09-15 17:01:20 Git branch: PID: 241 UID: 0 [Thu Mar 21 06:34:53 2024 GMT] HOST: EXE: /opt/xilinx/kv260-smartcam/bin/smartcam [XRT] ERROR: unable to issue xclExecBuf terminate called after throwing an instance of 'xrt_core::system_error' what(): failed to load xclbin: Operation not permitted Aborted (core dumped)

end of output---------------------------------------------

skruglewicz commented 6 months ago

@xlnx-yuxiz command 3 Note: sudo is not available in the container. so I'm not using it smartcam --file ./test.h264 -i h264 -W 1920 -H 1080 -r 30 --target file -n This command worked So what is going on here?

---output--------------

Build Date: 2022/09/26 15:21 root@xlnx-docker:/# smartcam --file ./test.h264 -i h264 -W 1920 -H 1080 -r 30 --target file -n !! Loop filter is not allowed with GDR enabled !! !! The specified ScalingList is not allowed; it will be adjusted!! !! CABAC encoding is not allowed with this profile; CAVLC will be used instead !! !! The specified Level is too low and will be adjusted !! End of stream Output file is out.h264, please play with your favorite media player, such as VLC, ffplay, etc. to see the video with no AI results. ---end of output