weixin_39747075
weixin_39747075
2020-12-26 07:03

jetson nano上转换yolov4失败,盼解答

望解答,不胜感激。

以下是我的jetson nano配置: JetPack4.4;cuDNN 8.0;CUDA 10.2;OpenCV 4.1.1;Visionworks 1.6;python3 3.6.9 ;TensorRT 7.1.3.4

以下是运行时的输出:


wjc-desktop:~/yolo-tensorrt/build$ ./yolo-trt
File does not exist : ../configs/yolov4-kFLOAT-batch4.engine
Loading pre-trained weights...
Loading complete!
      layer               inp_size            out_size       weightPtr
(1)   conv-bn-mish      3 x 416 x 416      32 x 416 x 416    992   
(2)   conv-bn-mish     32 x 416 x 416      64 x 208 x 208    19680 
(3)   conv-bn-mish     64 x 208 x 208      64 x 208 x 208    24032 
(4)   route                  -             64 x 208 x 208    24032 
(5)   conv-bn-mish     64 x 208 x 208      64 x 208 x 208    28384 
(6)   conv-bn-mish     64 x 208 x 208      32 x 208 x 208    30560 
(7)   conv-bn-mish     32 x 208 x 208      64 x 208 x 208    49248 
(8)   skip             64 x 208 x 208      64 x 208 x 208        - 
(9)   conv-bn-mish     64 x 208 x 208      64 x 208 x 208    53600 
(10)  route                  -            128 x 208 x 208    53600 
(11)  conv-bn-mish    128 x 208 x 208      64 x 208 x 208    62048 
(12)  conv-bn-mish     64 x 208 x 208     128 x 104 x 104    136288
(13)  conv-bn-mish    128 x 104 x 104      64 x 104 x 104    144736
(14)  route                  -            128 x 104 x 104    144736
(15)  conv-bn-mish    128 x 104 x 104      64 x 104 x 104    153184
(16)  conv-bn-mish     64 x 104 x 104      64 x 104 x 104    157536
(17)  conv-bn-mish     64 x 104 x 104      64 x 104 x 104    194656
(18)  skip             64 x 104 x 104      64 x 104 x 104        - 
(19)  conv-bn-mish     64 x 104 x 104      64 x 104 x 104    199008
(20)  conv-bn-mish     64 x 104 x 104      64 x 104 x 104    236128
(21)  skip             64 x 104 x 104      64 x 104 x 104        - 
(22)  conv-bn-mish     64 x 104 x 104      64 x 104 x 104    240480
(23)  route                  -            128 x 104 x 104    240480
(24)  conv-bn-mish    128 x 104 x 104     128 x 104 x 104    257376
(25)  conv-bn-mish    128 x 104 x 104     256 x  52 x  52    553312
(26)  conv-bn-mish    256 x  52 x  52     128 x  52 x  52    586592
(27)  route                  -            256 x  52 x  52    586592
(28)  conv-bn-mish    256 x  52 x  52     128 x  52 x  52    619872
(29)  conv-bn-mish    128 x  52 x  52     128 x  52 x  52    636768
(30)  conv-bn-mish    128 x  52 x  52     128 x  52 x  52    784736
(31)  skip            128 x  52 x  52     128 x  52 x  52        - 
(32)  conv-bn-mish    128 x  52 x  52     128 x  52 x  52    801632
(33)  conv-bn-mish    128 x  52 x  52     128 x  52 x  52    949600
(34)  skip            128 x  52 x  52     128 x  52 x  52        - 
(35)  conv-bn-mish    128 x  52 x  52     128 x  52 x  52    966496
(36)  conv-bn-mish    128 x  52 x  52     128 x  52 x  52    1114464
(37)  skip            128 x  52 x  52     128 x  52 x  52        - 
(38)  conv-bn-mish    128 x  52 x  52     128 x  52 x  52    1131360
(39)  conv-bn-mish    128 x  52 x  52     128 x  52 x  52    1279328
(40)  skip            128 x  52 x  52     128 x  52 x  52        - 
(41)  conv-bn-mish    128 x  52 x  52     128 x  52 x  52    1296224
(42)  conv-bn-mish    128 x  52 x  52     128 x  52 x  52    1444192
(43)  skip            128 x  52 x  52     128 x  52 x  52        - 
(44)  conv-bn-mish    128 x  52 x  52     128 x  52 x  52    1461088
(45)  conv-bn-mish    128 x  52 x  52     128 x  52 x  52    1609056
(46)  skip            128 x  52 x  52     128 x  52 x  52        - 
(47)  conv-bn-mish    128 x  52 x  52     128 x  52 x  52    1625952
(48)  conv-bn-mish    128 x  52 x  52     128 x  52 x  52    1773920
(49)  skip            128 x  52 x  52     128 x  52 x  52        - 
(50)  conv-bn-mish    128 x  52 x  52     128 x  52 x  52    1790816
(51)  conv-bn-mish    128 x  52 x  52     128 x  52 x  52    1938784
(52)  skip            128 x  52 x  52     128 x  52 x  52        - 
(53)  conv-bn-mish    128 x  52 x  52     128 x  52 x  52    1955680
(54)  route                  -            256 x  52 x  52    1955680
(55)  conv-bn-mish    256 x  52 x  52     256 x  52 x  52    2022240
(56)  conv-bn-mish    256 x  52 x  52     512 x  26 x  26    3203936
(57)  conv-bn-mish    512 x  26 x  26     256 x  26 x  26    3336032
(58)  route                  -            512 x  26 x  26    3336032
(59)  conv-bn-mish    512 x  26 x  26     256 x  26 x  26    3468128
(60)  conv-bn-mish    256 x  26 x  26     256 x  26 x  26    3534688
(61)  conv-bn-mish    256 x  26 x  26     256 x  26 x  26    4125536
(62)  skip            256 x  26 x  26     256 x  26 x  26        - 
(63)  conv-bn-mish    256 x  26 x  26     256 x  26 x  26    4192096
(64)  conv-bn-mish    256 x  26 x  26     256 x  26 x  26    4782944
(65)  skip            256 x  26 x  26     256 x  26 x  26        - 
(66)  conv-bn-mish    256 x  26 x  26     256 x  26 x  26    4849504
(67)  conv-bn-mish    256 x  26 x  26     256 x  26 x  26    5440352
(68)  skip            256 x  26 x  26     256 x  26 x  26        - 
(69)  conv-bn-mish    256 x  26 x  26     256 x  26 x  26    5506912
(70)  conv-bn-mish    256 x  26 x  26     256 x  26 x  26    6097760
(71)  skip            256 x  26 x  26     256 x  26 x  26        - 
(72)  conv-bn-mish    256 x  26 x  26     256 x  26 x  26    6164320
(73)  conv-bn-mish    256 x  26 x  26     256 x  26 x  26    6755168
(74)  skip            256 x  26 x  26     256 x  26 x  26        - 
(75)  conv-bn-mish    256 x  26 x  26     256 x  26 x  26    6821728
(76)  conv-bn-mish    256 x  26 x  26     256 x  26 x  26    7412576
(77)  skip            256 x  26 x  26     256 x  26 x  26        - 
(78)  conv-bn-mish    256 x  26 x  26     256 x  26 x  26    7479136
(79)  conv-bn-mish    256 x  26 x  26     256 x  26 x  26    8069984
(80)  skip            256 x  26 x  26     256 x  26 x  26        - 
(81)  conv-bn-mish    256 x  26 x  26     256 x  26 x  26    8136544
(82)  conv-bn-mish    256 x  26 x  26     256 x  26 x  26    8727392
(83)  skip            256 x  26 x  26     256 x  26 x  26        - 
(84)  conv-bn-mish    256 x  26 x  26     256 x  26 x  26    8793952
(85)  route                  -            512 x  26 x  26    8793952
(86)  conv-bn-mish    512 x  26 x  26     512 x  26 x  26    9058144
(87)  conv-bn-mish    512 x  26 x  26    1024 x  13 x  13    13780832
(88)  conv-bn-mish   1024 x  13 x  13     512 x  13 x  13    14307168
(89)  route                  -           1024 x  13 x  13    14307168
(90)  conv-bn-mish   1024 x  13 x  13     512 x  13 x  13    14833504
(91)  conv-bn-mish    512 x  13 x  13     512 x  13 x  13    15097696
(92)  conv-bn-mish    512 x  13 x  13     512 x  13 x  13    17459040
(93)  skip            512 x  13 x  13     512 x  13 x  13        - 
(94)  conv-bn-mish    512 x  13 x  13     512 x  13 x  13    17723232
(95)  conv-bn-mish    512 x  13 x  13     512 x  13 x  13    20084576
(96)  skip            512 x  13 x  13     512 x  13 x  13        - 
(97)  conv-bn-mish    512 x  13 x  13     512 x  13 x  13    20348768
(98)  conv-bn-mish    512 x  13 x  13     512 x  13 x  13    22710112
(99)  skip            512 x  13 x  13     512 x  13 x  13        - 
(100) conv-bn-mish    512 x  13 x  13     512 x  13 x  13    22974304
(101) conv-bn-mish    512 x  13 x  13     512 x  13 x  13    25335648
(102) skip            512 x  13 x  13     512 x  13 x  13        - 
(103) conv-bn-mish    512 x  13 x  13     512 x  13 x  13    25599840
(104) route                  -           1024 x  13 x  13    25599840
(105) conv-bn-mish   1024 x  13 x  13    1024 x  13 x  13    26652512
(106) conv-bn-leaky  1024 x  13 x  13     512 x  13 x  13    27178848
(107) conv-bn-leaky   512 x  13 x  13    1024 x  13 x  13    31901536
(108) conv-bn-leaky  1024 x  13 x  13     512 x  13 x  13    32427872
(109) maxpool         512 x  13 x  13     512 x  13 x  13    32427872
(110) route                  -            512 x  13 x  13    32427872
(111) maxpool         512 x  13 x  13     512 x  13 x  13    32427872
(112) route                  -            512 x  13 x  13    32427872
(113) maxpool         512 x  13 x  13     512 x  13 x  13    32427872
(114) route                  -           2048 x  13 x  13    32427872
(115) conv-bn-leaky  2048 x  13 x  13     512 x  13 x  13    33478496
(116) conv-bn-leaky   512 x  13 x  13    1024 x  13 x  13    38201184
(117) conv-bn-leaky  1024 x  13 x  13     512 x  13 x  13    38727520
(118) conv-bn-leaky   512 x  13 x  13     256 x  13 x  13    38859616
(119) upsample        256 x  13 x  13     256 x  26 x  26        - 
(120) route                  -            512 x  26 x  26    38859616
(121) conv-bn-leaky   512 x  26 x  26     256 x  26 x  26    38991712
(122) route                  -            512 x  26 x  26    38991712
(123) conv-bn-leaky   512 x  26 x  26     256 x  26 x  26    39123808
(124) conv-bn-leaky   256 x  26 x  26     512 x  26 x  26    40305504
(125) conv-bn-leaky   512 x  26 x  26     256 x  26 x  26    40437600
(126) conv-bn-leaky   256 x  26 x  26     512 x  26 x  26    41619296
(127) conv-bn-leaky   512 x  26 x  26     256 x  26 x  26    41751392
(128) conv-bn-leaky   256 x  26 x  26     128 x  26 x  26    41784672
(129) upsample        128 x  26 x  26     128 x  52 x  52        - 
(130) route                  -            256 x  52 x  52    41784672
(131) conv-bn-leaky   256 x  52 x  52     128 x  52 x  52    41817952
(132) route                  -            256 x  52 x  52    41817952
(133) conv-bn-leaky   256 x  52 x  52     128 x  52 x  52    41851232
(134) conv-bn-leaky   128 x  52 x  52     256 x  52 x  52    42147168
(135) conv-bn-leaky   256 x  52 x  52     128 x  52 x  52    42180448
(136) conv-bn-leaky   128 x  52 x  52     256 x  52 x  52    42476384
(137) conv-bn-leaky   256 x  52 x  52     128 x  52 x  52    42509664
(138) conv-bn-leaky   128 x  52 x  52     256 x  52 x  52    42805600
(139) conv-linear     256 x  52 x  52     255 x  52 x  52    42871135
(140) yolo            255 x  52 x  52     255 x  52 x  52    42871135
(141) route                  -            128 x  52 x  52    42871135
(142) conv-bn-leaky   128 x  52 x  52     256 x  26 x  26    43167071
(143) route                  -            512 x  26 x  26    43167071
(144) conv-bn-leaky   512 x  26 x  26     256 x  26 x  26    43299167
(145) conv-bn-leaky   256 x  26 x  26     512 x  26 x  26    44480863
(146) conv-bn-leaky   512 x  26 x  26     256 x  26 x  26    44612959
(147) conv-bn-leaky   256 x  26 x  26     512 x  26 x  26    45794655
(148) conv-bn-leaky   512 x  26 x  26     256 x  26 x  26    45926751
(149) conv-bn-leaky   256 x  26 x  26     512 x  26 x  26    47108447
(150) conv-linear     512 x  26 x  26     255 x  26 x  26    47239262
(151) yolo            255 x  26 x  26     255 x  26 x  26    47239262
(152) route                  -            256 x  26 x  26    47239262
(153) conv-bn-leaky   256 x  26 x  26     512 x  13 x  13    48420958
(154) route                  -           1024 x  13 x  13    48420958
(155) conv-bn-leaky  1024 x  13 x  13     512 x  13 x  13    48947294
(156) conv-bn-leaky   512 x  13 x  13    1024 x  13 x  13    53669982
(157) conv-bn-leaky  1024 x  13 x  13     512 x  13 x  13    54196318
(158) conv-bn-leaky   512 x  13 x  13    1024 x  13 x  13    58919006
(159) conv-bn-leaky  1024 x  13 x  13     512 x  13 x  13    59445342
(160) conv-bn-leaky   512 x  13 x  13    1024 x  13 x  13    64168030
(161) conv-linear    1024 x  13 x  13     255 x  13 x  13    64429405
(162) yolo            255 x  13 x  13     255 x  13 x  13    64429405
File does not exist : ../configs/yolov4-kFLOAT-batch4.engine
Building the TensorRT Engine...
Building complete!
Serializing the TensorRT Engine...
Killed

以下是查看相关存储:


wjc-desktop:~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/mmcblk0p1   59G   19G   38G  34% /
none            1.7G     0  1.7G   0% /dev
tmpfs           2.0G  4.0K  2.0G   1% /dev/shm
tmpfs           2.0G   27M  2.0G   2% /run
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           2.0G     0  2.0G   0% /sys/fs/cgroup
tmpfs           396M   12K  396M   1% /run/user/120
tmpfs           396M  136K  396M   1% /run/user/1000

该提问来源于开源项目:enazoe/yolo-tensorrt

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

5条回答

  • weixin_39747075 weixin_39747075 4月前

    File does not exist : ../configs/yolov4-kFLOAT-batch4.engine Building the TensorRT Engine... Building complete! Serializing the TensorRT Engine... Killed

    补充:也报过这个错误: wjc-desktop:~/yolo-tensorrt/build$ ./yolo-trt File does not exist : ../configs/yolov4-kFLOAT-batch4.engine Loading pre-trained weights... Loading complete! ....... ...... File does not exist : ../configs/yolov4-kFLOAT-batch4.engine Building the TensorRT Engine... Building complete! Serializing the TensorRT Engine... ERROR: FAILED_ALLOCATION: std::bad_alloc yolo-trt: /home/wjc/yolo-tensorrt/modules/yolo.cpp:1251: void Yolo::writePlanFileToDisk(): Assertion `m_ModelStream && "Unable to serialize engine"' failed. Aborted (core dumped)

    点赞 评论 复制链接分享
  • weixin_39992788 weixin_39992788 4月前

    v4不成功,多半是因为内存不够,用nano的换成半精度试试

    点赞 评论 复制链接分享
  • weixin_39992788 weixin_39992788 4月前

    config_v4.inference_precison = FP32; 改这个。fp16 int8

    点赞 评论 复制链接分享
  • weixin_39747075 weixin_39747075 4月前

    config_v4.inference_precison = FP32; 改这个。fp16 int8

    晓得了,感谢指点,我去尝试。

    点赞 评论 复制链接分享
  • weixin_39760434 weixin_39760434 4月前

    -wang 是的就是内存问题

    点赞 评论 复制链接分享

相关推荐