Yolov2 region layer configuration assertion error on Jetson TX2

Hi!

I’m testing one of my yolov2 project on Jeton TX2 + DeepStreem2.0.
But I got follow error…

Building the TensorRT Engine...
[New Thread 0x7f7166df70 (LWP 18127)]
trt-yolo-app: NvPluginYOLO.cu:225: virtual void nvinfer1::plugin::Region::configure(const nvinfer1::Dims*, int, const nvinfer1::Dims*, int, int): Assertion `C == num * (coords + 1 + classes)' failed.

Thread 1 "trt-yolo-app" received signal SIGABRT, Aborted.
0x0000007fb20fd528 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
54	../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  0x0000007fb20fd528 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
#1  0x0000007fb20fe9e0 in __GI_abort () at abort.c:89
#2  0x0000007fb20f6c04 in __assert_fail_base (fmt=0x7fb21e3290 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x7fb3424a58 "C == num * (coords + 1 + classes)", 
    file=file@entry=0x7fb3424a08 "NvPluginYOLO.cu", line=line@entry=225, 
    function=function@entry=0x7fb3424640 "virtual void nvinfer1::plugin::Region::configure(const nvinfer1::Dims*, int, const nvinfer1::Dims*, int, int)") at assert.c:92
#3  0x0000007fb20f6cac in __GI___assert_fail (assertion=0x7fb3424a58 "C == num * (coords + 1 + classes)", file=0x7fb3424a08 "NvPluginYOLO.cu", line=225, 
    function=0x7fb3424640 "virtual void nvinfer1::plugin::Region::configure(const nvinfer1::Dims*, int, const nvinfer1::Dims*, int, int)") at assert.c:101
#4  0x0000007fb341d390 in nvinfer1::plugin::Region::configure(nvinfer1::Dims const*, int, nvinfer1::Dims const*, int, int) () from /usr/lib/aarch64-linux-gnu/libnvinfer_plugin.so.4
#5  0x0000007fb39dbe40 in nvinfer1::cudnn::PluginLayer::configurePlugin(nvinfer1::cudnn::EngineBuildContext const&) () from /usr/lib/aarch64-linux-gnu/libnvinfer.so.4
#6  0x0000007fb39e9760 in nvinfer1::builder::buildSingleLayer(nvinfer1::cudnn::EngineBuildContext&, nvinfer1::builder::Node&, std::unordered_map<std::string, std::unique_ptr<nvinfer1::cudnn::Region, std::default_delete<nvinfer1::cudnn::Region> >, std::hash<std::string>, std::equal_to<std::string>, std::allocator<std::pair<std::string const, std::unique_ptr<nvinfer1::cudnn::Region, std::default_delete<nvinfer1::cudnn::Region> > > > > const&, nvinfer1::CpuMemoryGroup&, std::unordered_map<std::string, std::vector<float, std::allocator<float> >, std::hash<std::string>, std::equal_to<std::string>, std::allocator<std::pair<std::string const, std::vector<float, std::allocator<float> > > > >*, bool) () from /usr/lib/aarch64-linux-gnu/libnvinfer.so.4
#7  0x0000007fb39ed808 in nvinfer1::builder::makeEngineFromGraph(nvinfer1::CudaEngineBuildConfig const&, nvinfer1::cudnn::HardwareContext const&, nvinfer1::builder::Graph&, std::unordered_map<std::string, std::vector<float, std::allocator<float> >, std::hash<std::string>, std::equal_to<std::string>, std::allocator<std::pair<std::string const, std::vector<float, std::allocator<float> > > > >*, int) ()
   from /usr/lib/aarch64-linux-gnu/libnvinfer.so.4
#8  0x0000007fb39ee9bc in nvinfer1::builder::buildEngine(nvinfer1::CudaEngineBuildConfig&, nvinfer1::cudnn::HardwareContext const&, nvinfer1::Network const&) ()
   from /usr/lib/aarch64-linux-gnu/libnvinfer.so.4
#9  0x0000007fb3a4ca44 in ?? () from /usr/lib/aarch64-linux-gnu/libnvinfer.so.4
#10 0x0000000000421948 in Yolo::createYOLOEngine(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, nvinfer1::DataType, Int8EntropyCalibrator*) ()
#11 0x00000000004247d4 in Yolo::Yolo(unsigned int) ()
#12 0x0000000000425fd4 in YoloV2::YoloV2(unsigned int) ()
#13 0x0000000000409298 in main ()
(gdb) q
A debugging session is active.

	Inferior 1 [process 18112] will be killed.

Maybe the main reason of above error is customized net configuration.
Can you guys help me?

Hi,

DeepStream SDK supports both Jetson and Tesla platform.
Version 2.0 is for the desktop user, not for Jetson.

Please download the DeepStreamSDK 1.5 here:
https://developer.nvidia.com/embedded/deepstream-on-jetson-downloads

Thanks.

Hi AastaLLL,
I’m sorry i missed some information.
I’m using DeepStream 1.5.
Actually I mean “DeepStream Plugin 2.0” at follow github.
https://github.com/vat-nvidia/deepstream-plugins

Examples are perfectly working.
When i apply modified cfg, it doesn’t work…

@wonshik.kim Could you please share what’s the exact change you have done in the cfg ? How does it differ from the standard yolov2 model architecture ?

Hi wonshik.kim,

Is there any update on your issue or it has been resolved?
If not, could you please share what’s the exact change you have done in the cfg ? How does it differ from the standard yolov2 model architecture ?

Thanks

Sorry for the late response.

I edited some layer like ‘route’, ‘upscale’ etc.
So, I changed ‘network_config.cpp’ file with respect to my network configuration. (DS2 plugin)

It works, but the accuracy is not good. So i still find a ways to deal with this problem.

Thanks.

Hi Wonshik

where you able to run the yolov2 using the deepstream plugin for your custom network

Hi skabhilash10

Actually I just use trt-yolo plugin application in Deepstream Plugin 2.0 source code, Not full deepstream SDK version.
Thanks.
You can check follow git.

thanks for the response !!