LuckFox_Pico_plus Using retinaface.rknn model but show error : out of memory

  • Hello, you can try creating a swap file to resolve the issue. Please ensure that you have enough space available. The steps to create a swap partition are as follows:

    Code: Select all

    fallocate -l <size> /swapfile  # Replace <size> with the actual size, e.g., "1G" for SD cards
    chmod 600 /swapfile
    mkswap /swapfile
    swapon /swapfile
    
  • Crocodile wrote: 2024-08-16 3:54 Hello, you can try creating a swap file to resolve the issue. Please ensure that you have enough space available. The steps to create a swap partition are as follows:

    Code: Select all

    fallocate -l <size> /swapfile  # Replace <size> with the actual size, e.g., "1G" for SD cards
    chmod 600 /swapfile
    mkswap /swapfile
    swapon /swapfile
    
    Create a swap file using the method you provided, but encountered some errors.
    The SD card has two partitions mounted to the same directory, but the permissions of the two partitions are different.
    Attachments
    sd_error.png
  • Your SD card appears to have multiple partitions, and the mount permissions may not be set correctly. You can try using

    Code: Select all

    umount /dev/mmcblk1p2
    
    to unmount the unused read-only partition or use

    Code: Select all

    mount -o remount,rw /mnt/sdcard
    
    to remount the partition with read-write permissions.
  • Crocodile wrote: 2024-08-20 1:12 Your SD card appears to have multiple partitions, and the mount permissions may not be set correctly. You can try using

    Code: Select all

    umount /dev/mmcblk1p2
    
    to unmount the unused read-only partition or use

    Code: Select all

    mount -o remount,rw /mnt/sdcard
    
    to remount the partition with read-write permissions.
    Using rknn_yolov5_demo_test to run Retinaface.rknn model but reporting the following segment error.

    Code: Select all

    [root@luckfox tmp]# ./rknn_yolov5_demo_test /mnt/sdcard/app/model/retinaface.rkn
    n
    this device is not whitelisted for capture cvi
    this device is not whitelisted for capture cvi
    this device is not whitelisted for capture cvi
    this device is not whitelisted for capture cvi
    this device is not whitelisted for capture cvi
    this device is not whitelisted for capture cvi
    this device is not whitelisted for capture cvi
      index=0, name=input.1, n_dims=4, dims=[1, 640, 640, 3], n_elems=1228800, size=1228800, fmt=NHWC, type=INT8, qnt_type=AFFINE, zp=-128, scale=0.003768
      index=0, name=501, n_dims=3, dims=[1, 16800, 4, 0], n_elems=67200, size=67200, fmt=UNDEFINED, type=INT8, qnt_type=AFFINE, zp=-121, scale=1.968694
      index=1, name=536, n_dims=3, dims=[1, 16800, 2, 0], n_elems=33600, size=33600, fmt=UNDEFINED, type=INT8, qnt_type=AFFINE, zp=-2, scale=0.243453
      index=2, name=571, n_dims=3, dims=[1, 16800, 10, 0], n_elems=168000, size=168000, fmt=UNDEFINED, type=INT8, qnt_type=AFFINE, zp=-120, scale=1.466372
    model is NHWC input fmt
    model input height=640, width=640, channel=3
    load lable ./model/coco_80_labels_list.txt
    [  319.494610] stream_cif_mipi_id0: s_power 1, entity use_count 1
       devpath = /dev/video11
       driver = rkisp_v7
       card = rkisp_mainpath
       bus_info = platform:rkisp-vir0
       version = 20000
       capabilities = 84201000
       device_caps = 4201000
       fmt = UYVY 4:2:2  59565955
       fmt = Y/CbCr 4:2:2  3631564e
       fmt = Y/CrCb 4:2:2  3136564e
       fmt = Y/CrCb 4:2:0  3132564e
           size = 32 x 16  ~  2304 x 1296  (+8 +8)
       fmt = Y/CbCr 4:2:0  3231564e
       fmt = Y/CrCb 4:2:0 (N-C)  31324d4e
       fmt = Y/CbCr 4:2:0 (N-C)  32314d4e
    rkaiq log level ff0
    [  324.780836] stream_cif_mipi_id0: open video, entity use_countt 2
    [  324.781064] stream_cif_mipi_id1: open video, entity use_countt 1
    /dev/video11 does not support changing fps
    rga_api version 1.10.0_[2]
    [  324.822503] rkisp rkisp-vir0: first params buf queue
    [  324.825224] rkisp_hw ffa00000.rkisp: set isp clk = 198000000Hz
    [  324.825274] rkcif-mipi-lvds: sditf_reinit_mode, mode->rdbk_mode 0, mode->name rkisp-vir0, link_mode 1
    [  324.826980] rkcif-mipi-lvds: stream[0] start streaming
    [  324.827172] rockchip-mipi-csi2 ffa20000.mipi-csi2: stream on, src_sd: e8d396b4, sd_name:rockchip-csi2-dphy0
    [  324.827187] rockchip-mipi-csi2 ffa20000.mipi-csi2: stream ON
    [  324.828392] rockchip-csi2-dphy0: dphy0, data_rate_mbps 506
    [  324.828526] rockchip-csi2-dphy csi2-dphy0: csi2_dphy_s_stream stream on:1, dphy0
    [  324.828563] rockchip-csi2-dphy csi2-dphy0: csi2_dphy_s_stream stream on:1, dphy0
    WENJIE process_i8_rv1106 success,align_c = 255,grid_h = 4, grid_w = 16800
    
    
    
    
    [  507.646953] rga_mm: [tgid:791] Decrement the reference of handle[3] when the user exits
    [  507.647070] rga_mm: [tgid:791] Decrement the reference of handle[4] when the user exits
    [  507.647562] stream_cif_mipi_id1: close video, entity use_count 0
    [  507.647604] stream_cif_mipi_id0: close video, entity use_count 1
    [  507.647957] rkcif-mipi-lvds: stream[0] start stopping, total mode 0x2, cur 0x2
    [  507.683813] rockchip-mipi-csi2 ffa20000.mipi-csi2: stream off, src_sd: e8d396b4, sd_name:rockchip-csi2-dphy0
    [  507.683893] rockchip-mipi-csi2 ffa20000.mipi-csi2: stream OFF
    [  507.684692] rockchip-csi2-dphy csi2-dphy0: csi2_dphy_s_stream_stop stream stop, dphy0
    [  507.684719] rockchip-csi2-dphy csi2-dphy0: csi2_dphy_s_stream stream on:0, dphy0
    [  507.684761] rockchip-csi2-dphy csi2-dphy0: csi2_dphy_s_stream stream on:0, dphy0
    [  507.684975] rkcif-mipi-lvds: stream[0] stopping finished, dma_en 0x0
    [  507.685356] stream_cif_mipi_id0: s_power 0, entity use_count 0
    Segmentation fault (core dumped)
    
  • The model structures of Yolov5 and RetinaFace are different, and the processes they execute are also different. A segmentation fault is inevitable. Please ensure you understand the working principles of RKNN before proceeding with related testing and development.