├── CDR jetson docker镜像使用及测试教程.md ├── CDR x86 docker镜像使用及测试教程.md ├── CDR-docker_main_file ├── CDR jetson docker image usage and testing tutorial.md ├── CDR x86 docker image usage and testing tutorial.md ├── deepstream-test7 │ ├── README.md │ ├── client.py │ ├── client_ros.py │ ├── cpp_io │ │ ├── test_7 │ │ └── test_7.cpp │ ├── darknet_ros_msgs │ │ ├── CMakeLists.txt │ │ ├── msg │ │ │ ├── BoundingBox.msg │ │ │ ├── BoundingBox_tensor.msg │ │ │ ├── BoundingBoxes.msg │ │ │ └── BoundingBoxes_tensor.msg │ │ └── package.xml │ ├── deepstream-test_7_cam.py │ ├── deepstream-test_7_file.py │ ├── deepstream-test_7_rtsp.py │ ├── dstest7_pgie_config.txt │ ├── dstest7_tracker_config.txt │ └── internal_memory.txt ├── deepstream-yolov5 │ ├── REAMME.md │ ├── client.py │ ├── client_ros.py │ ├── config_infer_primary.txt │ ├── cpp_io │ │ ├── testv5 │ │ ├── testv5.cpp │ │ ├── yolov5 │ │ └── yolov5.cpp │ ├── darknet_ros_msgs │ │ ├── CMakeLists.txt │ │ ├── msg │ │ │ ├── BoundingBox.msg │ │ │ ├── BoundingBox_tensor.msg │ │ │ ├── BoundingBoxes.msg │ │ │ └── BoundingBoxes_tensor.msg │ │ └── package.xml │ ├── deepstream_yolov5_cam.py │ ├── deepstream_yolov5_file.py │ ├── deepstream_yolov5_rtsp.py │ ├── dstest_v5_tracker_config.txt │ ├── internal_memory.txt │ ├── labels.txt │ ├── nvdsinfer_custom_impl_Yolo │ │ ├── Makefile │ │ ├── calibrator.cpp │ │ ├── calibrator.h │ │ ├── layers │ │ │ ├── activation_layer.cpp │ │ │ ├── activation_layer.h │ │ │ ├── activation_layer.o │ │ │ ├── channels_layer.cpp │ │ │ ├── channels_layer.h │ │ │ ├── channels_layer.o │ │ │ ├── convolutional_layer.cpp │ │ │ ├── convolutional_layer.h │ │ │ ├── convolutional_layer.o │ │ │ ├── dropout_layer.cpp │ │ │ ├── dropout_layer.h │ │ │ ├── dropout_layer.o │ │ │ ├── implicit_layer.cpp │ │ │ ├── implicit_layer.h │ │ │ ├── implicit_layer.o │ │ │ ├── maxpool_layer.cpp │ │ │ ├── maxpool_layer.h │ │ │ ├── maxpool_layer.o │ │ │ ├── route_layer.cpp │ │ │ ├── route_layer.h │ │ │ ├── route_layer.o │ │ │ ├── shortcut_layer.cpp │ │ │ ├── shortcut_layer.h │ │ │ ├── shortcut_layer.o │ │ │ ├── upsample_layer.cpp │ │ │ ├── upsample_layer.h │ │ │ └── upsample_layer.o │ │ ├── libnvdsinfer_custom_impl_Yolo.so │ │ ├── nvdsinfer_yolo_engine.cpp │ │ ├── nvdsinfer_yolo_engine.o │ │ ├── nvdsparsebbox_Yolo.cpp │ │ ├── nvdsparsebbox_Yolo.o │ │ ├── utils.cpp │ │ ├── utils.h │ │ ├── utils.o │ │ ├── yolo.cpp │ │ ├── yolo.h │ │ ├── yolo.o │ │ ├── yoloForward.cu │ │ ├── yoloForward.o │ │ ├── yoloForward_nc.cu │ │ ├── yoloForward_nc.o │ │ ├── yoloForward_r.cu │ │ ├── yoloForward_r.o │ │ ├── yoloForward_v2.cu │ │ ├── yoloForward_v2.o │ │ ├── yoloPlugins.cpp │ │ ├── yoloPlugins.h │ │ └── yoloPlugins.o │ └── requirements.txt └── deepstream-yolox │ ├── README.md │ ├── client.py │ ├── client_ros.py │ ├── config_infer_primary.txt │ ├── cpp_io │ ├── yolox │ └── yolox.cpp │ ├── deepstream_app_config.txt │ ├── deepstream_yolox_cam.py │ ├── deepstream_yolox_file.py │ ├── deepstream_yolox_rtsp.py │ ├── dstest_x_tracker_config.txt │ ├── internal_memory.txt │ ├── labels.txt │ ├── nvdsinfer_custom_impl_yolox │ ├── Makefile │ ├── libnvdsinfer_custom_impl_yolox.so │ ├── nvdsparsebbox_yolox.cpp │ ├── nvdsparsebbox_yolox.o │ └── utils.h │ └── onnx_to_trt.py ├── LICENSE ├── README.md ├── README_EN.md ├── resnet10-ros-deepstream ├── README.md ├── boxes_ws │ ├── .catkin_workspace │ ├── build │ │ ├── .built_by │ │ ├── CATKIN_IGNORE │ │ ├── CMakeCache.txt │ │ ├── CMakeFiles │ │ │ ├── 3.21.2 │ │ │ │ ├── CMakeCCompiler.cmake │ │ │ │ ├── CMakeCXXCompiler.cmake │ │ │ │ ├── CMakeDetermineCompilerABI_C.bin │ │ │ │ ├── CMakeDetermineCompilerABI_CXX.bin │ │ │ │ └── CMakeSystem.cmake │ │ │ ├── CMakeDirectoryInformation.cmake │ │ │ ├── CMakeError.log │ │ │ ├── CMakeOutput.log │ │ │ ├── CMakeRuleHashes.txt │ │ │ ├── Makefile.cmake │ │ │ ├── Makefile2 │ │ │ ├── TargetDirectories.txt │ │ │ ├── clean_test_results.dir │ │ │ │ ├── DependInfo.cmake │ │ │ │ ├── build.make │ │ │ │ ├── cmake_clean.cmake │ │ │ │ ├── compiler_depend.make │ │ │ │ ├── compiler_depend.ts │ │ │ │ └── progress.make │ │ │ ├── cmake.check_cache │ │ │ ├── download_extra_data.dir │ │ │ │ ├── DependInfo.cmake │ │ │ │ ├── build.make │ │ │ │ ├── cmake_clean.cmake │ │ │ │ ├── compiler_depend.make │ │ │ │ ├── compiler_depend.ts │ │ │ │ └── progress.make │ │ │ ├── doxygen.dir │ │ │ │ ├── DependInfo.cmake │ │ │ │ ├── build.make │ │ │ │ ├── cmake_clean.cmake │ │ │ │ ├── compiler_depend.make │ │ │ │ ├── compiler_depend.ts │ │ │ │ └── progress.make │ │ │ ├── progress.marks │ │ │ ├── run_tests.dir │ │ │ │ ├── DependInfo.cmake │ │ │ │ ├── build.make │ │ │ │ ├── cmake_clean.cmake │ │ │ │ ├── compiler_depend.make │ │ │ │ ├── compiler_depend.ts │ │ │ │ └── progress.make │ │ │ └── tests.dir │ │ │ │ ├── DependInfo.cmake │ │ │ │ ├── build.make │ │ │ │ ├── cmake_clean.cmake │ │ │ │ ├── compiler_depend.make │ │ │ │ ├── compiler_depend.ts │ │ │ │ └── progress.make │ │ ├── CTestConfiguration.ini │ │ ├── CTestCustom.cmake │ │ ├── CTestTestfile.cmake │ │ ├── Makefile │ │ ├── atomic_configure │ │ │ ├── .rosinstall │ │ │ ├── _setup_util.py │ │ │ ├── env.sh │ │ │ ├── local_setup.bash │ │ │ ├── local_setup.sh │ │ │ ├── local_setup.zsh │ │ │ ├── setup.bash │ │ │ ├── setup.sh │ │ │ └── setup.zsh │ │ ├── catkin_generated │ │ │ ├── env_cached.sh │ │ │ ├── generate_cached_setup.py │ │ │ ├── installspace │ │ │ │ ├── .rosinstall │ │ │ │ ├── _setup_util.py │ │ │ │ ├── env.sh │ │ │ │ ├── local_setup.bash │ │ │ │ ├── local_setup.sh │ │ │ │ ├── local_setup.zsh │ │ │ │ ├── setup.bash │ │ │ │ ├── setup.sh │ │ │ │ └── setup.zsh │ │ │ ├── order_packages.cmake │ │ │ ├── order_packages.py │ │ │ └── setup_cached.sh │ │ ├── catkin_make.cache │ │ ├── cmake_install.cmake │ │ ├── darknet_ros_msgs │ │ │ ├── CMakeFiles │ │ │ │ ├── CMakeDirectoryInformation.cmake │ │ │ │ └── progress.marks │ │ │ ├── CTestTestfile.cmake │ │ │ ├── Makefile │ │ │ ├── catkin_generated │ │ │ │ ├── darknet_ros_msgs-msg-extras.cmake.develspace.in │ │ │ │ ├── darknet_ros_msgs-msg-extras.cmake.installspace.in │ │ │ │ ├── ordered_paths.cmake │ │ │ │ ├── package.cmake │ │ │ │ ├── pkg.develspace.context.pc.py │ │ │ │ └── pkg.installspace.context.pc.py │ │ │ ├── cmake │ │ │ │ ├── darknet_ros_msgs-genmsg-context.py │ │ │ │ └── darknet_ros_msgs-genmsg.cmake │ │ │ └── cmake_install.cmake │ │ └── gtest │ │ │ ├── CMakeFiles │ │ │ ├── CMakeDirectoryInformation.cmake │ │ │ └── progress.marks │ │ │ ├── CTestTestfile.cmake │ │ │ ├── Makefile │ │ │ ├── cmake_install.cmake │ │ │ └── googlemock │ │ │ ├── CTestTestfile.cmake │ │ │ ├── Makefile │ │ │ └── cmake_install.cmake │ ├── devel │ │ ├── .built_by │ │ ├── .catkin │ │ ├── .rosinstall │ │ ├── _setup_util.py │ │ ├── cmake.lock │ │ ├── env.sh │ │ ├── include │ │ │ └── darknet_ros_msgs │ │ │ │ ├── BoundingBox.h │ │ │ │ ├── BoundingBox_tensor.h │ │ │ │ ├── BoundingBoxes.h │ │ │ │ └── BoundingBoxes_tensor.h │ │ ├── lib │ │ │ └── pkgconfig │ │ │ │ └── darknet_ros_msgs.pc │ │ ├── local_setup.bash │ │ ├── local_setup.sh │ │ ├── local_setup.zsh │ │ ├── setup.bash │ │ ├── setup.sh │ │ └── setup.zsh │ └── src │ │ ├── CMakeLists.txt │ │ └── darknet_ros_msgs │ │ ├── CMakeLists.txt │ │ ├── msg │ │ ├── BoundingBox.msg │ │ ├── BoundingBox_tensor.msg │ │ ├── BoundingBoxes.msg │ │ └── BoundingBoxes_tensor.msg │ │ └── package.xml └── deepstream_python_apps │ ├── .python-app-pipeline.png │ ├── .test3-app.png │ ├── FAQ.md │ ├── HOWTO.md │ ├── LICENSE │ ├── THIRD_PARTY_LICENSE │ └── apps │ ├── README │ ├── common │ ├── FPS.py │ ├── __init__.py │ ├── __pycache__ │ │ ├── FPS.cpython-36.pyc │ │ ├── __init__.cpython-36.pyc │ │ ├── bus_call.cpython-36.pyc │ │ └── is_aarch_64.cpython-36.pyc │ ├── bus_call.py │ ├── is_aarch_64.py │ └── utils.py │ ├── deepstream-test1-usbcam │ ├── README │ ├── deepstream_test_1_usb.py │ └── dstest1_pgie_config.txt │ ├── deepstream-test7 │ ├── README.md │ ├── client_ros_7.py │ ├── deepstream-test_7_usb_file.py │ ├── dstest7_pgie_config.txt │ ├── dstest7_sgie1_config.txt │ ├── dstest7_tracker_config.txt │ ├── internal_memory.txt │ └── tracker_config.yml │ └── runtime_source_add_delete │ ├── README │ ├── deepstream_rt_src_add_del.py │ ├── dstest_pgie_config.txt │ ├── dstest_sgie1_config.txt │ ├── dstest_sgie2_config.txt │ ├── dstest_sgie3_config.txt │ ├── dstest_tracker_config.txt │ └── tracker_config.yml ├── yolov5-deepstream-cpp ├── README.md ├── README_EN.md └── yolov5-io-cpp │ ├── config_infer_number_sv30.txt │ ├── config_infer_primary.txt │ ├── cpp_io │ ├── yolov5_tensor │ └── yolov5_tensor.cpp │ ├── deepstream_app_config.txt │ ├── deepstream_app_number_sv30.txt │ ├── labels.txt │ ├── number_v30.txt │ ├── nvdsinfer_custom_impl_Yolo │ ├── Makefile │ ├── internal_memory.txt │ ├── libnvdsinfer_custom_impl_Yolo.so │ ├── nvdsparsebbox_Yolo.cpp │ ├── nvdsparsebbox_Yolo.o │ ├── utils.h │ ├── yololayer.cu │ ├── yololayer.h │ └── yololayer.o │ ├── source1_csi_dec_infer_yolov5.txt │ ├── source1_usb_dec_infer_yolov5.txt │ └── tracker_config.yml ├── yolov5-deepstream-python ├── README.md ├── README_EN.md └── yolov5-io-python │ ├── client.py │ ├── config_infer_number_sv30.txt │ ├── config_infer_primary.txt │ ├── deepstream_app_config.txt │ ├── deepstream_app_number_sv30.txt │ ├── labels.txt │ ├── number_v30.txt │ ├── nvdsinfer_custom_impl_Yolo │ ├── Makefile │ ├── internal_memory.txt │ ├── libnvdsinfer_custom_impl_Yolo.so │ ├── nvdsparsebbox_Yolo.cpp │ ├── nvdsparsebbox_Yolo.o │ ├── utils.h │ ├── yololayer.cu │ ├── yololayer.h │ └── yololayer.o │ ├── source1_csi_dec_infer_yolov5.txt │ ├── source1_usb_dec_infer_yolov5.txt │ └── tracker_config.yml ├── yolov5-ros-deepstream ├── README.md ├── README_EN.md ├── boxes_ws │ ├── .catkin_workspace │ └── src │ │ ├── CMakeLists.txt │ │ └── darknet_ros_msgs │ │ ├── CMakeLists.txt │ │ ├── msg │ │ ├── BoundingBox.msg │ │ ├── BoundingBox_tensor.msg │ │ ├── BoundingBoxes.msg │ │ └── BoundingBoxes_tensor.msg │ │ └── package.xml ├── client_ros.py └── yolov5-ros │ ├── client_ros.py │ ├── config_infer_number_sv30.txt │ ├── config_infer_primary.txt │ ├── darknet_ros_msgs │ ├── deepstream_app_config.txt │ ├── deepstream_app_number_sv30.txt │ ├── labels.txt │ ├── number_v30.txt │ ├── nvdsinfer_custom_impl_Yolo │ ├── Makefile │ ├── internal_memory.txt │ ├── libnvdsinfer_custom_impl_Yolo.so │ ├── nvdsparsebbox_Yolo.cpp │ ├── nvdsparsebbox_Yolo.o │ ├── utils.h │ ├── yololayer.cu │ ├── yololayer.h │ └── yololayer.o │ ├── source1_csi_dec_infer_yolov5.txt │ ├── source1_usb_dec_infer_yolov5.txt │ └── tracker_config.yml ├── yolox-deepstream-cpp ├── README.md └── yolox-io-cpp │ ├── README.md │ ├── config_infer_primary.txt │ ├── cpp_io │ ├── yolox_tensor │ └── yolox_tensor.cpp │ ├── deepstream_app_config.txt │ ├── labels.txt │ ├── nvdsinfer_custom_impl_yolox │ ├── Makefile │ ├── internal_memory.txt │ ├── libnvdsinfer_custom_impl_yolox.so │ ├── nvdsparsebbox_yolox.cpp │ ├── nvdsparsebbox_yolox.o │ └── utils.h │ ├── source1_csi_dec_infer_yolox.txt │ ├── source1_usb_dec_infer_yolox.txt │ └── tracker_config.yml ├── yolox-deepstream-python ├── README.md └── yolox-io-python │ ├── README.md │ ├── client.py │ ├── config_infer_primary.txt │ ├── deepstream_app_config.txt │ ├── labels.txt │ ├── nvdsinfer_custom_impl_yolox │ ├── Makefile │ ├── internal_memory.txt │ ├── libnvdsinfer_custom_impl_yolox.so │ ├── nvdsparsebbox_yolox.cpp │ ├── nvdsparsebbox_yolox.o │ └── utils.h │ ├── source1_csi_dec_infer_yolox.txt │ ├── source1_usb_dec_infer_yolox.txt │ └── tracker_config.yml └── yolox-ros-deepstream ├── README.md ├── README_EN.md ├── boxes_ws ├── .catkin_workspace └── src │ └── darknet_ros_msgs │ ├── CMakeLists.txt │ ├── msg │ ├── BoundingBox.msg │ ├── BoundingBox_tensor.msg │ ├── BoundingBoxes.msg │ └── BoundingBoxes_tensor.msg │ └── package.xml └── yolox-ros ├── README.md ├── client_ros.py ├── config_infer_primary.txt ├── darknet_ros_msgs ├── deepstream_app_config.txt ├── labels.txt ├── nvdsinfer_custom_impl_yolox ├── Makefile ├── internal_memory.txt ├── libnvdsinfer_custom_impl_yolox.so ├── nvdsparsebbox_yolox.cpp ├── nvdsparsebbox_yolox.o └── utils.h ├── source1_csi_dec_infer_yolox.txt ├── source1_usb_dec_infer_yolox.txt └── tracker_config.yml /CDR-docker_main_file/deepstream-test7/README.md: -------------------------------------------------------------------------------- 1 | 2 | # 读取视频文件 3 | ## video_file: 4 | python3 deepstream-test_7_file.py file:///opt/nvidia/deepstream/deepstream-6.0/samples/streams/sample_qHD.mp4 5 | 6 | # 读取usb实时视频源 7 | ## real_video: 8 | python3 deepstream-test_7_cam.py /dev/video0 9 | 10 | # 读取rtsp实时视频流 11 | ## rtsp_stream: 12 | python3 deepstream-test_7_rtsp.py rtsp://admin:ak123456@192.168.0.123:554/ch1/main/av_stream 13 | python3 deepstream-test_7_rtsp.py rtsp://192.168.0.104:8554/live.ts 14 | 15 | 16 | # 如果没有现成rtsp流,可使用usb转rtsp方法(在宿主机运行,此方案视频流延迟较大): 17 | ## usb-stream convert to rtsp-stream 18 | - cvlc -vvv v4l2:///dev/video0 --sout '#transcode{vcodec=h264,vb=800,acodec=mp4a}:rtp{sdp=rtsp://192.168.0.105:8554/live.ts}' -I dummy 19 | - 参考`https://blog.csdn.net/zong596568821xp/article/details/88540455`方法3 vlc 20 | -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-test7/client.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | import numpy 3 | import time 4 | import re 5 | import mmap 6 | global boundingboxes_txt 7 | global boundingboxes_list 8 | if __name__ == "__main__": 9 | while (1): 10 | with open('/opt/nvidia/deepstream/deepstream-6.0/sources/deepstream_python_apps/apps/deepstream-test7/internal_memory.txt', 'r+b') as f: 11 | # mmap基本上接收两个参数,(文件描述符,读取长度),size 为0表示读取整个文件 12 | mm = mmap.mmap(f.fileno(), 0) 13 | mm.seek(0) # 定位到文件头 14 | # byte_numline = mm[0] # mm[]取出来的是byte类型, 要转为int型 15 | byte_numline = mm.read(5) 16 | str_numline = str(byte_numline) # 将bytes转化为str类型 17 | print("str_numline:", str_numline) 18 | data_len = re.findall(r"\d+\.?\d*",str_numline) 19 | print("data_len:", int(data_len[0])) 20 | boundingboxes_txt = str(mm[6:int(data_len[0])+6]) 21 | mm.close() 22 | boundingboxes_list = re.findall(r"\d+\.?\d*", boundingboxes_txt) 23 | # print('boundingboxes_list = ',boundingboxes_list) 24 | array_boundingbox = numpy.array(boundingboxes_list) 25 | #print("array_boundingbox = ",boundingboxes_list) 26 | box_number = len(boundingboxes_list) // 6 27 | print('box_number = ', box_number) 28 | re_array_boundingbox = numpy.resize(array_boundingbox, (box_number, 6)) 29 | #print('re_array_boundingbox:\n', re_array_boundingbox) 30 | print(re_array_boundingbox) 31 | print("#---------------------------------------------------------------#") -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-test7/cpp_io/test_7: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/CDR-docker_main_file/deepstream-test7/cpp_io/test_7 -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-test7/cpp_io/test_7.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | //字符串中提取数字 16 | int get_num(char* ss) 17 | { 18 | int cnt_index = 0, cnt_int = 0; 19 | //cnt_int 用于存放字符串中的数字. 20 | //cnt_index 作为字符串b的下标. 21 | for (int i = 0; ss[i] != '\0'; ++i) //当a数组元素不为结束符时.遍历字符串a. 22 | { 23 | if (ss[i] >= '0'&& ss[i] <= '9') //如果是数字. 24 | { 25 | cnt_int *= 10;//先乘以10保证先检测到的数字存在高位,后检测的存在低位 26 | cnt_int += ss[i] - '0'; //数字字符的ascii-字符'0'的ascii码就等于该数字. 27 | } 28 | // cout << cnt_int << endl; //输出数字.(12345) 29 | } 30 | return cnt_int; 31 | } 32 | 33 | int main() 34 | { 35 | while(1) 36 | { 37 | int fd = open("/opt/nvidia/deepstream/deepstream-6.0/sources/deepstream_python_apps/apps/deepstream-test7/internal_memory.txt",O_RDONLY); 38 | char *addr = (char *)mmap(NULL, 3008, PROT_READ,MAP_SHARED, fd, 0); 39 | if (addr == MAP_FAILED) 40 | { 41 | perror("mmap err"); 42 | return -1; 43 | } 44 | //char* addr = (char*)mmap(NULL, boundingboxes_len, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); 45 | close(fd); 46 | char data[10] = {0}; 47 | std::string str_data; 48 | memcpy(data, addr, 5); // 40*60+10(the largest number of objects is 40) 49 | int data_len = get_num(data); 50 | //std::cout << "data_len:" << data_len << std::endl; 51 | /*------------below two line will show Memory overflow question------------*/ 52 | char true_data[data_len] = {0}; 53 | // char true_true_data[data_len-10] = {0}; 54 | memcpy(true_data, addr, data_len+6); 55 | std::cout << true_data << std::endl; 56 | munmap(addr,3008); 57 | } 58 | return 0; 59 | } 60 | -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-test7/darknet_ros_msgs/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.12) 2 | 3 | project(darknet_ros_msgs) 4 | 5 | set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}") 6 | 7 | find_package(catkin REQUIRED 8 | COMPONENTS 9 | geometry_msgs 10 | sensor_msgs 11 | std_msgs 12 | message_generation 13 | ) 14 | 15 | add_message_files( 16 | FILES 17 | BoundingBox.msg 18 | BoundingBoxes.msg 19 | BoundingBox_tensor.msg 20 | BoundingBoxes_tensor.msg 21 | ) 22 | 23 | #add_action_files( 24 | # FILES 25 | # CheckForObjects.action 26 | #) 27 | 28 | generate_messages( 29 | DEPENDENCIES 30 | geometry_msgs 31 | sensor_msgs 32 | std_msgs 33 | ) 34 | 35 | catkin_package( 36 | CATKIN_DEPENDS 37 | geometry_msgs 38 | sensor_msgs 39 | message_runtime 40 | std_msgs 41 | ) 42 | -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-test7/darknet_ros_msgs/msg/BoundingBox.msg: -------------------------------------------------------------------------------- 1 | float64 probability 2 | int64 x_center 3 | int64 y_center 4 | int16 id 5 | string Class 6 | -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-test7/darknet_ros_msgs/msg/BoundingBox_tensor.msg: -------------------------------------------------------------------------------- 1 | int64 class_id 2 | int64 top 3 | int64 left 4 | int64 width 5 | int64 height 6 | int16 object_id 7 | -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-test7/darknet_ros_msgs/msg/BoundingBoxes.msg: -------------------------------------------------------------------------------- 1 | BoundingBox[] bounding_boxes 2 | -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-test7/darknet_ros_msgs/msg/BoundingBoxes_tensor.msg: -------------------------------------------------------------------------------- 1 | BoundingBox_tensor[] boundingboxes_tensor 2 | -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-test7/darknet_ros_msgs/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | darknet_ros_msgs 4 | 1.1.4 5 | Darknet is an open source neural network framework that runs on CPU and GPU. You only look once (YOLO) is a state-of-the-art, real-time object detection system. 6 | Marko Bjelonic 7 | BSD 8 | https://github.com/leggedrobotics/darknet_ros 9 | Marko Bjelonic 10 | 11 | catkin 12 | 13 | 14 | geometry_msgs 15 | sensor_msgs 16 | message_generation 17 | std_msgs 18 | 19 | geometry_msgs 20 | sensor_msgs 21 | message_runtime 22 | std_msgs 23 | 24 | -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-test7/dstest7_tracker_config.txt: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Copyright (c) 2018-2020, NVIDIA CORPORATION. All rights reserved. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a 5 | # copy of this software and associated documentation files (the "Software"), 6 | # to deal in the Software without restriction, including without limitation 7 | # the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | # and/or sell copies of the Software, and to permit persons to whom the 9 | # Software is furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in 12 | # all copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17 | # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 19 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20 | # DEALINGS IN THE SOFTWARE. 21 | ################################################################################ 22 | 23 | # Mandatory properties for the tracker: 24 | # tracker-width 25 | # tracker-height: needs to be multiple of 6 for NvDCF 26 | # gpu-id 27 | # ll-lib-file: path to low-level tracker lib 28 | # ll-config-file: required for NvDCF, optional for KLT and IOU 29 | # 30 | [tracker] 31 | enable=1 32 | # For NvDCF and DeepSORT tracker, tracker-width and tracker-height must be a multiple of 32, respectively 33 | tracker-width=640 34 | tracker-height=384 35 | ll-lib-file=/opt/nvidia/deepstream/deepstream-6.0/lib/libnvds_nvmultiobjecttracker.so 36 | # ll-config-file required to set different tracker types 37 | # ll-config-file=../../samples/configs/deepstream-app/config_tracker_IOU.yml 38 | # ll-config-file=../../samples/configs/deepstream-app/config_tracker_NvDCF_perf.yml 39 | # ll-config-file=../../samples/configs/deepstream-app/config_tracker_NvDCF_accuracy.yml 40 | ll-config-file=../../samples/configs/deepstream-app/config_tracker_DeepSORT.yml 41 | gpu-id=0 42 | #enable-batch-process=1 43 | #enable-past-frame=1 44 | display-tracking-id=1 -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolov5/REAMME.md: -------------------------------------------------------------------------------- 1 | ### usb摄像头实时检测程序 2 | - `deepstream_yolov5_cam.py`运行方式: 3 | python3 deepstream_yolov5_cam.py /dev/video0 4 | 5 | ### 视频文件实时检测程序 6 | - `deepstream_yolov5_file.py`运行方式: 7 | python3 deepstream_yolov5_file.py file:///opt/nvidia/deepstream/deepstream-6.0/samples/streams/sample_qHD.h264 8 | 9 | ### rtsp流实时检测 10 | `deepstream_yolov5_rtsp.py`运行方式: 11 | python3 deepstream_yolov5_rtsp.py rtsp://admin:ak123456@192.168.0.123:554/ch1/main/av_stream 12 | python3 deepstream_yolov5_rtsp.py rtsp://192.168.0.105:8554/live.ts 13 | 14 | 15 | 16 | # 如果没有现成rtsp流,可使用usb转rtsp方法(在宿主机运行,此方案视频流延迟较大): 17 | ## usb-stream convert to rtsp-stream 18 | - cvlc -vvv v4l2:///dev/video0 --sout '#transcode{vcodec=h264,vb=800,acodec=mp4a}:rtp{sdp=rtsp://192.168.0.105:8554/live.ts}' -I dummy 19 | - 参考`https://blog.csdn.net/zong596568821xp/article/details/88540455`方法3 vlc 20 | 21 | 22 | -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolov5/client.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | import numpy 3 | import time 4 | import re 5 | import mmap 6 | global boundingboxes_txt 7 | global boundingboxes_list 8 | if __name__ == "__main__": 9 | while (1): 10 | with open('/opt/nvidia/deepstream/deepstream-6.0/sources/deepstream_python_apps/apps/deepstream-yolov5/internal_memory.txt', 'r+b') as f: 11 | # mmap基本上接收两个参数,(文件描述符,读取长度),size 为0表示读取整个文件 12 | mm = mmap.mmap(f.fileno(), 0) 13 | mm.seek(0) # 定位到文件头 14 | # byte_numline = mm[0] # mm[]取出来的是byte类型, 要转为int型 15 | byte_numline = mm.read(5) 16 | str_numline = str(byte_numline) # 将bytes转化为str类型 17 | print("str_numline:", str_numline) 18 | data_len = re.findall(r"\d+\.?\d*",str_numline) 19 | print("data_len:", int(data_len[0])) 20 | boundingboxes_txt = str(mm[6:int(data_len[0])+6]) 21 | mm.close() 22 | boundingboxes_list = re.findall(r"\d+\.?\d*", boundingboxes_txt) 23 | # print('boundingboxes_list = ',boundingboxes_list) 24 | array_boundingbox = numpy.array(boundingboxes_list) 25 | #print("array_boundingbox = ",boundingboxes_list) 26 | box_number = len(boundingboxes_list) // 6 27 | print('box_number = ', box_number) 28 | re_array_boundingbox = numpy.resize(array_boundingbox, (box_number, 6)) 29 | #print('re_array_boundingbox:\n', re_array_boundingbox) 30 | print(re_array_boundingbox) 31 | print("#---------------------------------------------------------------#") -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolov5/config_infer_primary.txt: -------------------------------------------------------------------------------- 1 | [property] 2 | gpu-id=0 3 | net-scale-factor=0.0039215697906911373 4 | model-color-format=0 5 | #custom-network-config=yolov5s.cfg 6 | #model-file=yolov5s.wts 7 | #model-engine-file=model_b1_gpu0_int8.engine 8 | #model-engine-file=model_b1_gpu0_m_fp32.engine 9 | model-engine-file=model_b1_gpu0_s_fp32.engine 10 | #int8-calib-file=/opt/nvidia/deepstream/deepstream-6.0/samples/models/Primary_Detector/cal_trt.bin 11 | labelfile-path=labels.txt 12 | batch-size=1 13 | network-mode=0 14 | num-detected-classes=80 15 | interval=0 16 | gie-unique-id=1 17 | process-mode=1 18 | network-type=0 19 | cluster-mode=4 20 | maintain-aspect-ratio=1 21 | parse-bbox-func-name=NvDsInferParseYolo 22 | custom-lib-path=nvdsinfer_custom_impl_Yolo/libnvdsinfer_custom_impl_Yolo.so 23 | engine-create-func-name=NvDsInferYoloCudaEngineGet 24 | 25 | [class-attrs-all] 26 | pre-cluster-threshold=0.25 -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolov5/cpp_io/testv5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/CDR-docker_main_file/deepstream-yolov5/cpp_io/testv5 -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolov5/cpp_io/testv5.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | int get_num(char* ss) 16 | { 17 | int cnt_index = 0, cnt_int = 0; 18 | //cnt_int 用于存放字符串中的数字. 19 | //cnt_index 作为字符串b的下标. 20 | for (int i = 0; ss[i] != '\0'; ++i) //当a数组元素不为结束符时.遍历字符串a. 21 | { 22 | if (ss[i] >= '0'&& ss[i] <= '9') //如果是数字. 23 | { 24 | cnt_int *= 10;//先乘以10保证先检测到的数字存在高位,后检测的存在低位 25 | cnt_int += ss[i] - '0'; //数字字符的ascii-字符'0'的ascii码就等于该数字. 26 | } 27 | // cout << cnt_int << endl; //输出数字.(12345) 28 | } 29 | return cnt_int; 30 | } 31 | 32 | int main() 33 | { 34 | while(1) 35 | { 36 | int fd = open("/opt/nvidia/deepstream/deepstream-6.0/sources/deepstream_python_apps/apps/deepstream-yolov5/internal_memory.txt",O_RDONLY); 37 | char *addr = (char *)mmap(NULL, 3008, PROT_READ,MAP_SHARED, fd, 0); 38 | if (addr == MAP_FAILED) 39 | { 40 | perror("mmap err"); 41 | return -1; 42 | } 43 | //char* addr = (char*)mmap(NULL, boundingboxes_len, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); 44 | close(fd); 45 | char data[10] = {0}; 46 | std::string str_data; 47 | int data_len; 48 | memcpy(data, addr, 5); // 40*60+10(the largest number of objects is 40) 49 | // int data_len = (int(data[0])-48)*60 + 10; 50 | // get_num(data) 51 | std::cout << "data:" << get_num(data) << std::endl; 52 | /*------------below two line will show Memory overflow question------------*/ 53 | // char true_data[data_len] = {0}; 54 | // char true_true_data[data_len-10] = {0}; 55 | // memcpy(true_data, addr, data_len-1); 56 | //std::cout << true_data << std::endl; 57 | munmap(addr,3008); 58 | } 59 | return 0; 60 | } 61 | -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolov5/cpp_io/yolov5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/CDR-docker_main_file/deepstream-yolov5/cpp_io/yolov5 -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolov5/cpp_io/yolov5.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | //字符串中提取数字 16 | int get_num(char* ss) 17 | { 18 | int cnt_index = 0, cnt_int = 0; 19 | //cnt_int 用于存放字符串中的数字. 20 | //cnt_index 作为字符串b的下标. 21 | for (int i = 0; ss[i] != '\0'; ++i) //当a数组元素不为结束符时.遍历字符串a. 22 | { 23 | if (ss[i] >= '0'&& ss[i] <= '9') //如果是数字. 24 | { 25 | cnt_int *= 10;//先乘以10保证先检测到的数字存在高位,后检测的存在低位 26 | cnt_int += ss[i] - '0'; //数字字符的ascii-字符'0'的ascii码就等于该数字. 27 | } 28 | // cout << cnt_int << endl; //输出数字.(12345) 29 | } 30 | return cnt_int; 31 | } 32 | 33 | int main() 34 | { 35 | while(1) 36 | { 37 | int fd = open("/opt/nvidia/deepstream/deepstream-6.0/sources/deepstream_python_apps/apps/deepstream-yolov5/internal_memory.txt",O_RDONLY); 38 | char *addr = (char *)mmap(NULL, 3008, PROT_READ,MAP_SHARED, fd, 0); 39 | if (addr == MAP_FAILED) 40 | { 41 | perror("mmap err"); 42 | return -1; 43 | } 44 | //char* addr = (char*)mmap(NULL, boundingboxes_len, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); 45 | close(fd); 46 | char data[10] = {0}; 47 | std::string str_data; 48 | memcpy(data, addr, 5); // 40*60+10(the largest number of objects is 40) 49 | int data_len = get_num(data); 50 | //std::cout << "data_len:" << data_len << std::endl; 51 | /*------------below two line will show Memory overflow question------------*/ 52 | char true_data[data_len] = {0}; 53 | // char true_true_data[data_len-10] = {0}; 54 | memcpy(true_data, addr, data_len+6); 55 | std::cout << true_data << std::endl; 56 | munmap(addr,3008); 57 | } 58 | return 0; 59 | } -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolov5/darknet_ros_msgs/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.12) 2 | 3 | project(darknet_ros_msgs) 4 | 5 | set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}") 6 | 7 | find_package(catkin REQUIRED 8 | COMPONENTS 9 | geometry_msgs 10 | sensor_msgs 11 | std_msgs 12 | message_generation 13 | ) 14 | 15 | add_message_files( 16 | FILES 17 | BoundingBox.msg 18 | BoundingBoxes.msg 19 | BoundingBox_tensor.msg 20 | BoundingBoxes_tensor.msg 21 | ) 22 | 23 | #add_action_files( 24 | # FILES 25 | # CheckForObjects.action 26 | #) 27 | 28 | generate_messages( 29 | DEPENDENCIES 30 | geometry_msgs 31 | sensor_msgs 32 | std_msgs 33 | ) 34 | 35 | catkin_package( 36 | CATKIN_DEPENDS 37 | geometry_msgs 38 | sensor_msgs 39 | message_runtime 40 | std_msgs 41 | ) 42 | -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolov5/darknet_ros_msgs/msg/BoundingBox.msg: -------------------------------------------------------------------------------- 1 | float64 probability 2 | int64 x_center 3 | int64 y_center 4 | int16 id 5 | string Class 6 | -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolov5/darknet_ros_msgs/msg/BoundingBox_tensor.msg: -------------------------------------------------------------------------------- 1 | int64 class_id 2 | int64 top 3 | int64 left 4 | int64 width 5 | int64 height 6 | int16 object_id 7 | -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolov5/darknet_ros_msgs/msg/BoundingBoxes.msg: -------------------------------------------------------------------------------- 1 | BoundingBox[] bounding_boxes 2 | -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolov5/darknet_ros_msgs/msg/BoundingBoxes_tensor.msg: -------------------------------------------------------------------------------- 1 | BoundingBox_tensor[] boundingboxes_tensor 2 | -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolov5/darknet_ros_msgs/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | darknet_ros_msgs 4 | 1.1.4 5 | Darknet is an open source neural network framework that runs on CPU and GPU. You only look once (YOLO) is a state-of-the-art, real-time object detection system. 6 | Marko Bjelonic 7 | BSD 8 | https://github.com/leggedrobotics/darknet_ros 9 | Marko Bjelonic 10 | 11 | catkin 12 | 13 | 14 | geometry_msgs 15 | sensor_msgs 16 | message_generation 17 | std_msgs 18 | 19 | geometry_msgs 20 | sensor_msgs 21 | message_runtime 22 | std_msgs 23 | 24 | -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolov5/dstest_v5_tracker_config.txt: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Copyright (c) 2018-2020, NVIDIA CORPORATION. All rights reserved. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a 5 | # copy of this software and associated documentation files (the "Software"), 6 | # to deal in the Software without restriction, including without limitation 7 | # the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | # and/or sell copies of the Software, and to permit persons to whom the 9 | # Software is furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in 12 | # all copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17 | # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 19 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20 | # DEALINGS IN THE SOFTWARE. 21 | ################################################################################ 22 | 23 | # Mandatory properties for the tracker: 24 | # tracker-width 25 | # tracker-height: needs to be multiple of 6 for NvDCF 26 | # gpu-id 27 | # ll-lib-file: path to low-level tracker lib 28 | # ll-config-file: required for NvDCF, optional for KLT and IOU 29 | # 30 | [tracker] 31 | enable=1 32 | # For NvDCF and DeepSORT tracker, tracker-width and tracker-height must be a multiple of 32, respectively 33 | tracker-width=640 34 | tracker-height=384 35 | ll-lib-file=/opt/nvidia/deepstream/deepstream-6.0/lib/libnvds_nvmultiobjecttracker.so 36 | # ll-config-file required to set different tracker types 37 | # ll-config-file=../../samples/configs/deepstream-app/config_tracker_IOU.yml 38 | #ll-config-file=../../samples/configs/deepstream-app/config_tracker_NvDCF_perf.yml 39 | # ll-config-file=../../samples/configs/deepstream-app/config_tracker_NvDCF_accuracy.yml 40 | ll-config-file=../../samples/configs/deepstream-app/config_tracker_DeepSORT.yml 41 | gpu-id=0 42 | #enable-batch-process=1 43 | #enable-past-frame=1 44 | display-tracking-id=1 45 | -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolov5/labels.txt: -------------------------------------------------------------------------------- 1 | person 2 | bicycle 3 | car 4 | motorbike 5 | aeroplane 6 | bus 7 | train 8 | truck 9 | boat 10 | traffic light 11 | fire hydrant 12 | stop sign 13 | parking meter 14 | bench 15 | bird 16 | cat 17 | dog 18 | horse 19 | sheep 20 | cow 21 | elephant 22 | bear 23 | zebra 24 | giraffe 25 | backpack 26 | umbrella 27 | handbag 28 | tie 29 | suitcase 30 | frisbee 31 | skis 32 | snowboard 33 | sports ball 34 | kite 35 | baseball bat 36 | baseball glove 37 | skateboard 38 | surfboard 39 | tennis racket 40 | bottle 41 | wine glass 42 | cup 43 | fork 44 | knife 45 | spoon 46 | bowl 47 | banana 48 | apple 49 | sandwich 50 | orange 51 | broccoli 52 | carrot 53 | hot dog 54 | pizza 55 | donut 56 | cake 57 | chair 58 | sofa 59 | pottedplant 60 | bed 61 | diningtable 62 | toilet 63 | tvmonitor 64 | laptop 65 | mouse 66 | remote 67 | keyboard 68 | cell phone 69 | microwave 70 | oven 71 | toaster 72 | sink 73 | refrigerator 74 | book 75 | clock 76 | vase 77 | scissors 78 | teddy bear 79 | hair drier 80 | toothbrush -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolov5/nvdsinfer_custom_impl_Yolo/calibrator.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Created by Marcos Luciano 3 | * https://www.github.com/marcoslucianops 4 | */ 5 | 6 | #ifndef CALIBRATOR_H 7 | #define CALIBRATOR_H 8 | 9 | #include "opencv2/opencv.hpp" 10 | #include "cuda_runtime.h" 11 | #include "NvInfer.h" 12 | #include 13 | #include 14 | 15 | #ifndef CUDA_CHECK 16 | #define CUDA_CHECK(callstr) \ 17 | { \ 18 | cudaError_t error_code = callstr; \ 19 | if (error_code != cudaSuccess) { \ 20 | std::cerr << "CUDA error " << error_code << " at " << __FILE__ << ":" << __LINE__; \ 21 | assert(0); \ 22 | } \ 23 | } 24 | #endif 25 | 26 | namespace nvinfer1 { 27 | class Int8EntropyCalibrator2 : public nvinfer1::IInt8EntropyCalibrator2 { 28 | public: 29 | Int8EntropyCalibrator2(const int &batchsize, 30 | const int &channels, 31 | const int &height, 32 | const int &width, 33 | const int &letterbox, 34 | const std::string &imgPath, 35 | const std::string &calibTablePath); 36 | 37 | virtual ~Int8EntropyCalibrator2(); 38 | int getBatchSize() const noexcept override; 39 | bool getBatch(void* bindings[], const char* names[], int nbBindings) noexcept override; 40 | const void* readCalibrationCache(std::size_t& length) noexcept override; 41 | void writeCalibrationCache(const void* cache, size_t length) noexcept override; 42 | 43 | private: 44 | int batchSize; 45 | int inputC; 46 | int inputH; 47 | int inputW; 48 | int letterBox; 49 | std::string calibTablePath; 50 | size_t imageIndex; 51 | size_t inputCount; 52 | std::vector imgPaths; 53 | float *batchData{ nullptr }; 54 | void *deviceInput{ nullptr }; 55 | bool readCache; 56 | std::vector calibrationCache; 57 | }; 58 | } 59 | 60 | std::vector prepareImage(cv::Mat& img, int input_c, int input_h, int input_w, int letter_box); 61 | 62 | #endif //CALIBRATOR_H -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolov5/nvdsinfer_custom_impl_Yolo/layers/activation_layer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Created by Marcos Luciano 3 | * https://www.github.com/marcoslucianops 4 | */ 5 | 6 | #ifndef __ACTIVATION_LAYER_H__ 7 | #define __ACTIVATION_LAYER_H__ 8 | 9 | #include 10 | #include 11 | #include 12 | 13 | #include "NvInfer.h" 14 | 15 | #include "activation_layer.h" 16 | 17 | nvinfer1::ILayer* activationLayer( 18 | int layerIdx, 19 | std::string activation, 20 | nvinfer1::ILayer* output, 21 | nvinfer1::ITensor* input, 22 | nvinfer1::INetworkDefinition* network); 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolov5/nvdsinfer_custom_impl_Yolo/layers/activation_layer.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/CDR-docker_main_file/deepstream-yolov5/nvdsinfer_custom_impl_Yolo/layers/activation_layer.o -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolov5/nvdsinfer_custom_impl_Yolo/layers/channels_layer.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Created by Marcos Luciano 3 | * https://www.github.com/marcoslucianops 4 | */ 5 | 6 | #include "channels_layer.h" 7 | 8 | nvinfer1::ILayer* channelsLayer( 9 | std::string type, 10 | nvinfer1::ITensor* input, 11 | nvinfer1::ITensor* implicitTensor, 12 | nvinfer1::INetworkDefinition* network) 13 | { 14 | nvinfer1::ILayer* output; 15 | 16 | if (type == "shift") { 17 | nvinfer1::IElementWiseLayer* ew = network->addElementWise( 18 | *input, *implicitTensor, 19 | nvinfer1::ElementWiseOperation::kSUM); 20 | assert(ew != nullptr); 21 | output = ew; 22 | } 23 | else if (type == "control") { 24 | nvinfer1::IElementWiseLayer* ew = network->addElementWise( 25 | *input, *implicitTensor, 26 | nvinfer1::ElementWiseOperation::kPROD); 27 | assert(ew != nullptr); 28 | output = ew; 29 | } 30 | 31 | return output; 32 | } -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolov5/nvdsinfer_custom_impl_Yolo/layers/channels_layer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Created by Marcos Luciano 3 | * https://www.github.com/marcoslucianops 4 | */ 5 | 6 | #ifndef __CHANNELS_LAYER_H__ 7 | #define __CHANNELS_LAYER_H__ 8 | 9 | #include 10 | #include 11 | 12 | #include "NvInfer.h" 13 | 14 | nvinfer1::ILayer* channelsLayer( 15 | std::string type, 16 | nvinfer1::ITensor* input, 17 | nvinfer1::ITensor* implicitTensor, 18 | nvinfer1::INetworkDefinition* network); 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolov5/nvdsinfer_custom_impl_Yolo/layers/channels_layer.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/CDR-docker_main_file/deepstream-yolov5/nvdsinfer_custom_impl_Yolo/layers/channels_layer.o -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolov5/nvdsinfer_custom_impl_Yolo/layers/convolutional_layer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Created by Marcos Luciano 3 | * https://www.github.com/marcoslucianops 4 | */ 5 | 6 | #ifndef __CONVOLUTIONAL_LAYER_H__ 7 | #define __CONVOLUTIONAL_LAYER_H__ 8 | 9 | #include 10 | #include 11 | 12 | #include "NvInfer.h" 13 | 14 | #include "activation_layer.h" 15 | 16 | nvinfer1::ILayer* convolutionalLayer( 17 | int layerIdx, 18 | std::map& block, 19 | std::vector& weights, 20 | std::vector& trtWeights, 21 | int& weightPtr, 22 | std::string weightsType, 23 | int& inputChannels, 24 | nvinfer1::ITensor* input, 25 | nvinfer1::INetworkDefinition* network); 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolov5/nvdsinfer_custom_impl_Yolo/layers/convolutional_layer.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/CDR-docker_main_file/deepstream-yolov5/nvdsinfer_custom_impl_Yolo/layers/convolutional_layer.o -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolov5/nvdsinfer_custom_impl_Yolo/layers/dropout_layer.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Created by Marcos Luciano 3 | * https://www.github.com/marcoslucianops 4 | */ 5 | 6 | #include "dropout_layer.h" 7 | 8 | nvinfer1::ILayer* dropoutLayer( 9 | float probability, 10 | nvinfer1::ITensor* input, 11 | nvinfer1::INetworkDefinition* network) 12 | { 13 | nvinfer1::ILayer* output; 14 | return output; 15 | } -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolov5/nvdsinfer_custom_impl_Yolo/layers/dropout_layer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Created by Marcos Luciano 3 | * https://www.github.com/marcoslucianops 4 | */ 5 | 6 | #ifndef __DROPOUT_LAYER_H__ 7 | #define __DROPOUT_LAYER_H__ 8 | 9 | #include "NvInfer.h" 10 | 11 | nvinfer1::ILayer* dropoutLayer( 12 | float probability, 13 | nvinfer1::ITensor* input, 14 | nvinfer1::INetworkDefinition* network); 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolov5/nvdsinfer_custom_impl_Yolo/layers/dropout_layer.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/CDR-docker_main_file/deepstream-yolov5/nvdsinfer_custom_impl_Yolo/layers/dropout_layer.o -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolov5/nvdsinfer_custom_impl_Yolo/layers/implicit_layer.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Created by Marcos Luciano 3 | * https://www.github.com/marcoslucianops 4 | */ 5 | 6 | #include 7 | #include "implicit_layer.h" 8 | 9 | nvinfer1::ILayer* implicitLayer( 10 | int channels, 11 | std::vector& weights, 12 | std::vector& trtWeights, 13 | int& weightPtr, 14 | nvinfer1::INetworkDefinition* network) 15 | { 16 | nvinfer1::Weights convWt{nvinfer1::DataType::kFLOAT, nullptr, channels}; 17 | 18 | float* val = new float[channels]; 19 | for (int i = 0; i < channels; ++i) 20 | { 21 | val[i] = weights[weightPtr]; 22 | weightPtr++; 23 | } 24 | convWt.values = val; 25 | trtWeights.push_back(convWt); 26 | 27 | nvinfer1::IConstantLayer* implicit = network->addConstant(nvinfer1::Dims3{static_cast(channels), 1, 1}, convWt); 28 | assert(implicit != nullptr); 29 | 30 | return implicit; 31 | } -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolov5/nvdsinfer_custom_impl_Yolo/layers/implicit_layer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Created by Marcos Luciano 3 | * https://www.github.com/marcoslucianops 4 | */ 5 | 6 | #ifndef __IMPLICIT_LAYER_H__ 7 | #define __IMPLICIT_LAYER_H__ 8 | 9 | #include 10 | #include 11 | #include 12 | 13 | #include "NvInfer.h" 14 | 15 | nvinfer1::ILayer* implicitLayer( 16 | int channels, 17 | std::vector& weights, 18 | std::vector& trtWeights, 19 | int& weightPtr, 20 | nvinfer1::INetworkDefinition* network); 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolov5/nvdsinfer_custom_impl_Yolo/layers/implicit_layer.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/CDR-docker_main_file/deepstream-yolov5/nvdsinfer_custom_impl_Yolo/layers/implicit_layer.o -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolov5/nvdsinfer_custom_impl_Yolo/layers/maxpool_layer.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Created by Marcos Luciano 3 | * https://www.github.com/marcoslucianops 4 | */ 5 | 6 | #include "maxpool_layer.h" 7 | 8 | nvinfer1::ILayer* maxpoolLayer( 9 | int layerIdx, 10 | std::map& block, 11 | nvinfer1::ITensor* input, 12 | nvinfer1::INetworkDefinition* network) 13 | { 14 | assert(block.at("type") == "maxpool"); 15 | assert(block.find("size") != block.end()); 16 | assert(block.find("stride") != block.end()); 17 | 18 | int size = std::stoi(block.at("size")); 19 | int stride = std::stoi(block.at("stride")); 20 | 21 | nvinfer1::IPoolingLayer* pool 22 | = network->addPoolingNd(*input, nvinfer1::PoolingType::kMAX, nvinfer1::DimsHW{size, size}); 23 | assert(pool); 24 | std::string maxpoolLayerName = "maxpool_" + std::to_string(layerIdx); 25 | pool->setStrideNd(nvinfer1::DimsHW{stride, stride}); 26 | pool->setPaddingMode(nvinfer1::PaddingMode::kSAME_UPPER); 27 | pool->setName(maxpoolLayerName.c_str()); 28 | 29 | return pool; 30 | } -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolov5/nvdsinfer_custom_impl_Yolo/layers/maxpool_layer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Created by Marcos Luciano 3 | * https://www.github.com/marcoslucianops 4 | */ 5 | 6 | #ifndef __MAXPOOL_LAYER_H__ 7 | #define __MAXPOOL_LAYER_H__ 8 | 9 | #include 10 | #include 11 | 12 | #include "NvInfer.h" 13 | 14 | nvinfer1::ILayer* maxpoolLayer( 15 | int layerIdx, 16 | std::map& block, 17 | nvinfer1::ITensor* input, 18 | nvinfer1::INetworkDefinition* network); 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolov5/nvdsinfer_custom_impl_Yolo/layers/maxpool_layer.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/CDR-docker_main_file/deepstream-yolov5/nvdsinfer_custom_impl_Yolo/layers/maxpool_layer.o -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolov5/nvdsinfer_custom_impl_Yolo/layers/route_layer.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Created by Marcos Luciano 3 | * https://www.github.com/marcoslucianops 4 | */ 5 | 6 | #include "route_layer.h" 7 | 8 | nvinfer1::ILayer* routeLayer( 9 | int layerIdx, 10 | std::map& block, 11 | std::vector tensorOutputs, 12 | nvinfer1::INetworkDefinition* network) 13 | { 14 | std::string strLayers = block.at("layers"); 15 | std::vector idxLayers; 16 | size_t lastPos = 0, pos = 0; 17 | while ((pos = strLayers.find(',', lastPos)) != std::string::npos) { 18 | int vL = std::stoi(trim(strLayers.substr(lastPos, pos - lastPos))); 19 | idxLayers.push_back (vL); 20 | lastPos = pos + 1; 21 | } 22 | if (lastPos < strLayers.length()) { 23 | std::string lastV = trim(strLayers.substr(lastPos)); 24 | if (!lastV.empty()) { 25 | idxLayers.push_back (std::stoi(lastV)); 26 | } 27 | } 28 | assert (!idxLayers.empty()); 29 | std::vector concatInputs; 30 | for (int idxLayer : idxLayers) { 31 | if (idxLayer < 0) { 32 | idxLayer = tensorOutputs.size() + idxLayer; 33 | } 34 | assert (idxLayer >= 0 && idxLayer < (int)tensorOutputs.size()); 35 | concatInputs.push_back (tensorOutputs[idxLayer]); 36 | } 37 | 38 | nvinfer1::IConcatenationLayer* concat = 39 | network->addConcatenation(concatInputs.data(), concatInputs.size()); 40 | assert(concat != nullptr); 41 | std::string concatLayerName = "route_" + std::to_string(layerIdx - 1); 42 | concat->setName(concatLayerName.c_str()); 43 | concat->setAxis(0); 44 | 45 | nvinfer1::ILayer* output = concat; 46 | 47 | if (block.find("groups") != block.end()) { 48 | nvinfer1::Dims prevTensorDims = output->getOutput(0)->getDimensions(); 49 | int groups = stoi(block.at("groups")); 50 | int group_id = stoi(block.at("group_id")); 51 | int startSlice = (prevTensorDims.d[0] / groups) * group_id; 52 | int channelSlice = (prevTensorDims.d[0] / groups); 53 | nvinfer1::ISliceLayer* sl = network->addSlice( 54 | *output->getOutput(0), 55 | nvinfer1::Dims3{startSlice, 0, 0}, 56 | nvinfer1::Dims3{channelSlice, prevTensorDims.d[1], prevTensorDims.d[2]}, 57 | nvinfer1::Dims3{1, 1, 1}); 58 | assert(sl != nullptr); 59 | output = sl; 60 | } 61 | 62 | return output; 63 | } -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolov5/nvdsinfer_custom_impl_Yolo/layers/route_layer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Created by Marcos Luciano 3 | * https://www.github.com/marcoslucianops 4 | */ 5 | 6 | #ifndef __ROUTE_LAYER_H__ 7 | #define __ROUTE_LAYER_H__ 8 | 9 | #include "NvInfer.h" 10 | #include "../utils.h" 11 | 12 | nvinfer1::ILayer* routeLayer( 13 | int layerIdx, 14 | std::map& block, 15 | std::vector tensorOutputs, 16 | nvinfer1::INetworkDefinition* network); 17 | 18 | #endif -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolov5/nvdsinfer_custom_impl_Yolo/layers/route_layer.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/CDR-docker_main_file/deepstream-yolov5/nvdsinfer_custom_impl_Yolo/layers/route_layer.o -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolov5/nvdsinfer_custom_impl_Yolo/layers/shortcut_layer.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Created by Marcos Luciano 3 | * https://www.github.com/marcoslucianops 4 | */ 5 | 6 | #include "shortcut_layer.h" 7 | 8 | nvinfer1::ILayer* shortcutLayer( 9 | int layerIdx, 10 | std::string activation, 11 | std::string inputVol, 12 | std::string shortcutVol, 13 | nvinfer1::ITensor* input, 14 | nvinfer1::ITensor* shortcutTensor, 15 | nvinfer1::INetworkDefinition* network) 16 | { 17 | nvinfer1::ILayer* output; 18 | nvinfer1::ITensor* outputTensor; 19 | 20 | if (inputVol != shortcutVol) 21 | { 22 | nvinfer1::ISliceLayer* sl = network->addSlice( 23 | *shortcutTensor, 24 | nvinfer1::Dims3{0, 0, 0}, 25 | input->getDimensions(), 26 | nvinfer1::Dims3{1, 1, 1}); 27 | assert(sl != nullptr); 28 | outputTensor = sl->getOutput(0); 29 | assert(outputTensor != nullptr); 30 | } else 31 | { 32 | outputTensor = shortcutTensor; 33 | assert(outputTensor != nullptr); 34 | } 35 | 36 | nvinfer1::IElementWiseLayer* ew = network->addElementWise( 37 | *input, *outputTensor, 38 | nvinfer1::ElementWiseOperation::kSUM); 39 | assert(ew != nullptr); 40 | 41 | output = activationLayer(layerIdx, activation, ew, ew->getOutput(0), network); 42 | assert(output != nullptr); 43 | 44 | return output; 45 | } -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolov5/nvdsinfer_custom_impl_Yolo/layers/shortcut_layer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Created by Marcos Luciano 3 | * https://www.github.com/marcoslucianops 4 | */ 5 | 6 | #ifndef __SHORTCUT_LAYER_H__ 7 | #define __SHORTCUT_LAYER_H__ 8 | 9 | #include "NvInfer.h" 10 | 11 | #include "activation_layer.h" 12 | 13 | nvinfer1::ILayer* shortcutLayer( 14 | int layerIdx, 15 | std::string activation, 16 | std::string inputVol, 17 | std::string shortcutVol, 18 | nvinfer1::ITensor* input, 19 | nvinfer1::ITensor* shortcutTensor, 20 | nvinfer1::INetworkDefinition* network); 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolov5/nvdsinfer_custom_impl_Yolo/layers/shortcut_layer.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/CDR-docker_main_file/deepstream-yolov5/nvdsinfer_custom_impl_Yolo/layers/shortcut_layer.o -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolov5/nvdsinfer_custom_impl_Yolo/layers/upsample_layer.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Created by Marcos Luciano 3 | * https://www.github.com/marcoslucianops 4 | */ 5 | 6 | #include "upsample_layer.h" 7 | 8 | nvinfer1::ILayer* upsampleLayer( 9 | int layerIdx, 10 | std::map& block, 11 | nvinfer1::ITensor* input, 12 | nvinfer1::INetworkDefinition* network) 13 | { 14 | assert(block.at("type") == "upsample"); 15 | int stride = std::stoi(block.at("stride")); 16 | 17 | nvinfer1::IResizeLayer* resize_layer = network->addResize(*input); 18 | resize_layer->setResizeMode(nvinfer1::ResizeMode::kNEAREST); 19 | float scale[3] = {1, static_cast(stride), static_cast(stride)}; 20 | resize_layer->setScales(scale, 3); 21 | std::string layer_name = "upsample_" + std::to_string(layerIdx); 22 | resize_layer->setName(layer_name.c_str()); 23 | return resize_layer; 24 | } -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolov5/nvdsinfer_custom_impl_Yolo/layers/upsample_layer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Created by Marcos Luciano 3 | * https://www.github.com/marcoslucianops 4 | */ 5 | 6 | #ifndef __UPSAMPLE_LAYER_H__ 7 | #define __UPSAMPLE_LAYER_H__ 8 | 9 | #include 10 | #include 11 | #include 12 | 13 | #include "NvInfer.h" 14 | 15 | nvinfer1::ILayer* upsampleLayer( 16 | int layerIdx, 17 | std::map& block, 18 | nvinfer1::ITensor* input, 19 | nvinfer1::INetworkDefinition* network); 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolov5/nvdsinfer_custom_impl_Yolo/layers/upsample_layer.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/CDR-docker_main_file/deepstream-yolov5/nvdsinfer_custom_impl_Yolo/layers/upsample_layer.o -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolov5/nvdsinfer_custom_impl_Yolo/libnvdsinfer_custom_impl_Yolo.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/CDR-docker_main_file/deepstream-yolov5/nvdsinfer_custom_impl_Yolo/libnvdsinfer_custom_impl_Yolo.so -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolov5/nvdsinfer_custom_impl_Yolo/nvdsinfer_yolo_engine.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/CDR-docker_main_file/deepstream-yolov5/nvdsinfer_custom_impl_Yolo/nvdsinfer_yolo_engine.o -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolov5/nvdsinfer_custom_impl_Yolo/nvdsparsebbox_Yolo.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/CDR-docker_main_file/deepstream-yolov5/nvdsinfer_custom_impl_Yolo/nvdsparsebbox_Yolo.o -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolov5/nvdsinfer_custom_impl_Yolo/utils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved. 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the "Software"), 6 | * to deal in the Software without restriction, including without limitation 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | * and/or sell copies of the Software, and to permit persons to whom the 9 | * Software is furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 19 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20 | * DEALINGS IN THE SOFTWARE. 21 | 22 | * Edited by Marcos Luciano 23 | * https://www.github.com/marcoslucianops 24 | */ 25 | 26 | 27 | #ifndef __UTILS_H__ 28 | #define __UTILS_H__ 29 | 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | 36 | #include "NvInfer.h" 37 | 38 | #define UNUSED(expr) (void)(expr) 39 | #define DIVUP(n, d) ((n) + (d)-1) / (d) 40 | 41 | std::string trim(std::string s); 42 | float clamp(const float val, const float minVal, const float maxVal); 43 | bool fileExists(const std::string fileName, bool verbose = true); 44 | std::vector loadWeights(const std::string weightsFilePath, const std::string& networkType); 45 | std::string dimsToString(const nvinfer1::Dims d); 46 | void displayDimType(const nvinfer1::Dims d); 47 | int getNumChannels(nvinfer1::ITensor* t); 48 | uint64_t get3DTensorVolume(nvinfer1::Dims inputDims); 49 | 50 | void printLayerInfo(std::string layerIndex, std::string layerName, std::string layerInput, 51 | std::string layerOutput, std::string weightPtr); 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolov5/nvdsinfer_custom_impl_Yolo/utils.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/CDR-docker_main_file/deepstream-yolov5/nvdsinfer_custom_impl_Yolo/utils.o -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolov5/nvdsinfer_custom_impl_Yolo/yolo.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/CDR-docker_main_file/deepstream-yolov5/nvdsinfer_custom_impl_Yolo/yolo.o -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolov5/nvdsinfer_custom_impl_Yolo/yoloForward.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/CDR-docker_main_file/deepstream-yolov5/nvdsinfer_custom_impl_Yolo/yoloForward.o -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolov5/nvdsinfer_custom_impl_Yolo/yoloForward_nc.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/CDR-docker_main_file/deepstream-yolov5/nvdsinfer_custom_impl_Yolo/yoloForward_nc.o -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolov5/nvdsinfer_custom_impl_Yolo/yoloForward_r.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/CDR-docker_main_file/deepstream-yolov5/nvdsinfer_custom_impl_Yolo/yoloForward_r.o -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolov5/nvdsinfer_custom_impl_Yolo/yoloForward_v2.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/CDR-docker_main_file/deepstream-yolov5/nvdsinfer_custom_impl_Yolo/yoloForward_v2.o -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolov5/nvdsinfer_custom_impl_Yolo/yoloPlugins.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/CDR-docker_main_file/deepstream-yolov5/nvdsinfer_custom_impl_Yolo/yoloPlugins.o -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolov5/requirements.txt: -------------------------------------------------------------------------------- 1 | 2 | # pip install -r requirements.txt 3 | 4 | # Base ---------------------------------------- 5 | matplotlib>=3.2.2 6 | numpy>=1.18.5 7 | opencv-python>=4.1.2 8 | Pillow>=7.1.2 9 | PyYAML>=5.3.1 10 | requests>=2.23.0 11 | scipy>=1.4.1 12 | torch>=1.7.0 13 | torchvision>=0.8.1 14 | tqdm>=4.41.0 15 | 16 | # Logging ------------------------------------- 17 | tensorboard>=2.4.1 18 | # wandb 19 | 20 | # Plotting ------------------------------------ 21 | pandas>=1.1.4 22 | seaborn>=0.11.0 23 | 24 | # Export -------------------------------------- 25 | # coremltools>=4.1 # CoreML export 26 | # onnx>=1.9.0 # ONNX export 27 | # onnx-simplifier>=0.3.6 # ONNX simplifier 28 | # scikit-learn==0.19.2 # CoreML quantization 29 | # tensorflow>=2.4.1 # TFLite export 30 | # tensorflowjs>=3.9.0 # TF.js export 31 | # openvino-dev # OpenVINO export 32 | 33 | # Extras -------------------------------------- 34 | # albumentations>=1.0.3 35 | # Cython # for pycocotools https://github.com/cocodataset/cocoapi/issues/172 36 | # pycocotools>=2.0 # COCO mAP 37 | # roboflow 38 | thop # FLOPs computation -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolox/README.md: -------------------------------------------------------------------------------- 1 | ### usb摄像头实时检测程序 2 | - `deepstream_yolox_cam.py`运行方式: 3 | python3 deepstream_yolox_cam.py /dev/video0 4 | 5 | ### mp4视频文件实时检测程序 6 | - `deepstream_yolox_file.py`运行方式: 7 | python3 deepstream_yolox_file.py file:///opt/nvidia/deepstream/deepstream-6.0/samples/streams/sample_qHD.h264 8 | 9 | 10 | ### rtsp流实时检测 11 | - `deepstream_yolox_rtsp.py`运行方式: 12 | python3 deepstream_yolox_rtsp.py rtsp://admin:ak123456@192.168.0.123:554/ch1/main/av_stream 13 | python3 deepstream_yolox_rtsp.py rtsp://192.168.0.105:8554/live.ts 14 | 15 | 16 | # 如果没有现成rtsp流,可使用usb转rtsp方法(在宿主机运行,此方案视频流延迟较大): 17 | ## usb-stream convert to rtsp-stream 18 | - cvlc -vvv v4l2:///dev/video0 --sout '#transcode{vcodec=h264,vb=800,acodec=mp4a}:rtp{sdp=rtsp://192.168.0.105:8554/live.ts}' -I dummy 19 | - 参考`https://blog.csdn.net/zong596568821xp/article/details/88540455`方法3 vlc -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolox/client.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | import numpy 3 | import time 4 | import re 5 | import mmap 6 | global boundingboxes_txt 7 | global boundingboxes_list 8 | if __name__ == "__main__": 9 | while (1): 10 | with open('/opt/nvidia/deepstream/deepstream-6.0/sources/deepstream_python_apps/apps/deepstream-test7/internal_memory.txt', 'r+b') as f: 11 | # mmap基本上接收两个参数,(文件描述符,读取长度),size 为0表示读取整个文件 12 | mm = mmap.mmap(f.fileno(), 0) 13 | mm.seek(0) # 定位到文件头 14 | # byte_numline = mm[0] # mm[]取出来的是byte类型, 要转为int型 15 | byte_numline = mm.read(5) 16 | str_numline = str(byte_numline) # 将bytes转化为str类型 17 | print("str_numline:", str_numline) 18 | data_len = re.findall(r"\d+\.?\d*",str_numline) 19 | print("data_len:", int(data_len[0])) 20 | boundingboxes_txt = str(mm[6:int(data_len[0])+6]) 21 | mm.close() 22 | boundingboxes_list = re.findall(r"\d+\.?\d*", boundingboxes_txt) 23 | # print('boundingboxes_list = ',boundingboxes_list) 24 | array_boundingbox = numpy.array(boundingboxes_list) 25 | #print("array_boundingbox = ",boundingboxes_list) 26 | box_number = len(boundingboxes_list) // 6 27 | print('box_number = ', box_number) 28 | re_array_boundingbox = numpy.resize(array_boundingbox, (box_number, 6)) 29 | #print('re_array_boundingbox:\n', re_array_boundingbox) 30 | print(re_array_boundingbox) 31 | print("#---------------------------------------------------------------#") -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolox/config_infer_primary.txt: -------------------------------------------------------------------------------- 1 | [property] 2 | gpu-id=0 3 | net-scale-factor=0.0039215697906911373 4 | #net-scale-factor=1.0 5 | 6 | # 0:RGB 1:BGR 7 | model-color-format=0 8 | 9 | model-engine-file=yolox_fp32.engine 10 | 11 | labelfile-path=labels.txt 12 | batch-size=1 13 | network-mode=0 14 | num-detected-classes=80 15 | 16 | interval=0 17 | gie-unique-id=1 18 | process-mode=1 19 | 20 | # 0=Detector, 1=Classifier, 2=Segmentation, 100=Other 21 | network-type=0 22 | 23 | # 0:Group Rectange 1:DBSCAN 2:NMS 3:DBSCAN+NMS 4:None 24 | cluster-mode=4 25 | maintain-aspect-ratio=1 26 | parse-bbox-func-name=NvDsInferParseCustomYolox 27 | custom-lib-path=nvdsinfer_custom_impl_yolox/libnvdsinfer_custom_impl_yolox.so 28 | 29 | [class-attrs-all] 30 | pre-cluster-threshold=0.25 31 | -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolox/cpp_io/yolox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/CDR-docker_main_file/deepstream-yolox/cpp_io/yolox -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolox/cpp_io/yolox.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | //字符串中提取数字 16 | int get_num(char* ss) 17 | { 18 | int cnt_index = 0, cnt_int = 0; 19 | //cnt_int 用于存放字符串中的数字. 20 | //cnt_index 作为字符串b的下标. 21 | for (int i = 0; ss[i] != '\0'; ++i) //当a数组元素不为结束符时.遍历字符串a. 22 | { 23 | if (ss[i] >= '0'&& ss[i] <= '9') //如果是数字. 24 | { 25 | cnt_int *= 10;//先乘以10保证先检测到的数字存在高位,后检测的存在低位 26 | cnt_int += ss[i] - '0'; //数字字符的ascii-字符'0'的ascii码就等于该数字. 27 | } 28 | // cout << cnt_int << endl; //输出数字.(12345) 29 | } 30 | return cnt_int; 31 | } 32 | 33 | int main() 34 | { 35 | while(1) 36 | { 37 | int fd = open("/opt/nvidia/deepstream/deepstream-6.0/sources/deepstream_python_apps/apps/deepstream-yolov5/internal_memory.txt",O_RDONLY); 38 | char *addr = (char *)mmap(NULL, 3008, PROT_READ,MAP_SHARED, fd, 0); 39 | if (addr == MAP_FAILED) 40 | { 41 | perror("mmap err"); 42 | return -1; 43 | } 44 | //char* addr = (char*)mmap(NULL, boundingboxes_len, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); 45 | close(fd); 46 | char data[10] = {0}; 47 | std::string str_data; 48 | memcpy(data, addr, 5); // 40*60+10(the largest number of objects is 40) 49 | int data_len = get_num(data); 50 | //std::cout << "data_len:" << data_len << std::endl; 51 | /*------------below two line will show Memory overflow question------------*/ 52 | char true_data[data_len] = {0}; 53 | // char true_true_data[data_len-10] = {0}; 54 | memcpy(true_data, addr, data_len+6); 55 | std::cout << true_data << std::endl; 56 | munmap(addr,3008); 57 | } 58 | return 0; 59 | } -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolox/deepstream_app_config.txt: -------------------------------------------------------------------------------- 1 | [application] 2 | enable-perf-measurement=1 3 | perf-measurement-interval-sec=1 4 | 5 | [tiled-display] 6 | enable=0 7 | rows=1 8 | columns=1 9 | width=1920 10 | height=1080 11 | gpu-id=0 12 | nvbuf-memory-type=0 13 | 14 | [source0] 15 | enable=1 16 | 17 | # 1:camera(v4l2) 2: single uri 3:multi uri 4:rtsp 5 camera(CSI) only for Jetson 18 | type=2 19 | uri=file://./sample_1080p_h264.mp4 20 | num-sources=1 21 | gpu-id=0 22 | cudadec-memtype=0 23 | select-rtp-protocol=4 24 | 25 | [sink0] 26 | enable=1 27 | 28 | # 3:save file 4:rtsp 29 | type=3 30 | sync=0 31 | source-id=0 32 | gpu-id=0 33 | container=1 34 | codec=1 35 | output-file=./output.mp4 36 | nvbuf-memory-type=0 37 | rtsp-port=8554 38 | udp-port=5400 39 | 40 | 41 | [tracker] 42 | enable=0 43 | # For the case of NvDCF tracker, tracker-width and tracker-height must be a multiple of 32, respectively 44 | tracker-width=640 45 | tracker-height=384 46 | ll-lib-file=/opt/nvidia/deepstream/deepstream-5.0/lib/libnvds_mot_klt.so 47 | gpu-id=0 48 | #enable-batch-process and enable-past-frame applicable to DCF only 49 | enable-batch-process=0 50 | enable-past-frame=0 51 | display-tracking-id=1 52 | 53 | [osd] 54 | enable=1 55 | gpu-id=0 56 | border-width=1 57 | text-size=15 58 | text-color=1;1;1;1; 59 | text-bg-color=0.3;0.3;0.3;1 60 | font=Serif 61 | show-clock=0 62 | clock-x-offset=5 63 | clock-y-offset=5 64 | clock-text-size=12 65 | clock-color=0;0;1;1 66 | nvbuf-memory-type=0 67 | 68 | [streammux] 69 | gpu-id=0 70 | live-source=0 71 | batch-size=1 72 | batched-push-timeout=40000 73 | width=1920 74 | height=1080 75 | enable-padding=1 76 | nvbuf-memory-type=0 77 | 78 | [primary-gie] 79 | enable=1 80 | gpu-id=0 81 | gie-unique-id=1 82 | nvbuf-memory-type=0 83 | config-file=config_infer_primary.txt 84 | 85 | [tests] 86 | file-loop=0 87 | -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolox/dstest_x_tracker_config.txt: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Copyright (c) 2018-2020, NVIDIA CORPORATION. All rights reserved. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a 5 | # copy of this software and associated documentation files (the "Software"), 6 | # to deal in the Software without restriction, including without limitation 7 | # the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | # and/or sell copies of the Software, and to permit persons to whom the 9 | # Software is furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in 12 | # all copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17 | # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 19 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20 | # DEALINGS IN THE SOFTWARE. 21 | ################################################################################ 22 | 23 | # Mandatory properties for the tracker: 24 | # tracker-width 25 | # tracker-height: needs to be multiple of 6 for NvDCF 26 | # gpu-id 27 | # ll-lib-file: path to low-level tracker lib 28 | # ll-config-file: required for NvDCF, optional for KLT and IOU 29 | # 30 | [tracker] 31 | enable=1 32 | # For NvDCF and DeepSORT tracker, tracker-width and tracker-height must be a multiple of 32, respectively 33 | tracker-width=640 34 | tracker-height=384 35 | ll-lib-file=/opt/nvidia/deepstream/deepstream-6.0/lib/libnvds_nvmultiobjecttracker.so 36 | # ll-config-file required to set different tracker types 37 | # ll-config-file=../../samples/configs/deepstream-app/config_tracker_IOU.yml 38 | # ll-config-file=../../samples/configs/deepstream-app/config_tracker_NvDCF_perf.yml 39 | #ll-config-file=../../samples/configs/deepstream-app/config_tracker_NvDCF_accuracy.yml 40 | ll-config-file=../../samples/configs/deepstream-app/config_tracker_DeepSORT.yml 41 | gpu-id=0 42 | #enable-batch-process=1 43 | #enable-past-frame=1 44 | display-tracking-id=1 45 | -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolox/labels.txt: -------------------------------------------------------------------------------- 1 | person 2 | bicycle 3 | car 4 | motorbike 5 | aeroplane 6 | bus 7 | train 8 | truck 9 | boat 10 | traffic light 11 | fire hydrant 12 | stop sign 13 | parking meter 14 | bench 15 | bird 16 | cat 17 | dog 18 | horse 19 | sheep 20 | cow 21 | elephant 22 | bear 23 | zebra 24 | giraffe 25 | backpack 26 | umbrella 27 | handbag 28 | tie 29 | suitcase 30 | frisbee 31 | skis 32 | snowboard 33 | sports ball 34 | kite 35 | baseball bat 36 | baseball glove 37 | skateboard 38 | surfboard 39 | tennis racket 40 | bottle 41 | wine glass 42 | cup 43 | fork 44 | knife 45 | spoon 46 | bowl 47 | banana 48 | apple 49 | sandwich 50 | orange 51 | broccoli 52 | carrot 53 | hot dog 54 | pizza 55 | donut 56 | cake 57 | chair 58 | sofa 59 | pottedplant 60 | bed 61 | diningtable 62 | toilet 63 | tvmonitor 64 | laptop 65 | mouse 66 | remote 67 | keyboard 68 | cell phone 69 | microwave 70 | oven 71 | toaster 72 | sink 73 | refrigerator 74 | book 75 | clock 76 | vase 77 | scissors 78 | teddy bear 79 | hair drier 80 | toothbrush -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolox/nvdsinfer_custom_impl_yolox/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | #CUDA_VER?= 18 | ifeq ($(CUDA_VER),) 19 | $(error "CUDA_VER is not set") 20 | endif 21 | CC:= g++ 22 | NVCC:=/usr/local/cuda-$(CUDA_VER)/bin/nvcc 23 | 24 | CFLAGS:= -Wall -std=c++11 -shared -fPIC -Wno-error=deprecated-declarations 25 | CFLAGS+= -I/opt/nvidia/deepstream/deepstream/sources/includes -I/usr/local/cuda-$(CUDA_VER)/include 26 | 27 | CXXFLAGS:= -fopenmp 28 | 29 | LIBS:= -lnvinfer_plugin -lnvinfer -lnvparsers -L/usr/local/cuda-$(CUDA_VER)/lib64 -lcudart -lcublas -lstdc++fs -L/home/nvidia/data/zhangbo/library/opencv-4.5.1/lib -lopencv_core 30 | LFLAGS:= -shared -Wl,--start-group $(LIBS) -Wl,--end-group -fopenmp 31 | 32 | INCS:= $(wildcard *.h) 33 | SRCFILES:= nvdsparsebbox_yolox.cpp 34 | 35 | TARGET_LIB:= libnvdsinfer_custom_impl_yolox.so 36 | 37 | TARGET_OBJS:= $(SRCFILES:.cpp=.o) 38 | TARGET_OBJS:= $(TARGET_OBJS:.cu=.o) 39 | 40 | all: $(TARGET_LIB) 41 | 42 | %.o: %.cpp $(INCS) Makefile 43 | $(CC) -c -o $@ $(CFLAGS) $(CXXFLAGS) $< 44 | 45 | %.o: %.cu $(INCS) Makefile 46 | $(NVCC) -c -o $@ --compiler-options '-fPIC' $< 47 | 48 | $(TARGET_LIB) : $(TARGET_OBJS) 49 | $(CC) -o $@ $(TARGET_OBJS) $(LFLAGS) 50 | 51 | clean: 52 | rm -rf $(TARGET_LIB) 53 | rm -rf $(TARGET_OBJS) 54 | -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolox/nvdsinfer_custom_impl_yolox/libnvdsinfer_custom_impl_yolox.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/CDR-docker_main_file/deepstream-yolox/nvdsinfer_custom_impl_yolox/libnvdsinfer_custom_impl_yolox.so -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolox/nvdsinfer_custom_impl_yolox/nvdsparsebbox_yolox.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/CDR-docker_main_file/deepstream-yolox/nvdsinfer_custom_impl_yolox/nvdsparsebbox_yolox.o -------------------------------------------------------------------------------- /CDR-docker_main_file/deepstream-yolox/onnx_to_trt.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import tensorrt as trt 3 | sys.path.append('../') 4 | import common 5 | 6 | ''' 7 | 通过加载onnx文件,构建engine 8 | ''' 9 | onnx_file_path = "yolox_s.onnx" #输入需要转换的onnx文件 10 | 11 | G_LOGGER = trt.Logger(trt.Logger.WARNING) 12 | 13 | # 1、动态输入第一点必须要写的 14 | explicit_batch = 1 << (int)(trt.NetworkDefinitionCreationFlag.EXPLICIT_BATCH) 15 | 16 | batch_size = 1 # trt推理时最大支持的batchsize 17 | 18 | with trt.Builder(G_LOGGER) as builder, builder.create_network(explicit_batch) as network, \ 19 | trt.OnnxParser(network, G_LOGGER) as parser: 20 | 21 | builder.max_batch_size = batch_size 22 | 23 | config = builder.create_builder_config() 24 | config.max_workspace_size = 1<<32 # common文件可以自己去tensorrt官方例程下面找 25 | config.set_flag(trt.BuilderFlag.TF32) 26 | print('Loading ONNX file from path {}...'.format(onnx_file_path)) 27 | 28 | with open(onnx_file_path, 'rb') as model: 29 | print('Beginning ONNX file parsing') 30 | parser.parse(model.read()) 31 | print('Completed parsing of ONNX file') 32 | print('Building an engine from file {}; this may take a while...'.format(onnx_file_path)) 33 | 34 | # 动态输入问题解决方案 35 | profile = builder.create_optimization_profile() 36 | profile.set_shape("input_1", (1, 512, 512, 3), (1, 512, 512, 3), (1, 512, 512, 3)) 37 | config.add_optimization_profile(profile) 38 | 39 | engine = builder.build_engine(network, config) 40 | print("Completed creating Engine") 41 | 42 | # 保存输出的engine文件,并自定义engine文件名称 43 | engine_file_path = 'yolox_fp323.engine' 44 | with open(engine_file_path, "wb") as f: 45 | f.write(engine.serialize()) 46 | 47 | -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/.catkin_workspace: -------------------------------------------------------------------------------- 1 | # This file currently only serves to mark the location of a catkin workspace for tool integration 2 | -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/.built_by: -------------------------------------------------------------------------------- 1 | catkin_make -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/CATKIN_IGNORE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/CATKIN_IGNORE -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/3.21.2/CMakeCCompiler.cmake: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/3.21.2/CMakeCCompiler.cmake -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/3.21.2/CMakeCXXCompiler.cmake: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/3.21.2/CMakeCXXCompiler.cmake -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/3.21.2/CMakeDetermineCompilerABI_C.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/3.21.2/CMakeDetermineCompilerABI_C.bin -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/3.21.2/CMakeDetermineCompilerABI_CXX.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/3.21.2/CMakeDetermineCompilerABI_CXX.bin -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/3.21.2/CMakeSystem.cmake: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/3.21.2/CMakeSystem.cmake -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/CMakeDirectoryInformation.cmake: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.21 3 | 4 | # Relative path conversion top directories. 5 | set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/home/amov/boxes_ws/src") 6 | set(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/amov/boxes_ws/build") 7 | 8 | # Force unix paths in dependencies. 9 | set(CMAKE_FORCE_UNIX_PATHS 1) 10 | 11 | 12 | # The C and CXX include file regular expressions for this directory. 13 | set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") 14 | set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") 15 | set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) 16 | set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) 17 | -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/clean_test_results.dir/DependInfo.cmake: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/clean_test_results.dir/DependInfo.cmake -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/clean_test_results.dir/build.make: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/clean_test_results.dir/build.make -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/clean_test_results.dir/cmake_clean.cmake: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/clean_test_results.dir/cmake_clean.cmake -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/clean_test_results.dir/compiler_depend.make: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/clean_test_results.dir/compiler_depend.make -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/clean_test_results.dir/compiler_depend.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/clean_test_results.dir/compiler_depend.ts -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/clean_test_results.dir/progress.make: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/clean_test_results.dir/progress.make -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/cmake.check_cache: -------------------------------------------------------------------------------- 1 | # This file is generated by cmake for dependency checking of the CMakeCache.txt file 2 | -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/download_extra_data.dir/DependInfo.cmake: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/download_extra_data.dir/DependInfo.cmake -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/download_extra_data.dir/build.make: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/download_extra_data.dir/build.make -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/download_extra_data.dir/cmake_clean.cmake: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/download_extra_data.dir/cmake_clean.cmake -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/download_extra_data.dir/compiler_depend.make: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/download_extra_data.dir/compiler_depend.make -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/download_extra_data.dir/compiler_depend.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/download_extra_data.dir/compiler_depend.ts -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/download_extra_data.dir/progress.make: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/download_extra_data.dir/progress.make -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/doxygen.dir/DependInfo.cmake: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/doxygen.dir/DependInfo.cmake -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/doxygen.dir/build.make: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/doxygen.dir/build.make -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/doxygen.dir/cmake_clean.cmake: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/doxygen.dir/cmake_clean.cmake -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/doxygen.dir/compiler_depend.make: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/doxygen.dir/compiler_depend.make -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/doxygen.dir/compiler_depend.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/doxygen.dir/compiler_depend.ts -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/doxygen.dir/progress.make: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/doxygen.dir/progress.make -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/progress.marks: -------------------------------------------------------------------------------- 1 | 22 2 | -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/run_tests.dir/DependInfo.cmake: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/run_tests.dir/DependInfo.cmake -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/run_tests.dir/build.make: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/run_tests.dir/build.make -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/run_tests.dir/cmake_clean.cmake: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/run_tests.dir/cmake_clean.cmake -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/run_tests.dir/compiler_depend.make: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/run_tests.dir/compiler_depend.make -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/run_tests.dir/compiler_depend.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/run_tests.dir/compiler_depend.ts -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/run_tests.dir/progress.make: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/run_tests.dir/progress.make -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/tests.dir/DependInfo.cmake: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/tests.dir/DependInfo.cmake -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/tests.dir/build.make: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/tests.dir/build.make -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/tests.dir/cmake_clean.cmake: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/tests.dir/cmake_clean.cmake -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/tests.dir/compiler_depend.make: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/tests.dir/compiler_depend.make -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/tests.dir/compiler_depend.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/tests.dir/compiler_depend.ts -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/tests.dir/progress.make: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/CMakeFiles/tests.dir/progress.make -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/CTestCustom.cmake: -------------------------------------------------------------------------------- 1 | set(CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE 0) 2 | set(CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE 0) 3 | -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/CTestTestfile.cmake: -------------------------------------------------------------------------------- 1 | # CMake generated Testfile for 2 | # Source directory: /home/amov/boxes_ws/src 3 | # Build directory: /home/amov/boxes_ws/build 4 | # 5 | # This file includes the relevant testing commands required for 6 | # testing this directory and lists subdirectories to be tested as well. 7 | subdirs("gtest") 8 | subdirs("darknet_ros_msgs") 9 | -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/atomic_configure/.rosinstall: -------------------------------------------------------------------------------- 1 | - setup-file: 2 | local-name: /home/amov/boxes_ws/devel/setup.sh 3 | -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/atomic_configure/env.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | # generated from catkin/cmake/templates/env.sh.in 3 | 4 | if [ $# -eq 0 ] ; then 5 | /bin/echo "Usage: env.sh COMMANDS" 6 | /bin/echo "Calling env.sh without arguments is not supported anymore. Instead spawn a subshell and source a setup file manually." 7 | exit 1 8 | fi 9 | 10 | # ensure to not use different shell type which was set before 11 | CATKIN_SHELL=sh 12 | 13 | # source setup.sh from same directory as this file 14 | _CATKIN_SETUP_DIR=$(cd "`dirname "$0"`" > /dev/null && pwd) 15 | . "$_CATKIN_SETUP_DIR/setup.sh" 16 | exec "$@" 17 | -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/atomic_configure/local_setup.bash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # generated from catkin/cmake/templates/local_setup.bash.in 3 | 4 | CATKIN_SHELL=bash 5 | 6 | # source setup.sh from same directory as this file 7 | _CATKIN_SETUP_DIR=$(builtin cd "`dirname "${BASH_SOURCE[0]}"`" > /dev/null && pwd) 8 | . "$_CATKIN_SETUP_DIR/setup.sh" --extend --local 9 | -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/atomic_configure/local_setup.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | # generated from catkin/cmake/template/local_setup.sh.in 3 | 4 | # since this file is sourced either use the provided _CATKIN_SETUP_DIR 5 | # or fall back to the destination set at configure time 6 | : ${_CATKIN_SETUP_DIR:=/home/amov/boxes_ws/devel} 7 | CATKIN_SETUP_UTIL_ARGS="--extend --local" 8 | . "$_CATKIN_SETUP_DIR/setup.sh" 9 | unset CATKIN_SETUP_UTIL_ARGS 10 | -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/atomic_configure/local_setup.zsh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | # generated from catkin/cmake/templates/local_setup.zsh.in 3 | 4 | CATKIN_SHELL=zsh 5 | 6 | # source setup.sh from same directory as this file 7 | _CATKIN_SETUP_DIR=$(builtin cd -q "`dirname "$0"`" > /dev/null && pwd) 8 | emulate -R zsh -c 'source "$_CATKIN_SETUP_DIR/setup.sh" --extend --local' 9 | -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/atomic_configure/setup.bash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # generated from catkin/cmake/templates/setup.bash.in 3 | 4 | CATKIN_SHELL=bash 5 | 6 | # source setup.sh from same directory as this file 7 | _CATKIN_SETUP_DIR=$(builtin cd "`dirname "${BASH_SOURCE[0]}"`" > /dev/null && pwd) 8 | . "$_CATKIN_SETUP_DIR/setup.sh" 9 | -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/atomic_configure/setup.zsh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | # generated from catkin/cmake/templates/setup.zsh.in 3 | 4 | CATKIN_SHELL=zsh 5 | 6 | # source setup.sh from same directory as this file 7 | _CATKIN_SETUP_DIR=$(builtin cd -q "`dirname "$0"`" > /dev/null && pwd) 8 | emulate -R zsh -c 'source "$_CATKIN_SETUP_DIR/setup.sh"' 9 | -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/catkin_generated/env_cached.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | # generated from catkin/cmake/templates/env.sh.in 3 | 4 | if [ $# -eq 0 ] ; then 5 | /bin/echo "Usage: env.sh COMMANDS" 6 | /bin/echo "Calling env.sh without arguments is not supported anymore. Instead spawn a subshell and source a setup file manually." 7 | exit 1 8 | fi 9 | 10 | # ensure to not use different shell type which was set before 11 | CATKIN_SHELL=sh 12 | 13 | # source setup_cached.sh from same directory as this file 14 | _CATKIN_SETUP_DIR=$(cd "`dirname "$0"`" > /dev/null && pwd) 15 | . "$_CATKIN_SETUP_DIR/setup_cached.sh" 16 | exec "$@" 17 | -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/catkin_generated/generate_cached_setup.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import print_function 3 | 4 | import os 5 | import stat 6 | import sys 7 | 8 | # find the import for catkin's python package - either from source space or from an installed underlay 9 | if os.path.exists(os.path.join('/opt/ros/melodic/share/catkin/cmake', 'catkinConfig.cmake.in')): 10 | sys.path.insert(0, os.path.join('/opt/ros/melodic/share/catkin/cmake', '..', 'python')) 11 | try: 12 | from catkin.environment_cache import generate_environment_script 13 | except ImportError: 14 | # search for catkin package in all workspaces and prepend to path 15 | for workspace in '/opt/ros/melodic'.split(';'): 16 | python_path = os.path.join(workspace, 'lib/python2.7/dist-packages') 17 | if os.path.isdir(os.path.join(python_path, 'catkin')): 18 | sys.path.insert(0, python_path) 19 | break 20 | from catkin.environment_cache import generate_environment_script 21 | 22 | code = generate_environment_script('/home/amov/boxes_ws/devel/env.sh') 23 | 24 | output_filename = '/home/amov/boxes_ws/build/catkin_generated/setup_cached.sh' 25 | with open(output_filename, 'w') as f: 26 | # print('Generate script for cached setup "%s"' % output_filename) 27 | f.write('\n'.join(code)) 28 | 29 | mode = os.stat(output_filename).st_mode 30 | os.chmod(output_filename, mode | stat.S_IXUSR) 31 | -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/catkin_generated/installspace/.rosinstall: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/catkin_generated/installspace/.rosinstall -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/catkin_generated/installspace/_setup_util.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/catkin_generated/installspace/_setup_util.py -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/catkin_generated/installspace/env.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/catkin_generated/installspace/env.sh -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/catkin_generated/installspace/local_setup.bash: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/catkin_generated/installspace/local_setup.bash -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/catkin_generated/installspace/local_setup.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/catkin_generated/installspace/local_setup.sh -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/catkin_generated/installspace/local_setup.zsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/catkin_generated/installspace/local_setup.zsh -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/catkin_generated/installspace/setup.bash: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/catkin_generated/installspace/setup.bash -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/catkin_generated/installspace/setup.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/catkin_generated/installspace/setup.sh -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/catkin_generated/installspace/setup.zsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/catkin_generated/installspace/setup.zsh -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/catkin_generated/order_packages.cmake: -------------------------------------------------------------------------------- 1 | # generated from catkin/cmake/em/order_packages.cmake.em 2 | 3 | set(CATKIN_ORDERED_PACKAGES "") 4 | set(CATKIN_ORDERED_PACKAGE_PATHS "") 5 | set(CATKIN_ORDERED_PACKAGES_IS_META "") 6 | set(CATKIN_ORDERED_PACKAGES_BUILD_TYPE "") 7 | list(APPEND CATKIN_ORDERED_PACKAGES "darknet_ros_msgs") 8 | list(APPEND CATKIN_ORDERED_PACKAGE_PATHS "darknet_ros_msgs") 9 | list(APPEND CATKIN_ORDERED_PACKAGES_IS_META "False") 10 | list(APPEND CATKIN_ORDERED_PACKAGES_BUILD_TYPE "catkin") 11 | 12 | set(CATKIN_MESSAGE_GENERATORS ) 13 | 14 | set(CATKIN_METAPACKAGE_CMAKE_TEMPLATE "/usr/lib/python2.7/dist-packages/catkin_pkg/templates/metapackage.cmake.in") 15 | -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/catkin_generated/order_packages.py: -------------------------------------------------------------------------------- 1 | # generated from catkin/cmake/template/order_packages.context.py.in 2 | source_root_dir = '/home/amov/boxes_ws/src' 3 | whitelisted_packages = ''.split(';') if '' != '' else [] 4 | blacklisted_packages = ''.split(';') if '' != '' else [] 5 | underlay_workspaces = '/opt/ros/melodic'.split(';') if '/opt/ros/melodic' != '' else [] 6 | -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/catkin_generated/setup_cached.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | # generated from catkin/python/catkin/environment_cache.py 3 | 4 | # based on a snapshot of the environment before and after calling the setup script 5 | # it emulates the modifications of the setup script without recurring computations 6 | 7 | # new environment variables 8 | 9 | # modified environment variables 10 | export CMAKE_PREFIX_PATH="/home/amov/boxes_ws/devel:$CMAKE_PREFIX_PATH" 11 | export PATH='/opt/ros/melodic/bin:/usr/lib/jvm/java-11-openjdk-arm64/bin:/home/amov/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin' 12 | export PWD='/home/amov/boxes_ws/build' 13 | export ROSLISP_PACKAGE_DIRECTORIES='/home/amov/boxes_ws/devel/share/common-lisp' 14 | export ROS_PACKAGE_PATH="/home/amov/boxes_ws/src:$ROS_PACKAGE_PATH" -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/catkin_make.cache: -------------------------------------------------------------------------------- 1 | darknet_ros_msgs 2 | -DCATKIN_DEVEL_PREFIX=/home/amov/boxes_ws/devel -DCMAKE_INSTALL_PREFIX=/home/amov/boxes_ws/install -G Unix Makefiles -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/darknet_ros_msgs/CMakeFiles/CMakeDirectoryInformation.cmake: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/darknet_ros_msgs/CMakeFiles/CMakeDirectoryInformation.cmake -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/darknet_ros_msgs/CMakeFiles/progress.marks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/darknet_ros_msgs/CMakeFiles/progress.marks -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/darknet_ros_msgs/CTestTestfile.cmake: -------------------------------------------------------------------------------- 1 | # CMake generated Testfile for 2 | # Source directory: /home/amov/boxes_ws/src/darknet_ros_msgs 3 | # Build directory: /home/amov/boxes_ws/build/darknet_ros_msgs 4 | # 5 | # This file includes the relevant testing commands required for 6 | # testing this directory and lists subdirectories to be tested as well. 7 | -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/darknet_ros_msgs/catkin_generated/darknet_ros_msgs-msg-extras.cmake.develspace.in: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/darknet_ros_msgs/catkin_generated/darknet_ros_msgs-msg-extras.cmake.develspace.in -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/darknet_ros_msgs/catkin_generated/darknet_ros_msgs-msg-extras.cmake.installspace.in: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/darknet_ros_msgs/catkin_generated/darknet_ros_msgs-msg-extras.cmake.installspace.in -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/darknet_ros_msgs/catkin_generated/ordered_paths.cmake: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/darknet_ros_msgs/catkin_generated/ordered_paths.cmake -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/darknet_ros_msgs/catkin_generated/package.cmake: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/darknet_ros_msgs/catkin_generated/package.cmake -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/darknet_ros_msgs/catkin_generated/pkg.develspace.context.pc.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/darknet_ros_msgs/catkin_generated/pkg.develspace.context.pc.py -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/darknet_ros_msgs/catkin_generated/pkg.installspace.context.pc.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/darknet_ros_msgs/catkin_generated/pkg.installspace.context.pc.py -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/darknet_ros_msgs/cmake/darknet_ros_msgs-genmsg-context.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/darknet_ros_msgs/cmake/darknet_ros_msgs-genmsg-context.py -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/darknet_ros_msgs/cmake/darknet_ros_msgs-genmsg.cmake: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/darknet_ros_msgs/cmake/darknet_ros_msgs-genmsg.cmake -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/gtest/CMakeFiles/CMakeDirectoryInformation.cmake: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/gtest/CMakeFiles/CMakeDirectoryInformation.cmake -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/gtest/CMakeFiles/progress.marks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/gtest/CMakeFiles/progress.marks -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/gtest/CTestTestfile.cmake: -------------------------------------------------------------------------------- 1 | # CMake generated Testfile for 2 | # Source directory: /usr/src/googletest 3 | # Build directory: /home/amov/boxes_ws/build/gtest 4 | # 5 | # This file includes the relevant testing commands required for 6 | # testing this directory and lists subdirectories to be tested as well. 7 | subdirs("googlemock") 8 | -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/gtest/cmake_install.cmake: -------------------------------------------------------------------------------- 1 | # Install script for directory: /usr/src/googletest 2 | 3 | # Set the install prefix 4 | if(NOT DEFINED CMAKE_INSTALL_PREFIX) 5 | set(CMAKE_INSTALL_PREFIX "/home/amov/boxes_ws/install") 6 | endif() 7 | string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") 8 | 9 | # Set the install configuration name. 10 | if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) 11 | if(BUILD_TYPE) 12 | string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" 13 | CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") 14 | else() 15 | set(CMAKE_INSTALL_CONFIG_NAME "") 16 | endif() 17 | message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") 18 | endif() 19 | 20 | # Set the component getting installed. 21 | if(NOT CMAKE_INSTALL_COMPONENT) 22 | if(COMPONENT) 23 | message(STATUS "Install component: \"${COMPONENT}\"") 24 | set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") 25 | else() 26 | set(CMAKE_INSTALL_COMPONENT) 27 | endif() 28 | endif() 29 | 30 | # Install shared libraries without execute permission? 31 | if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) 32 | set(CMAKE_INSTALL_SO_NO_EXE "1") 33 | endif() 34 | 35 | # Is this installation the result of a crosscompile? 36 | if(NOT DEFINED CMAKE_CROSSCOMPILING) 37 | set(CMAKE_CROSSCOMPILING "FALSE") 38 | endif() 39 | 40 | # Set default install directory permissions. 41 | if(NOT DEFINED CMAKE_OBJDUMP) 42 | set(CMAKE_OBJDUMP "/usr/bin/objdump") 43 | endif() 44 | 45 | if(NOT CMAKE_INSTALL_LOCAL_ONLY) 46 | # Include the install script for each subdirectory. 47 | include("/home/amov/boxes_ws/build/gtest/googlemock/cmake_install.cmake") 48 | 49 | endif() 50 | 51 | -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/gtest/googlemock/CTestTestfile.cmake: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/gtest/googlemock/CTestTestfile.cmake -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/gtest/googlemock/Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/gtest/googlemock/Makefile -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/build/gtest/googlemock/cmake_install.cmake: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/build/gtest/googlemock/cmake_install.cmake -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/devel/.built_by: -------------------------------------------------------------------------------- 1 | catkin_make -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/devel/.catkin: -------------------------------------------------------------------------------- 1 | /home/amov/boxes_ws/src -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/devel/.rosinstall: -------------------------------------------------------------------------------- 1 | - setup-file: 2 | local-name: /home/amov/boxes_ws/devel/setup.sh 3 | -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/devel/cmake.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/devel/cmake.lock -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/devel/env.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | # generated from catkin/cmake/templates/env.sh.in 3 | 4 | if [ $# -eq 0 ] ; then 5 | /bin/echo "Usage: env.sh COMMANDS" 6 | /bin/echo "Calling env.sh without arguments is not supported anymore. Instead spawn a subshell and source a setup file manually." 7 | exit 1 8 | fi 9 | 10 | # ensure to not use different shell type which was set before 11 | CATKIN_SHELL=sh 12 | 13 | # source setup.sh from same directory as this file 14 | _CATKIN_SETUP_DIR=$(cd "`dirname "$0"`" > /dev/null && pwd) 15 | . "$_CATKIN_SETUP_DIR/setup.sh" 16 | exec "$@" 17 | -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/devel/include/darknet_ros_msgs/BoundingBox.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/devel/include/darknet_ros_msgs/BoundingBox.h -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/devel/include/darknet_ros_msgs/BoundingBox_tensor.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/devel/include/darknet_ros_msgs/BoundingBox_tensor.h -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/devel/include/darknet_ros_msgs/BoundingBoxes.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/devel/include/darknet_ros_msgs/BoundingBoxes.h -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/devel/include/darknet_ros_msgs/BoundingBoxes_tensor.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/devel/include/darknet_ros_msgs/BoundingBoxes_tensor.h -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/devel/lib/pkgconfig/darknet_ros_msgs.pc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/boxes_ws/devel/lib/pkgconfig/darknet_ros_msgs.pc -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/devel/local_setup.bash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # generated from catkin/cmake/templates/local_setup.bash.in 3 | 4 | CATKIN_SHELL=bash 5 | 6 | # source setup.sh from same directory as this file 7 | _CATKIN_SETUP_DIR=$(builtin cd "`dirname "${BASH_SOURCE[0]}"`" > /dev/null && pwd) 8 | . "$_CATKIN_SETUP_DIR/setup.sh" --extend --local 9 | -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/devel/local_setup.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | # generated from catkin/cmake/template/local_setup.sh.in 3 | 4 | # since this file is sourced either use the provided _CATKIN_SETUP_DIR 5 | # or fall back to the destination set at configure time 6 | : ${_CATKIN_SETUP_DIR:=/home/amov/boxes_ws/devel} 7 | CATKIN_SETUP_UTIL_ARGS="--extend --local" 8 | . "$_CATKIN_SETUP_DIR/setup.sh" 9 | unset CATKIN_SETUP_UTIL_ARGS 10 | -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/devel/local_setup.zsh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | # generated from catkin/cmake/templates/local_setup.zsh.in 3 | 4 | CATKIN_SHELL=zsh 5 | 6 | # source setup.sh from same directory as this file 7 | _CATKIN_SETUP_DIR=$(builtin cd -q "`dirname "$0"`" > /dev/null && pwd) 8 | emulate -R zsh -c 'source "$_CATKIN_SETUP_DIR/setup.sh" --extend --local' 9 | -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/devel/setup.bash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # generated from catkin/cmake/templates/setup.bash.in 3 | 4 | CATKIN_SHELL=bash 5 | 6 | # source setup.sh from same directory as this file 7 | _CATKIN_SETUP_DIR=$(builtin cd "`dirname "${BASH_SOURCE[0]}"`" > /dev/null && pwd) 8 | . "$_CATKIN_SETUP_DIR/setup.sh" 9 | -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/devel/setup.zsh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | # generated from catkin/cmake/templates/setup.zsh.in 3 | 4 | CATKIN_SHELL=zsh 5 | 6 | # source setup.sh from same directory as this file 7 | _CATKIN_SETUP_DIR=$(builtin cd -q "`dirname "$0"`" > /dev/null && pwd) 8 | emulate -R zsh -c 'source "$_CATKIN_SETUP_DIR/setup.sh"' 9 | -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # toplevel CMakeLists.txt for a catkin workspace 2 | # catkin/cmake/toplevel.cmake 3 | 4 | cmake_minimum_required(VERSION 3.0.2) 5 | 6 | project(Project) 7 | 8 | set(CATKIN_TOPLEVEL TRUE) 9 | 10 | # search for catkin within the workspace 11 | set(_cmd "catkin_find_pkg" "catkin" "${CMAKE_SOURCE_DIR}") 12 | execute_process(COMMAND ${_cmd} 13 | RESULT_VARIABLE _res 14 | OUTPUT_VARIABLE _out 15 | ERROR_VARIABLE _err 16 | OUTPUT_STRIP_TRAILING_WHITESPACE 17 | ERROR_STRIP_TRAILING_WHITESPACE 18 | ) 19 | if(NOT _res EQUAL 0 AND NOT _res EQUAL 2) 20 | # searching fot catkin resulted in an error 21 | string(REPLACE ";" " " _cmd_str "${_cmd}") 22 | message(FATAL_ERROR "Search for 'catkin' in workspace failed (${_cmd_str}): ${_err}") 23 | endif() 24 | 25 | # include catkin from workspace or via find_package() 26 | if(_res EQUAL 0) 27 | set(catkin_EXTRAS_DIR "${CMAKE_SOURCE_DIR}/${_out}/cmake") 28 | # include all.cmake without add_subdirectory to let it operate in same scope 29 | include(${catkin_EXTRAS_DIR}/all.cmake NO_POLICY_SCOPE) 30 | add_subdirectory("${_out}") 31 | 32 | else() 33 | # use either CMAKE_PREFIX_PATH explicitly passed to CMake as a command line argument 34 | # or CMAKE_PREFIX_PATH from the environment 35 | if(NOT DEFINED CMAKE_PREFIX_PATH) 36 | if(NOT "$ENV{CMAKE_PREFIX_PATH}" STREQUAL "") 37 | if(NOT WIN32) 38 | string(REPLACE ":" ";" CMAKE_PREFIX_PATH $ENV{CMAKE_PREFIX_PATH}) 39 | else() 40 | set(CMAKE_PREFIX_PATH $ENV{CMAKE_PREFIX_PATH}) 41 | endif() 42 | endif() 43 | endif() 44 | 45 | # list of catkin workspaces 46 | set(catkin_search_path "") 47 | foreach(path ${CMAKE_PREFIX_PATH}) 48 | if(EXISTS "${path}/.catkin") 49 | list(FIND catkin_search_path ${path} _index) 50 | if(_index EQUAL -1) 51 | list(APPEND catkin_search_path ${path}) 52 | endif() 53 | endif() 54 | endforeach() 55 | 56 | # search for catkin in all workspaces 57 | set(CATKIN_TOPLEVEL_FIND_PACKAGE TRUE) 58 | find_package(catkin QUIET 59 | NO_POLICY_SCOPE 60 | PATHS ${catkin_search_path} 61 | NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) 62 | unset(CATKIN_TOPLEVEL_FIND_PACKAGE) 63 | 64 | if(NOT catkin_FOUND) 65 | message(FATAL_ERROR "find_package(catkin) failed. catkin was neither found in the workspace nor in the CMAKE_PREFIX_PATH. One reason may be that no ROS setup.sh was sourced before.") 66 | endif() 67 | endif() 68 | 69 | catkin_workspace() 70 | -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/src/darknet_ros_msgs/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.12) 2 | 3 | project(darknet_ros_msgs) 4 | 5 | set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}") 6 | 7 | find_package(catkin REQUIRED 8 | COMPONENTS 9 | geometry_msgs 10 | sensor_msgs 11 | std_msgs 12 | message_generation 13 | ) 14 | 15 | add_message_files( 16 | FILES 17 | BoundingBox.msg 18 | BoundingBoxes.msg 19 | BoundingBox_tensor.msg 20 | BoundingBoxes_tensor.msg 21 | ) 22 | 23 | #add_action_files( 24 | # FILES 25 | # CheckForObjects.action 26 | #) 27 | 28 | generate_messages( 29 | DEPENDENCIES 30 | geometry_msgs 31 | sensor_msgs 32 | std_msgs 33 | ) 34 | 35 | catkin_package( 36 | CATKIN_DEPENDS 37 | geometry_msgs 38 | sensor_msgs 39 | message_runtime 40 | std_msgs 41 | ) 42 | -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/src/darknet_ros_msgs/msg/BoundingBox.msg: -------------------------------------------------------------------------------- 1 | int16 class_id 2 | int64 top 3 | int64 left 4 | int64 width 5 | int64 height 6 | int16 object_id 7 | -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/src/darknet_ros_msgs/msg/BoundingBox_tensor.msg: -------------------------------------------------------------------------------- 1 | float64 probability 2 | int64 top 3 | int64 left 4 | int64 width 5 | int64 height 6 | int16 id 7 | string Class 8 | -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/src/darknet_ros_msgs/msg/BoundingBoxes.msg: -------------------------------------------------------------------------------- 1 | BoundingBox[] bounding_boxes 2 | -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/src/darknet_ros_msgs/msg/BoundingBoxes_tensor.msg: -------------------------------------------------------------------------------- 1 | BoundingBox_tensor[] boundingboxes_tensor 2 | -------------------------------------------------------------------------------- /resnet10-ros-deepstream/boxes_ws/src/darknet_ros_msgs/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | darknet_ros_msgs 4 | 1.1.4 5 | Darknet is an open source neural network framework that runs on CPU and GPU. You only look once (YOLO) is a state-of-the-art, real-time object detection system. 6 | Marko Bjelonic 7 | BSD 8 | https://github.com/leggedrobotics/darknet_ros 9 | Marko Bjelonic 10 | 11 | catkin 12 | 13 | 14 | geometry_msgs 15 | sensor_msgs 16 | message_generation 17 | std_msgs 18 | 19 | geometry_msgs 20 | sensor_msgs 21 | message_runtime 22 | std_msgs 23 | 24 | -------------------------------------------------------------------------------- /resnet10-ros-deepstream/deepstream_python_apps/.python-app-pipeline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/deepstream_python_apps/.python-app-pipeline.png -------------------------------------------------------------------------------- /resnet10-ros-deepstream/deepstream_python_apps/.test3-app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/deepstream_python_apps/.test3-app.png -------------------------------------------------------------------------------- /resnet10-ros-deepstream/deepstream_python_apps/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 - 2021 NVIDIA CORPORATION. All rights reserved. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /resnet10-ros-deepstream/deepstream_python_apps/apps/common/FPS.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a 5 | # copy of this software and associated documentation files (the "Software"), 6 | # to deal in the Software without restriction, including without limitation 7 | # the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | # and/or sell copies of the Software, and to permit persons to whom the 9 | # Software is furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in 12 | # all copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17 | # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 19 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20 | # DEALINGS IN THE SOFTWARE. 21 | ################################################################################ 22 | 23 | import time 24 | start_time=time.time() 25 | frame_count=0 26 | 27 | class GETFPS: 28 | def __init__(self,stream_id): 29 | global start_time 30 | self.start_time=start_time 31 | self.is_first=True 32 | global frame_count 33 | self.frame_count=frame_count 34 | self.stream_id=stream_id 35 | def get_fps(self): 36 | end_time=time.time() 37 | if(self.is_first): 38 | self.start_time=end_time 39 | self.is_first=False 40 | if(end_time-self.start_time>5): 41 | print("**********************FPS*****************************************") 42 | print("Fps of stream",self.stream_id,"is ", float(self.frame_count)/5.0) 43 | self.frame_count=0 44 | self.start_time=end_time 45 | else: 46 | self.frame_count=self.frame_count+1 47 | def print_data(self): 48 | print('frame_count=',self.frame_count) 49 | print('start_time=',self.start_time) 50 | 51 | -------------------------------------------------------------------------------- /resnet10-ros-deepstream/deepstream_python_apps/apps/common/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/deepstream_python_apps/apps/common/__init__.py -------------------------------------------------------------------------------- /resnet10-ros-deepstream/deepstream_python_apps/apps/common/__pycache__/FPS.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/deepstream_python_apps/apps/common/__pycache__/FPS.cpython-36.pyc -------------------------------------------------------------------------------- /resnet10-ros-deepstream/deepstream_python_apps/apps/common/__pycache__/__init__.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/deepstream_python_apps/apps/common/__pycache__/__init__.cpython-36.pyc -------------------------------------------------------------------------------- /resnet10-ros-deepstream/deepstream_python_apps/apps/common/__pycache__/bus_call.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/deepstream_python_apps/apps/common/__pycache__/bus_call.cpython-36.pyc -------------------------------------------------------------------------------- /resnet10-ros-deepstream/deepstream_python_apps/apps/common/__pycache__/is_aarch_64.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/resnet10-ros-deepstream/deepstream_python_apps/apps/common/__pycache__/is_aarch_64.cpython-36.pyc -------------------------------------------------------------------------------- /resnet10-ros-deepstream/deepstream_python_apps/apps/common/bus_call.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a 5 | # copy of this software and associated documentation files (the "Software"), 6 | # to deal in the Software without restriction, including without limitation 7 | # the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | # and/or sell copies of the Software, and to permit persons to whom the 9 | # Software is furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in 12 | # all copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17 | # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 19 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20 | # DEALINGS IN THE SOFTWARE. 21 | ################################################################################ 22 | 23 | import gi 24 | import sys 25 | gi.require_version('Gst', '1.0') 26 | from gi.repository import GObject, Gst 27 | def bus_call(bus, message, loop): 28 | t = message.type 29 | if t == Gst.MessageType.EOS: 30 | sys.stdout.write("End-of-stream\n") 31 | loop.quit() 32 | elif t==Gst.MessageType.WARNING: 33 | err, debug = message.parse_warning() 34 | sys.stderr.write("Warning: %s: %s\n" % (err, debug)) 35 | elif t == Gst.MessageType.ERROR: 36 | err, debug = message.parse_error() 37 | sys.stderr.write("Error: %s: %s\n" % (err, debug)) 38 | loop.quit() 39 | return True 40 | -------------------------------------------------------------------------------- /resnet10-ros-deepstream/deepstream_python_apps/apps/common/is_aarch_64.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a 5 | # copy of this software and associated documentation files (the "Software"), 6 | # to deal in the Software without restriction, including without limitation 7 | # the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | # and/or sell copies of the Software, and to permit persons to whom the 9 | # Software is furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in 12 | # all copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17 | # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 19 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20 | # DEALINGS IN THE SOFTWARE. 21 | ################################################################################ 22 | 23 | import platform 24 | import sys 25 | 26 | 27 | def is_aarch64(): 28 | return platform.uname()[4] == 'aarch64' 29 | 30 | sys.path.append('/opt/nvidia/deepstream/deepstream/lib') 31 | -------------------------------------------------------------------------------- /resnet10-ros-deepstream/deepstream_python_apps/apps/common/utils.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a 5 | # copy of this software and associated documentation files (the "Software"), 6 | # to deal in the Software without restriction, including without limitation 7 | # the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | # and/or sell copies of the Software, and to permit persons to whom the 9 | # Software is furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in 12 | # all copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17 | # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 19 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20 | # DEALINGS IN THE SOFTWARE. 21 | ################################################################################ 22 | 23 | import ctypes 24 | import sys 25 | sys.path.append('/opt/nvidia/deepstream/deepstream/lib') 26 | 27 | def long_to_int(l): 28 | value = ctypes.c_int(l & 0xffffffff).value 29 | return value 30 | -------------------------------------------------------------------------------- /resnet10-ros-deepstream/deepstream_python_apps/apps/deepstream-test7/README.md: -------------------------------------------------------------------------------- 1 | # test7 建立只能播放的实例,并能实时打印出目标检测数据(坐标、置信度和类别) 2 | 3 | python3命令后面第一个参数“1”代表视频文件输入模式,“2”代表实时摄像头输入模式 4 | 5 | - video_file: 6 | python3 deepstream-test_7_usb_file.py 1 /opt/nvidia/deepstream/deepstream-5.1/samples/streams/sample_720p.h264 7 | (备注):jetson NX 中,以上输入可能会报错,此时需将183行`source_file.set_property('location', args[2])`中的args[2]直接改为视频文件的绝对路径 8 | 9 | 10 | - real_video: 11 | python3 deepstream-test_7_usb_file.py 2 /dev/video0 12 | 13 | 14 | -------------------------------------------------------------------------------- /resnet10-ros-deepstream/deepstream_python_apps/apps/deepstream-test7/dstest7_tracker_config.txt: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Copyright (c) 2018-2020, NVIDIA CORPORATION. All rights reserved. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a 5 | # copy of this software and associated documentation files (the "Software"), 6 | # to deal in the Software without restriction, including without limitation 7 | # the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | # and/or sell copies of the Software, and to permit persons to whom the 9 | # Software is furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in 12 | # all copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17 | # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 19 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20 | # DEALINGS IN THE SOFTWARE. 21 | ################################################################################ 22 | 23 | # Mandatory properties for the tracker: 24 | # tracker-width 25 | # tracker-height: needs to be multiple of 6 for NvDCF 26 | # gpu-id 27 | # ll-lib-file: path to low-level tracker lib 28 | # ll-config-file: required for NvDCF, optional for KLT and IOU 29 | # 30 | [tracker] 31 | #tracker-width=640 32 | #tracker-height=384 33 | tracker-width=960 34 | tracker-height=544 35 | gpu-id=0 36 | #ll-lib-file=/opt/nvidia/deepstream/deepstream-5.1/lib/libnvds_mot_klt.so 37 | ll-lib-file=/opt/nvidia/deepstream/deepstream-5.1/lib/libnvds_nvdcf.so 38 | ll-config-file=tracker_config.yml 39 | #enable-past-frame=1 40 | enable-batch-process=1 41 | -------------------------------------------------------------------------------- /resnet10-ros-deepstream/deepstream_python_apps/apps/runtime_source_add_delete/dstest_tracker_config.txt: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a 5 | # copy of this software and associated documentation files (the "Software"), 6 | # to deal in the Software without restriction, including without limitation 7 | # the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | # and/or sell copies of the Software, and to permit persons to whom the 9 | # Software is furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in 12 | # all copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17 | # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 19 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20 | # DEALINGS IN THE SOFTWARE. 21 | ################################################################################ 22 | 23 | # Mandatory properties for the tracker: 24 | # tracker-width 25 | # tracker-height: needs to be multiple of 32 for NvDCF 26 | # gpu-id 27 | # ll-lib-file: path to low-level tracker lib 28 | # ll-config-file: required for NvDCF, optional for KLT and IOU 29 | # 30 | [tracker] 31 | tracker-width=640 32 | tracker-height=384 33 | gpu-id=0 34 | ll-lib-file=/opt/nvidia/deepstream/deepstream/lib/libnvds_mot_klt.so 35 | #ll-lib-file=/opt/nvidia/deepstream/deepstream/lib/libnvds_nvdcf.so 36 | ll-config-file=tracker_config.yml 37 | enable-batch-process=1 38 | -------------------------------------------------------------------------------- /yolov5-deepstream-cpp/yolov5-io-cpp/config_infer_number_sv30.txt: -------------------------------------------------------------------------------- 1 | [property] 2 | gpu-id=0 3 | net-scale-factor=0.0039215697906911373 4 | model-color-format=0 5 | model-engine-file=number_v30.engine 6 | labelfile-path=number_v30.txt 7 | num-detected-classes=4 8 | interval=0 9 | gie-unique-id=1 10 | process-mode=1 11 | network-type=0 12 | cluster-mode=4 13 | maintain-aspect-ratio=0 14 | parse-bbox-func-name=NvDsInferParseCustomYoloV5 15 | custom-lib-path=nvdsinfer_custom_impl_Yolo/libnvdsinfer_custom_impl_Yolo.so 16 | 17 | [class-attrs-all] 18 | pre-cluster-threshold=0.25 19 | -------------------------------------------------------------------------------- /yolov5-deepstream-cpp/yolov5-io-cpp/config_infer_primary.txt: -------------------------------------------------------------------------------- 1 | [property] 2 | gpu-id=0 3 | net-scale-factor=0.0039215697906911373 4 | model-color-format=0 5 | model-engine-file=yolov5s.engine 6 | labelfile-path=labels.txt 7 | process-mode=1 8 | network-mode=0 9 | num-detected-classes=80 10 | gie-unique-id=1 11 | network-type=0 12 | output-blob-names=prob 13 | cluster-mode=4 14 | maintain-aspect-ratio=1 15 | parse-bbox-func-name=NvDsInferParseCustomYoloV5 16 | custom-lib-path=nvdsinfer_custom_impl_Yolo/libnvdsinfer_custom_impl_Yolo.so 17 | 18 | [class-attrs-all] 19 | nms-iou-threshold=0.5 20 | pre-cluster-threshold=0.4 21 | -------------------------------------------------------------------------------- /yolov5-deepstream-cpp/yolov5-io-cpp/cpp_io/yolov5_tensor: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/yolov5-deepstream-cpp/yolov5-io-cpp/cpp_io/yolov5_tensor -------------------------------------------------------------------------------- /yolov5-deepstream-cpp/yolov5-io-cpp/cpp_io/yolov5_tensor.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | //char true_data[500]; 16 | 17 | int main() 18 | { 19 | while(1) 20 | { 21 | int fd = open("/opt/nvidia/deepstream/deepstream-5.1/sources/yolov5-io-cpp/nvdsinfer_custom_impl_Yolo/internal_memory.txt",O_RDONLY); 22 | char *addr = (char *)mmap(NULL, 3008, PROT_READ,MAP_SHARED, fd, 0); 23 | if (addr == MAP_FAILED) 24 | { 25 | perror("mmap err"); 26 | return -1; 27 | } 28 | //char* addr = (char*)mmap(NULL, boundingboxes_len, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); 29 | close(fd); 30 | char data[10] = {0}; 31 | std::string str_data; 32 | memcpy(data, addr, 1); // 40*60+10(the largest number of objects is 40) 33 | int data_len = (int(data[0])-48)*60 + 10; 34 | //std::cout << "data_len:" << data_len << std::endl; 35 | /*------------below two line will show Memory overflow question------------*/ 36 | char true_data[data_len] = {0}; 37 | char true_true_data[data_len-10] = {0}; 38 | memcpy(true_data, addr, data_len-1); 39 | std::cout << true_data << std::endl; 40 | munmap(addr,3008); 41 | } 42 | return 0; 43 | } 44 | -------------------------------------------------------------------------------- /yolov5-deepstream-cpp/yolov5-io-cpp/deepstream_app_config.txt: -------------------------------------------------------------------------------- 1 | [application] 2 | enable-perf-measurement=1 3 | perf-measurement-interval-sec=5 4 | 5 | [tiled-display] 6 | enable=1 7 | rows=1 8 | columns=1 9 | width=1280 10 | height=720 11 | gpu-id=0 12 | nvbuf-memory-type=0 13 | 14 | [source0] 15 | enable=1 16 | type=3 17 | uri=file://../../samples/streams/sample_1080p_h264.mp4 18 | num-sources=1 19 | gpu-id=0 20 | cudadec-memtype=0 21 | 22 | [sink0] 23 | enable=1 24 | type=2 25 | sync=0 26 | source-id=0 27 | gpu-id=0 28 | nvbuf-memory-type=0 29 | 30 | [osd] 31 | enable=1 32 | gpu-id=0 33 | border-width=4 34 | text-size=15 35 | text-color=1;1;1;1; 36 | text-bg-color=0.3;0.3;0.3;1 37 | font=Serif 38 | show-clock=0 39 | clock-x-offset=800 40 | clock-y-offset=820 41 | clock-text-size=12 42 | clock-color=1;0;0;0 43 | nvbuf-memory-type=0 44 | 45 | [streammux] 46 | gpu-id=0 47 | live-source=0 48 | batch-size=1 49 | batched-push-timeout=40000 50 | width=1920 51 | height=1080 52 | enable-padding=0 53 | nvbuf-memory-type=0 54 | 55 | [primary-gie] 56 | enable=1 57 | gpu-id=0 58 | gie-unique-id=1 59 | nvbuf-memory-type=0 60 | config-file=config_infer_primary.txt 61 | 62 | [tracker] 63 | enable=1 64 | #tracker-width=640 65 | #tracker-height=384 66 | tracker-width=960 67 | tracker-height=544 68 | gpu-id=0 69 | #ll-lib-file=/opt/nvidia/deepstream/deepstream-5.1/lib/libnvds_mot_klt.so 70 | ll-lib-file=/opt/nvidia/deepstream/deepstream-5.1/lib/libnvds_nvdcf.so 71 | ll-config-file=tracker_config.yml 72 | #enable-past-frame=1 73 | enable-batch-process=1 74 | 75 | [tests] 76 | file-loop=0 77 | -------------------------------------------------------------------------------- /yolov5-deepstream-cpp/yolov5-io-cpp/deepstream_app_number_sv30.txt: -------------------------------------------------------------------------------- 1 | [application] 2 | enable-perf-measurement=1 3 | perf-measurement-interval-sec=1 4 | 5 | [tiled-display] 6 | enable=1 7 | rows=1 8 | columns=1 9 | width=1280 10 | height=720 11 | gpu-id=0 12 | nvbuf-memory-type=0 13 | 14 | [source0] 15 | enable=1 16 | type=3 17 | uri=file://video/raw_number1_MP4.mp4 18 | num-sources=1 19 | gpu-id=0 20 | cudadec-memtype=0 21 | 22 | [sink0] 23 | enable=1 24 | type=2 25 | sync=0 26 | source-id=0 27 | gpu-id=0 28 | nvbuf-memory-type=0 29 | 30 | [osd] 31 | enable=1 32 | gpu-id=0 33 | border-width=1 34 | text-size=15 35 | text-color=1;1;1;1; 36 | text-bg-color=0.3;0.3;0.3;1 37 | font=Serif 38 | show-clock=0 39 | clock-x-offset=800 40 | clock-y-offset=820 41 | clock-text-size=12 42 | clock-color=1;0;0;0 43 | nvbuf-memory-type=0 44 | 45 | [streammux] 46 | gpu-id=0 47 | live-source=0 48 | batch-size=1 49 | batched-push-timeout=40000 50 | width=1920 51 | height=1080 52 | enable-padding=0 53 | nvbuf-memory-type=0 54 | 55 | [primary-gie] 56 | enable=1 57 | gpu-id=0 58 | gie-unique-id=1 59 | nvbuf-memory-type=0 60 | config-file=config_infer_number_sv30.txt 61 | 62 | [tests] 63 | file-loop=0 64 | -------------------------------------------------------------------------------- /yolov5-deepstream-cpp/yolov5-io-cpp/labels.txt: -------------------------------------------------------------------------------- 1 | person 2 | bicycle 3 | car 4 | motorbike 5 | aeroplane 6 | bus 7 | train 8 | truck 9 | boat 10 | traffic light 11 | fire hydrant 12 | stop sign 13 | parking meter 14 | bench 15 | bird 16 | cat 17 | dog 18 | horse 19 | sheep 20 | cow 21 | elephant 22 | bear 23 | zebra 24 | giraffe 25 | backpack 26 | umbrella 27 | handbag 28 | tie 29 | suitcase 30 | frisbee 31 | skis 32 | snowboard 33 | sports ball 34 | kite 35 | baseball bat 36 | baseball glove 37 | skateboard 38 | surfboard 39 | tennis racket 40 | bottle 41 | wine glass 42 | cup 43 | fork 44 | knife 45 | spoon 46 | bowl 47 | banana 48 | apple 49 | sandwich 50 | orange 51 | broccoli 52 | carrot 53 | hot dog 54 | pizza 55 | donut 56 | cake 57 | chair 58 | sofa 59 | pottedplant 60 | bed 61 | diningtable 62 | toilet 63 | tvmonitor 64 | laptop 65 | mouse 66 | remote 67 | keyboard 68 | cell phone 69 | microwave 70 | oven 71 | toaster 72 | sink 73 | refrigerator 74 | book 75 | clock 76 | vase 77 | scissors 78 | teddy bear 79 | hair drier 80 | toothbrush 81 | -------------------------------------------------------------------------------- /yolov5-deepstream-cpp/yolov5-io-cpp/number_v30.txt: -------------------------------------------------------------------------------- 1 | zero 2 | one 3 | two 4 | three 5 | -------------------------------------------------------------------------------- /yolov5-deepstream-cpp/yolov5-io-cpp/nvdsinfer_custom_impl_Yolo/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | CUDA_VER?= 18 | ifeq ($(CUDA_VER),) 19 | $(error "CUDA_VER is not set") 20 | endif 21 | CC:= g++ 22 | NVCC:=/usr/local/cuda-$(CUDA_VER)/bin/nvcc 23 | 24 | CFLAGS:= -Wall -std=c++11 -shared -fPIC -Wno-error=deprecated-declarations 25 | CFLAGS+= -I../../includes -I/usr/local/cuda-$(CUDA_VER)/include 26 | 27 | LIBS:= -lnvinfer_plugin -lnvinfer -lnvparsers -L/usr/local/cuda-$(CUDA_VER)/lib64 -lcudart -lcublas -lstdc++fs 28 | LFLAGS:= -shared -Wl,--start-group $(LIBS) -Wl,--end-group 29 | 30 | INCS:= $(wildcard *.h) 31 | SRCFILES:= nvdsparsebbox_Yolo.cpp \ 32 | yololayer.cu 33 | 34 | TARGET_LIB:= libnvdsinfer_custom_impl_Yolo.so 35 | 36 | TARGET_OBJS:= $(SRCFILES:.cpp=.o) 37 | TARGET_OBJS:= $(TARGET_OBJS:.cu=.o) 38 | 39 | all: $(TARGET_LIB) 40 | 41 | %.o: %.cpp $(INCS) Makefile 42 | $(CC) -c -o $@ $(CFLAGS) $< 43 | 44 | %.o: %.cu $(INCS) Makefile 45 | $(NVCC) -c -o $@ --compiler-options '-fPIC' $< 46 | 47 | $(TARGET_LIB) : $(TARGET_OBJS) 48 | $(CC) -o $@ $(TARGET_OBJS) $(LFLAGS) 49 | 50 | clean: 51 | rm -rf $(TARGET_LIB) 52 | rm -rf $(TARGET_OBJS) 53 | -------------------------------------------------------------------------------- /yolov5-deepstream-cpp/yolov5-io-cpp/nvdsinfer_custom_impl_Yolo/libnvdsinfer_custom_impl_Yolo.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/yolov5-deepstream-cpp/yolov5-io-cpp/nvdsinfer_custom_impl_Yolo/libnvdsinfer_custom_impl_Yolo.so -------------------------------------------------------------------------------- /yolov5-deepstream-cpp/yolov5-io-cpp/nvdsinfer_custom_impl_Yolo/nvdsparsebbox_Yolo.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/yolov5-deepstream-cpp/yolov5-io-cpp/nvdsinfer_custom_impl_Yolo/nvdsparsebbox_Yolo.o -------------------------------------------------------------------------------- /yolov5-deepstream-cpp/yolov5-io-cpp/nvdsinfer_custom_impl_Yolo/yololayer.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/yolov5-deepstream-cpp/yolov5-io-cpp/nvdsinfer_custom_impl_Yolo/yololayer.o -------------------------------------------------------------------------------- /yolov5-deepstream-cpp/yolov5-io-cpp/source1_usb_dec_infer_yolov5.txt: -------------------------------------------------------------------------------- 1 | 2 | [application] 3 | enable-perf-measurement=1 4 | perf-measurement-interval-sec=5 5 | #gie-kitti-output-dir=streamscl 6 | 7 | [tiled-display] 8 | enable=1 9 | rows=1 10 | columns=1 11 | width=1280 12 | height=720 13 | 14 | [source0] 15 | enable=1 16 | #Type - 1=CameraV4L2 2=URI 3=MultiURI 17 | type=1 18 | camera-width=640 19 | camera-height=480 20 | camera-fps-n=30 21 | camera-fps-d=1 22 | camera-v4l2-dev-node=0 23 | 24 | [sink0] 25 | enable=1 26 | #Type - 1=FakeSink 2=EglSink 3=File 4=RTSPStreaming 5=Overlay 27 | type=2 28 | sync=0 29 | display-id=0 30 | offset-x=100 31 | offset-y=120 32 | width=1280 33 | height=720 34 | overlay-id=1 35 | source-id=0 36 | 37 | [osd] 38 | enable=1 39 | border-width=4 40 | text-size=15 41 | text-color=1;1;1;1; 42 | text-bg-color=0.3;0.3;0.3;1 43 | font=Serif 44 | show-clock=0 45 | clock-x-offset=800 46 | clock-y-offset=820 47 | clock-text-size=12 48 | clock-color=1;0;0;0 49 | 50 | [streammux] 51 | ##Boolean property to inform muxer that sources are live 52 | live-source=1 53 | batch-size=1 54 | ##time out in usec, to wait after the first buffer is available 55 | ##to push the batch even if the complete batch is not formed 56 | batched-push-timeout=40000 57 | ## Set muxer output width and height 58 | width=1280 59 | height=720 60 | ## If set to TRUE, system timestamp will be attached as ntp timestamp 61 | ## If set to FALSE, ntp timestamp from rtspsrc, if available, will be attached 62 | # attach-sys-ts-as-ntp=1 63 | 64 | # config-file property is mandatory for any gie section. 65 | # Other properties are optional and if set will override the properties set in 66 | # the infer config file. 67 | [primary-gie] 68 | enable=1 69 | gpu-id=0 70 | gie-unique-id=1 71 | nvbuf-memory-type=0 72 | config-file=config_infer_primary.txt 73 | 74 | [tracker] 75 | enable=1 76 | #tracker-width=640 77 | #tracker-height=384 78 | tracker-width=960 79 | tracker-height=544 80 | gpu-id=0 81 | #ll-lib-file=/opt/nvidia/deepstream/deepstream-5.1/lib/libnvds_mot_klt.so 82 | ll-lib-file=/opt/nvidia/deepstream/deepstream-5.1/lib/libnvds_nvdcf.so 83 | ll-config-file=tracker_config.yml 84 | #enable-past-frame=1 85 | enable-batch-process=1 86 | 87 | 88 | [tests] 89 | file-loop=0 90 | -------------------------------------------------------------------------------- /yolov5-deepstream-python/yolov5-io-python/client.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | import numpy 3 | import time 4 | import re 5 | import mmap 6 | global boundingboxes_txt 7 | global boundingboxes_list 8 | if __name__ == "__main__": 9 | while (1): 10 | with open('/opt/nvidia/deepstream/deepstream-5.1/sources/yolov5-io-python/nvdsinfer_custom_impl_Yolo/internal_memory.txt', 'r+b') as f: 11 | # mmap基本上接收两个参数,(文件描述符,读取长度),size 为0表示读取整个文件 12 | mm = mmap.mmap(f.fileno(), 0) 13 | mm.seek(0) # 定位到文件头 14 | # byte_numline = mm[0] # mm[]取出来的是byte类型, 要转为int型 15 | byte_numline = int(mm.read(1)) 16 | str_numline = str(byte_numline) # 将bytes转化为str类型 17 | boundingboxes_txt = str(mm[10:int(str_numline)*60 + 10]) 18 | #print("boundingboxes = \n",mm[6:int(str_numline_out)+6]) 19 | mm.close() 20 | boundingboxes_list = re.findall(r"\d+\.?\d*", boundingboxes_txt) 21 | #print('boundingboxes_list = ',boundingboxes_list) 22 | array_boundingbox = numpy.array(boundingboxes_list) 23 | #print("array_boundingbox = ",boundingboxes_list) 24 | box_number = len(boundingboxes_list) // 6 25 | print('box_number = ', box_number) 26 | re_array_boundingbox = numpy.resize(array_boundingbox, (box_number, 6)) 27 | #print('re_array_boundingbox:\n', re_array_boundingbox) 28 | print(re_array_boundingbox) 29 | print("#---------------------------------------------------------------#") 30 | 31 | 32 | -------------------------------------------------------------------------------- /yolov5-deepstream-python/yolov5-io-python/config_infer_number_sv30.txt: -------------------------------------------------------------------------------- 1 | [property] 2 | gpu-id=0 3 | net-scale-factor=0.0039215697906911373 4 | model-color-format=0 5 | model-engine-file=number_v30.engine 6 | labelfile-path=number_v30.txt 7 | num-detected-classes=4 8 | interval=0 9 | gie-unique-id=1 10 | process-mode=1 11 | network-type=0 12 | cluster-mode=4 13 | maintain-aspect-ratio=0 14 | parse-bbox-func-name=NvDsInferParseCustomYoloV5 15 | custom-lib-path=nvdsinfer_custom_impl_Yolo/libnvdsinfer_custom_impl_Yolo.so 16 | 17 | [class-attrs-all] 18 | pre-cluster-threshold=0.25 19 | -------------------------------------------------------------------------------- /yolov5-deepstream-python/yolov5-io-python/config_infer_primary.txt: -------------------------------------------------------------------------------- 1 | [property] 2 | gpu-id=0 3 | net-scale-factor=0.0039215697906911373 4 | model-color-format=0 5 | model-engine-file=yolov5s.engine 6 | labelfile-path=labels.txt 7 | process-mode=1 8 | network-mode=0 9 | num-detected-classes=80 10 | gie-unique-id=1 11 | network-type=0 12 | output-blob-names=prob 13 | cluster-mode=4 14 | maintain-aspect-ratio=1 15 | parse-bbox-func-name=NvDsInferParseCustomYoloV5 16 | custom-lib-path=nvdsinfer_custom_impl_Yolo/libnvdsinfer_custom_impl_Yolo.so 17 | 18 | [class-attrs-all] 19 | nms-iou-threshold=0.5 20 | pre-cluster-threshold=0.4 21 | -------------------------------------------------------------------------------- /yolov5-deepstream-python/yolov5-io-python/deepstream_app_config.txt: -------------------------------------------------------------------------------- 1 | [application] 2 | enable-perf-measurement=1 3 | perf-measurement-interval-sec=5 4 | 5 | [tiled-display] 6 | enable=1 7 | rows=1 8 | columns=1 9 | width=1280 10 | height=720 11 | gpu-id=0 12 | nvbuf-memory-type=0 13 | 14 | [source0] 15 | enable=1 16 | type=3 17 | uri=file://../../samples/streams/sample_1080p_h264.mp4 18 | num-sources=1 19 | gpu-id=0 20 | cudadec-memtype=0 21 | 22 | [sink0] 23 | enable=1 24 | type=2 25 | sync=0 26 | source-id=0 27 | gpu-id=0 28 | nvbuf-memory-type=0 29 | 30 | [osd] 31 | enable=1 32 | gpu-id=0 33 | border-width=4 34 | text-size=15 35 | text-color=1;1;1;1; 36 | text-bg-color=0.3;0.3;0.3;1 37 | font=Serif 38 | show-clock=0 39 | clock-x-offset=800 40 | clock-y-offset=820 41 | clock-text-size=12 42 | clock-color=1;0;0;0 43 | nvbuf-memory-type=0 44 | 45 | [streammux] 46 | gpu-id=0 47 | live-source=0 48 | batch-size=1 49 | batched-push-timeout=40000 50 | width=1920 51 | height=1080 52 | enable-padding=0 53 | nvbuf-memory-type=0 54 | 55 | [primary-gie] 56 | enable=1 57 | gpu-id=0 58 | gie-unique-id=1 59 | nvbuf-memory-type=0 60 | config-file=config_infer_primary.txt 61 | 62 | [tracker] 63 | enable=1 64 | #tracker-width=640 65 | #tracker-height=384 66 | tracker-width=960 67 | tracker-height=544 68 | gpu-id=0 69 | #ll-lib-file=/opt/nvidia/deepstream/deepstream-5.1/lib/libnvds_mot_klt.so 70 | ll-lib-file=/opt/nvidia/deepstream/deepstream-5.1/lib/libnvds_nvdcf.so 71 | ll-config-file=tracker_config.yml 72 | #enable-past-frame=1 73 | enable-batch-process=1 74 | 75 | [tests] 76 | file-loop=0 77 | -------------------------------------------------------------------------------- /yolov5-deepstream-python/yolov5-io-python/deepstream_app_number_sv30.txt: -------------------------------------------------------------------------------- 1 | [application] 2 | enable-perf-measurement=1 3 | perf-measurement-interval-sec=1 4 | 5 | [tiled-display] 6 | enable=1 7 | rows=1 8 | columns=1 9 | width=1280 10 | height=720 11 | gpu-id=0 12 | nvbuf-memory-type=0 13 | 14 | [source0] 15 | enable=1 16 | type=3 17 | uri=file://video/raw_number1_MP4.mp4 18 | num-sources=1 19 | gpu-id=0 20 | cudadec-memtype=0 21 | 22 | [sink0] 23 | enable=1 24 | type=2 25 | sync=0 26 | source-id=0 27 | gpu-id=0 28 | nvbuf-memory-type=0 29 | 30 | [osd] 31 | enable=1 32 | gpu-id=0 33 | border-width=1 34 | text-size=15 35 | text-color=1;1;1;1; 36 | text-bg-color=0.3;0.3;0.3;1 37 | font=Serif 38 | show-clock=0 39 | clock-x-offset=800 40 | clock-y-offset=820 41 | clock-text-size=12 42 | clock-color=1;0;0;0 43 | nvbuf-memory-type=0 44 | 45 | [streammux] 46 | gpu-id=0 47 | live-source=0 48 | batch-size=1 49 | batched-push-timeout=40000 50 | width=1920 51 | height=1080 52 | enable-padding=0 53 | nvbuf-memory-type=0 54 | 55 | [primary-gie] 56 | enable=1 57 | gpu-id=0 58 | gie-unique-id=1 59 | nvbuf-memory-type=0 60 | config-file=config_infer_number_sv30.txt 61 | 62 | [tests] 63 | file-loop=0 64 | -------------------------------------------------------------------------------- /yolov5-deepstream-python/yolov5-io-python/labels.txt: -------------------------------------------------------------------------------- 1 | person 2 | bicycle 3 | car 4 | motorbike 5 | aeroplane 6 | bus 7 | train 8 | truck 9 | boat 10 | traffic light 11 | fire hydrant 12 | stop sign 13 | parking meter 14 | bench 15 | bird 16 | cat 17 | dog 18 | horse 19 | sheep 20 | cow 21 | elephant 22 | bear 23 | zebra 24 | giraffe 25 | backpack 26 | umbrella 27 | handbag 28 | tie 29 | suitcase 30 | frisbee 31 | skis 32 | snowboard 33 | sports ball 34 | kite 35 | baseball bat 36 | baseball glove 37 | skateboard 38 | surfboard 39 | tennis racket 40 | bottle 41 | wine glass 42 | cup 43 | fork 44 | knife 45 | spoon 46 | bowl 47 | banana 48 | apple 49 | sandwich 50 | orange 51 | broccoli 52 | carrot 53 | hot dog 54 | pizza 55 | donut 56 | cake 57 | chair 58 | sofa 59 | pottedplant 60 | bed 61 | diningtable 62 | toilet 63 | tvmonitor 64 | laptop 65 | mouse 66 | remote 67 | keyboard 68 | cell phone 69 | microwave 70 | oven 71 | toaster 72 | sink 73 | refrigerator 74 | book 75 | clock 76 | vase 77 | scissors 78 | teddy bear 79 | hair drier 80 | toothbrush 81 | -------------------------------------------------------------------------------- /yolov5-deepstream-python/yolov5-io-python/number_v30.txt: -------------------------------------------------------------------------------- 1 | zero 2 | one 3 | two 4 | three 5 | -------------------------------------------------------------------------------- /yolov5-deepstream-python/yolov5-io-python/nvdsinfer_custom_impl_Yolo/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | CUDA_VER?= 18 | ifeq ($(CUDA_VER),) 19 | $(error "CUDA_VER is not set") 20 | endif 21 | CC:= g++ 22 | NVCC:=/usr/local/cuda-$(CUDA_VER)/bin/nvcc 23 | 24 | CFLAGS:= -Wall -std=c++11 -shared -fPIC -Wno-error=deprecated-declarations 25 | CFLAGS+= -I../../includes -I/usr/local/cuda-$(CUDA_VER)/include 26 | 27 | LIBS:= -lnvinfer_plugin -lnvinfer -lnvparsers -L/usr/local/cuda-$(CUDA_VER)/lib64 -lcudart -lcublas -lstdc++fs 28 | LFLAGS:= -shared -Wl,--start-group $(LIBS) -Wl,--end-group 29 | 30 | INCS:= $(wildcard *.h) 31 | SRCFILES:= nvdsparsebbox_Yolo.cpp \ 32 | yololayer.cu 33 | 34 | TARGET_LIB:= libnvdsinfer_custom_impl_Yolo.so 35 | 36 | TARGET_OBJS:= $(SRCFILES:.cpp=.o) 37 | TARGET_OBJS:= $(TARGET_OBJS:.cu=.o) 38 | 39 | all: $(TARGET_LIB) 40 | 41 | %.o: %.cpp $(INCS) Makefile 42 | $(CC) -c -o $@ $(CFLAGS) $< 43 | 44 | %.o: %.cu $(INCS) Makefile 45 | $(NVCC) -c -o $@ --compiler-options '-fPIC' $< 46 | 47 | $(TARGET_LIB) : $(TARGET_OBJS) 48 | $(CC) -o $@ $(TARGET_OBJS) $(LFLAGS) 49 | 50 | clean: 51 | rm -rf $(TARGET_LIB) 52 | rm -rf $(TARGET_OBJS) 53 | -------------------------------------------------------------------------------- /yolov5-deepstream-python/yolov5-io-python/nvdsinfer_custom_impl_Yolo/libnvdsinfer_custom_impl_Yolo.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/yolov5-deepstream-python/yolov5-io-python/nvdsinfer_custom_impl_Yolo/libnvdsinfer_custom_impl_Yolo.so -------------------------------------------------------------------------------- /yolov5-deepstream-python/yolov5-io-python/nvdsinfer_custom_impl_Yolo/nvdsparsebbox_Yolo.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/yolov5-deepstream-python/yolov5-io-python/nvdsinfer_custom_impl_Yolo/nvdsparsebbox_Yolo.o -------------------------------------------------------------------------------- /yolov5-deepstream-python/yolov5-io-python/nvdsinfer_custom_impl_Yolo/yololayer.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/yolov5-deepstream-python/yolov5-io-python/nvdsinfer_custom_impl_Yolo/yololayer.o -------------------------------------------------------------------------------- /yolov5-deepstream-python/yolov5-io-python/source1_usb_dec_infer_yolov5.txt: -------------------------------------------------------------------------------- 1 | 2 | [application] 3 | enable-perf-measurement=1 4 | perf-measurement-interval-sec=5 5 | #gie-kitti-output-dir=streamscl 6 | 7 | [tiled-display] 8 | enable=1 9 | rows=1 10 | columns=1 11 | width=1280 12 | height=720 13 | 14 | [source0] 15 | enable=1 16 | #Type - 1=CameraV4L2 2=URI 3=MultiURI 17 | type=1 18 | camera-width=640 19 | camera-height=480 20 | camera-fps-n=30 21 | camera-fps-d=1 22 | camera-v4l2-dev-node=0 23 | 24 | [sink0] 25 | enable=1 26 | #Type - 1=FakeSink 2=EglSink 3=File 4=RTSPStreaming 5=Overlay 27 | type=2 28 | sync=0 29 | display-id=0 30 | offset-x=100 31 | offset-y=120 32 | width=1280 33 | height=720 34 | overlay-id=1 35 | source-id=0 36 | 37 | [osd] 38 | enable=1 39 | border-width=4 40 | text-size=15 41 | text-color=1;1;1;1; 42 | text-bg-color=0.3;0.3;0.3;1 43 | font=Serif 44 | show-clock=0 45 | clock-x-offset=800 46 | clock-y-offset=820 47 | clock-text-size=12 48 | clock-color=1;0;0;0 49 | 50 | [streammux] 51 | ##Boolean property to inform muxer that sources are live 52 | live-source=1 53 | batch-size=1 54 | ##time out in usec, to wait after the first buffer is available 55 | ##to push the batch even if the complete batch is not formed 56 | batched-push-timeout=40000 57 | ## Set muxer output width and height 58 | width=1280 59 | height=720 60 | ## If set to TRUE, system timestamp will be attached as ntp timestamp 61 | ## If set to FALSE, ntp timestamp from rtspsrc, if available, will be attached 62 | # attach-sys-ts-as-ntp=1 63 | 64 | # config-file property is mandatory for any gie section. 65 | # Other properties are optional and if set will override the properties set in 66 | # the infer config file. 67 | [primary-gie] 68 | enable=1 69 | gpu-id=0 70 | gie-unique-id=1 71 | nvbuf-memory-type=0 72 | config-file=config_infer_primary.txt 73 | 74 | [tracker] 75 | enable=1 76 | #tracker-width=640 77 | #tracker-height=384 78 | tracker-width=960 79 | tracker-height=544 80 | gpu-id=0 81 | #ll-lib-file=/opt/nvidia/deepstream/deepstream-5.1/lib/libnvds_mot_klt.so 82 | ll-lib-file=/opt/nvidia/deepstream/deepstream-5.1/lib/libnvds_nvdcf.so 83 | ll-config-file=tracker_config.yml 84 | #enable-past-frame=1 85 | enable-batch-process=1 86 | 87 | 88 | [tests] 89 | file-loop=0 90 | -------------------------------------------------------------------------------- /yolov5-ros-deepstream/boxes_ws/.catkin_workspace: -------------------------------------------------------------------------------- 1 | # This file currently only serves to mark the location of a catkin workspace for tool integration 2 | -------------------------------------------------------------------------------- /yolov5-ros-deepstream/boxes_ws/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | /opt/ros/melodic/share/catkin/cmake/toplevel.cmake -------------------------------------------------------------------------------- /yolov5-ros-deepstream/boxes_ws/src/darknet_ros_msgs/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.12) 2 | 3 | project(darknet_ros_msgs) 4 | 5 | set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}") 6 | 7 | find_package(catkin REQUIRED 8 | COMPONENTS 9 | geometry_msgs 10 | sensor_msgs 11 | std_msgs 12 | message_generation 13 | ) 14 | 15 | add_message_files( 16 | FILES 17 | BoundingBox.msg 18 | BoundingBoxes.msg 19 | BoundingBox_tensor.msg 20 | BoundingBoxes_tensor.msg 21 | ) 22 | 23 | #add_action_files( 24 | # FILES 25 | # CheckForObjects.action 26 | #) 27 | 28 | generate_messages( 29 | DEPENDENCIES 30 | geometry_msgs 31 | sensor_msgs 32 | std_msgs 33 | ) 34 | 35 | catkin_package( 36 | CATKIN_DEPENDS 37 | geometry_msgs 38 | sensor_msgs 39 | message_runtime 40 | std_msgs 41 | ) 42 | -------------------------------------------------------------------------------- /yolov5-ros-deepstream/boxes_ws/src/darknet_ros_msgs/msg/BoundingBox.msg: -------------------------------------------------------------------------------- 1 | float64 probability 2 | int64 x_center 3 | int64 y_center 4 | int16 id 5 | string Class 6 | -------------------------------------------------------------------------------- /yolov5-ros-deepstream/boxes_ws/src/darknet_ros_msgs/msg/BoundingBox_tensor.msg: -------------------------------------------------------------------------------- 1 | float64 probability 2 | int64 top 3 | int64 left 4 | int64 width 5 | int64 height 6 | int16 id 7 | string Class 8 | -------------------------------------------------------------------------------- /yolov5-ros-deepstream/boxes_ws/src/darknet_ros_msgs/msg/BoundingBoxes.msg: -------------------------------------------------------------------------------- 1 | BoundingBox[] bounding_boxes 2 | -------------------------------------------------------------------------------- /yolov5-ros-deepstream/boxes_ws/src/darknet_ros_msgs/msg/BoundingBoxes_tensor.msg: -------------------------------------------------------------------------------- 1 | BoundingBox_tensor[] boundingboxes_tensor 2 | -------------------------------------------------------------------------------- /yolov5-ros-deepstream/boxes_ws/src/darknet_ros_msgs/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | darknet_ros_msgs 4 | 1.1.4 5 | Darknet is an open source neural network framework that runs on CPU and GPU. You only look once (YOLO) is a state-of-the-art, real-time object detection system. 6 | Marko Bjelonic 7 | BSD 8 | https://github.com/leggedrobotics/darknet_ros 9 | Marko Bjelonic 10 | 11 | catkin 12 | 13 | 14 | geometry_msgs 15 | sensor_msgs 16 | message_generation 17 | std_msgs 18 | 19 | geometry_msgs 20 | sensor_msgs 21 | message_runtime 22 | std_msgs 23 | 24 | -------------------------------------------------------------------------------- /yolov5-ros-deepstream/yolov5-ros/config_infer_number_sv30.txt: -------------------------------------------------------------------------------- 1 | [property] 2 | gpu-id=0 3 | net-scale-factor=0.0039215697906911373 4 | model-color-format=0 5 | model-engine-file=number_v30.engine 6 | labelfile-path=number_v30.txt 7 | num-detected-classes=4 8 | interval=0 9 | gie-unique-id=1 10 | process-mode=1 11 | network-type=0 12 | cluster-mode=4 13 | maintain-aspect-ratio=0 14 | parse-bbox-func-name=NvDsInferParseCustomYoloV5 15 | custom-lib-path=nvdsinfer_custom_impl_Yolo/libnvdsinfer_custom_impl_Yolo.so 16 | 17 | [class-attrs-all] 18 | pre-cluster-threshold=0.25 19 | -------------------------------------------------------------------------------- /yolov5-ros-deepstream/yolov5-ros/config_infer_primary.txt: -------------------------------------------------------------------------------- 1 | [property] 2 | gpu-id=0 3 | net-scale-factor=0.0039215697906911373 4 | model-color-format=0 5 | model-engine-file=yolov5s.engine 6 | labelfile-path=labels.txt 7 | process-mode=1 8 | network-mode=2 9 | num-detected-classes=80 10 | gie-unique-id=1 11 | network-type=0 12 | output-blob-names=prob 13 | cluster-mode=4 14 | maintain-aspect-ratio=1 15 | parse-bbox-func-name=NvDsInferParseCustomYoloV5 16 | custom-lib-path=nvdsinfer_custom_impl_Yolo/libnvdsinfer_custom_impl_Yolo.so 17 | 18 | [class-attrs-all] 19 | nms-iou-threshold=0.5 20 | pre-cluster-threshold=0.4 21 | -------------------------------------------------------------------------------- /yolov5-ros-deepstream/yolov5-ros/darknet_ros_msgs: -------------------------------------------------------------------------------- 1 | /home/guo/boxes_ws/src/darknet_ros_msgs -------------------------------------------------------------------------------- /yolov5-ros-deepstream/yolov5-ros/deepstream_app_config.txt: -------------------------------------------------------------------------------- 1 | [application] 2 | enable-perf-measurement=1 3 | perf-measurement-interval-sec=5 4 | 5 | [tiled-display] 6 | enable=1 7 | rows=1 8 | columns=1 9 | width=1280 10 | height=720 11 | gpu-id=0 12 | nvbuf-memory-type=0 13 | 14 | [source0] 15 | enable=1 16 | type=3 17 | uri=file://../../samples/streams/sample_1080p_h264.mp4 18 | num-sources=1 19 | gpu-id=0 20 | cudadec-memtype=0 21 | 22 | [sink0] 23 | enable=1 24 | type=2 25 | sync=0 26 | source-id=0 27 | gpu-id=0 28 | nvbuf-memory-type=0 29 | 30 | [osd] 31 | enable=1 32 | gpu-id=0 33 | border-width=4 34 | text-size=15 35 | text-color=1;1;1;1; 36 | text-bg-color=0.3;0.3;0.3;1 37 | font=Serif 38 | show-clock=0 39 | clock-x-offset=800 40 | clock-y-offset=820 41 | clock-text-size=12 42 | clock-color=1;0;0;0 43 | nvbuf-memory-type=0 44 | 45 | [streammux] 46 | gpu-id=0 47 | live-source=0 48 | batch-size=1 49 | batched-push-timeout=40000 50 | width=1920 51 | height=1080 52 | enable-padding=0 53 | nvbuf-memory-type=0 54 | 55 | [primary-gie] 56 | enable=1 57 | gpu-id=0 58 | gie-unique-id=1 59 | nvbuf-memory-type=0 60 | config-file=config_infer_primary.txt 61 | 62 | [tracker] 63 | enable=1 64 | #tracker-width=640 65 | #tracker-height=384 66 | tracker-width=960 67 | tracker-height=544 68 | gpu-id=0 69 | #ll-lib-file=/opt/nvidia/deepstream/deepstream-5.1/lib/libnvds_mot_klt.so 70 | ll-lib-file=/opt/nvidia/deepstream/deepstream-5.1/lib/libnvds_nvdcf.so 71 | ll-config-file=tracker_config.yml 72 | #enable-past-frame=1 73 | enable-batch-process=1 74 | 75 | [tests] 76 | file-loop=0 77 | -------------------------------------------------------------------------------- /yolov5-ros-deepstream/yolov5-ros/deepstream_app_number_sv30.txt: -------------------------------------------------------------------------------- 1 | [application] 2 | enable-perf-measurement=1 3 | perf-measurement-interval-sec=1 4 | 5 | [tiled-display] 6 | enable=1 7 | rows=1 8 | columns=1 9 | width=1280 10 | height=720 11 | gpu-id=0 12 | nvbuf-memory-type=0 13 | 14 | [source0] 15 | enable=1 16 | type=3 17 | uri=file://video/raw_number1_MP4.mp4 18 | num-sources=1 19 | gpu-id=0 20 | cudadec-memtype=0 21 | 22 | [sink0] 23 | enable=1 24 | type=2 25 | sync=0 26 | source-id=0 27 | gpu-id=0 28 | nvbuf-memory-type=0 29 | 30 | [osd] 31 | enable=1 32 | gpu-id=0 33 | border-width=1 34 | text-size=15 35 | text-color=1;1;1;1; 36 | text-bg-color=0.3;0.3;0.3;1 37 | font=Serif 38 | show-clock=0 39 | clock-x-offset=800 40 | clock-y-offset=820 41 | clock-text-size=12 42 | clock-color=1;0;0;0 43 | nvbuf-memory-type=0 44 | 45 | [streammux] 46 | gpu-id=0 47 | live-source=0 48 | batch-size=1 49 | batched-push-timeout=40000 50 | width=1920 51 | height=1080 52 | enable-padding=0 53 | nvbuf-memory-type=0 54 | 55 | [primary-gie] 56 | enable=1 57 | gpu-id=0 58 | gie-unique-id=1 59 | nvbuf-memory-type=0 60 | config-file=config_infer_number_sv30.txt 61 | 62 | [tests] 63 | file-loop=0 64 | -------------------------------------------------------------------------------- /yolov5-ros-deepstream/yolov5-ros/labels.txt: -------------------------------------------------------------------------------- 1 | person 2 | bicycle 3 | car 4 | motorbike 5 | aeroplane 6 | bus 7 | train 8 | truck 9 | boat 10 | traffic light 11 | fire hydrant 12 | stop sign 13 | parking meter 14 | bench 15 | bird 16 | cat 17 | dog 18 | horse 19 | sheep 20 | cow 21 | elephant 22 | bear 23 | zebra 24 | giraffe 25 | backpack 26 | umbrella 27 | handbag 28 | tie 29 | suitcase 30 | frisbee 31 | skis 32 | snowboard 33 | sports ball 34 | kite 35 | baseball bat 36 | baseball glove 37 | skateboard 38 | surfboard 39 | tennis racket 40 | bottle 41 | wine glass 42 | cup 43 | fork 44 | knife 45 | spoon 46 | bowl 47 | banana 48 | apple 49 | sandwich 50 | orange 51 | broccoli 52 | carrot 53 | hot dog 54 | pizza 55 | donut 56 | cake 57 | chair 58 | sofa 59 | pottedplant 60 | bed 61 | diningtable 62 | toilet 63 | tvmonitor 64 | laptop 65 | mouse 66 | remote 67 | keyboard 68 | cell phone 69 | microwave 70 | oven 71 | toaster 72 | sink 73 | refrigerator 74 | book 75 | clock 76 | vase 77 | scissors 78 | teddy bear 79 | hair drier 80 | toothbrush 81 | -------------------------------------------------------------------------------- /yolov5-ros-deepstream/yolov5-ros/number_v30.txt: -------------------------------------------------------------------------------- 1 | zero 2 | one 3 | two 4 | three 5 | -------------------------------------------------------------------------------- /yolov5-ros-deepstream/yolov5-ros/nvdsinfer_custom_impl_Yolo/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | CUDA_VER?= 18 | ifeq ($(CUDA_VER),) 19 | $(error "CUDA_VER is not set") 20 | endif 21 | CC:= g++ 22 | NVCC:=/usr/local/cuda-$(CUDA_VER)/bin/nvcc 23 | 24 | CFLAGS:= -Wall -std=c++11 -shared -fPIC -Wno-error=deprecated-declarations 25 | CFLAGS+= -I../../includes -I/usr/local/cuda-$(CUDA_VER)/include 26 | 27 | LIBS:= -lnvinfer_plugin -lnvinfer -lnvparsers -L/usr/local/cuda-$(CUDA_VER)/lib64 -lcudart -lcublas -lstdc++fs 28 | LFLAGS:= -shared -Wl,--start-group $(LIBS) -Wl,--end-group 29 | 30 | INCS:= $(wildcard *.h) 31 | SRCFILES:= nvdsparsebbox_Yolo.cpp \ 32 | yololayer.cu 33 | 34 | TARGET_LIB:= libnvdsinfer_custom_impl_Yolo.so 35 | 36 | TARGET_OBJS:= $(SRCFILES:.cpp=.o) 37 | TARGET_OBJS:= $(TARGET_OBJS:.cu=.o) 38 | 39 | all: $(TARGET_LIB) 40 | 41 | %.o: %.cpp $(INCS) Makefile 42 | $(CC) -c -o $@ $(CFLAGS) $< 43 | 44 | %.o: %.cu $(INCS) Makefile 45 | $(NVCC) -c -o $@ --compiler-options '-fPIC' $< 46 | 47 | $(TARGET_LIB) : $(TARGET_OBJS) 48 | $(CC) -o $@ $(TARGET_OBJS) $(LFLAGS) 49 | 50 | clean: 51 | rm -rf $(TARGET_LIB) 52 | rm -rf $(TARGET_OBJS) 53 | -------------------------------------------------------------------------------- /yolov5-ros-deepstream/yolov5-ros/nvdsinfer_custom_impl_Yolo/libnvdsinfer_custom_impl_Yolo.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/yolov5-ros-deepstream/yolov5-ros/nvdsinfer_custom_impl_Yolo/libnvdsinfer_custom_impl_Yolo.so -------------------------------------------------------------------------------- /yolov5-ros-deepstream/yolov5-ros/nvdsinfer_custom_impl_Yolo/nvdsparsebbox_Yolo.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/yolov5-ros-deepstream/yolov5-ros/nvdsinfer_custom_impl_Yolo/nvdsparsebbox_Yolo.o -------------------------------------------------------------------------------- /yolov5-ros-deepstream/yolov5-ros/nvdsinfer_custom_impl_Yolo/yololayer.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/yolov5-ros-deepstream/yolov5-ros/nvdsinfer_custom_impl_Yolo/yololayer.o -------------------------------------------------------------------------------- /yolov5-ros-deepstream/yolov5-ros/source1_csi_dec_infer_yolov5.txt: -------------------------------------------------------------------------------- 1 | 2 | [application] 3 | enable-perf-measurement=1 4 | perf-measurement-interval-sec=5 5 | #gie-kitti-output-dir=streamscl 6 | 7 | [tiled-display] 8 | enable=1 9 | rows=1 10 | columns=1 11 | width=1280 12 | height=720 13 | 14 | [source0] 15 | enable=1 16 | #Type - 1=CameraV4L2 2=URI 3=MultiURI 4=RTSP 5=CSI 17 | type=5 18 | camera-width=640 19 | camera-height=480 20 | camera-fps-n=30 21 | camera-fps-d=1 22 | 23 | [sink0] 24 | enable=1 25 | #Type - 1=FakeSink 2=EglSink 3=File 4=RTSPStreaming 5=Overlay 26 | type=5 27 | sync=0 28 | display-id=0 29 | offset-x=0 30 | offset-y=0 31 | width=0 32 | height=0 33 | overlay-id=1 34 | source-id=0 35 | 36 | [sink1] 37 | enable=0 38 | type=3 39 | #1=mp4 2=mkv 40 | container=1 41 | #1=h264 2=h265 3=mpeg4 42 | codec=1 43 | #encoder type 0=Hardware 1=Software 44 | enc-type=0 45 | sync=0 46 | bitrate=2000000 47 | #H264 Profile - 0=Baseline 2=Main 4=High 48 | #H265 Profile - 0=Main 1=Main10 49 | profile=0 50 | output-file=out.mp4 51 | source-id=0 52 | 53 | [sink2] 54 | enable=0 55 | #Type - 1=FakeSink 2=EglSink 3=File 4=RTSPStreaming 5=Overlay 56 | type=4 57 | #1=h264 2=h265 58 | codec=1 59 | #encoder type 0=Hardware 1=Software 60 | enc-type=0 61 | sync=0 62 | bitrate=4000000 63 | #H264 Profile - 0=Baseline 2=Main 4=High 64 | #H265 Profile - 0=Main 1=Main10 65 | profile=0 66 | # set below properties in case of RTSPStreaming 67 | rtsp-port=8554 68 | udp-port=5400 69 | 70 | [osd] 71 | enable=1 72 | border-width=2 73 | text-size=15 74 | text-color=1;1;1;1; 75 | text-bg-color=0.3;0.3;0.3;1 76 | font=Serif 77 | show-clock=0 78 | clock-x-offset=800 79 | clock-y-offset=820 80 | clock-text-size=12 81 | clock-color=1;0;0;0 82 | 83 | [streammux] 84 | ##Boolean property to inform muxer that sources are live 85 | live-source=1 86 | batch-size=1 87 | ##time out in usec, to wait after the first buffer is available 88 | ##to push the batch even if the complete batch is not formed 89 | batched-push-timeout=40000 90 | ## Set muxer output width and height 91 | width=1280 92 | height=720 93 | ## If set to TRUE, system timestamp will be attached as ntp timestamp 94 | ## If set to FALSE, ntp timestamp from rtspsrc, if available, will be attached 95 | # attach-sys-ts-as-ntp=1 96 | 97 | # config-file property is mandatory for any gie section. 98 | # Other properties are optional and if set will override the properties set in 99 | # the infer config file. 100 | [primary-gie] 101 | enable=1 102 | batch-size=1 103 | gpu-id=0 104 | gie-unique-id=1 105 | nvbuf-memory-type=0 106 | config-file=config_infer_primary.txt 107 | 108 | [tests] 109 | file-loop=0 110 | -------------------------------------------------------------------------------- /yolov5-ros-deepstream/yolov5-ros/source1_usb_dec_infer_yolov5.txt: -------------------------------------------------------------------------------- 1 | 2 | [application] 3 | enable-perf-measurement=1 4 | perf-measurement-interval-sec=5 5 | #gie-kitti-output-dir=streamscl 6 | 7 | [tiled-display] 8 | enable=1 9 | rows=1 10 | columns=1 11 | width=1280 12 | height=720 13 | 14 | [source0] 15 | enable=1 16 | #Type - 1=CameraV4L2 2=URI 3=MultiURI 17 | type=1 18 | camera-width=640 19 | camera-height=480 20 | camera-fps-n=30 21 | camera-fps-d=1 22 | camera-v4l2-dev-node=0 23 | 24 | [sink0] 25 | enable=1 26 | #Type - 1=FakeSink 2=EglSink 3=File 4=RTSPStreaming 5=Overlay 27 | type=2 28 | sync=0 29 | display-id=0 30 | offset-x=100 31 | offset-y=120 32 | width=1280 33 | height=720 34 | overlay-id=1 35 | source-id=0 36 | 37 | [osd] 38 | enable=1 39 | border-width=4 40 | text-size=15 41 | text-color=1;1;1;1; 42 | text-bg-color=0.3;0.3;0.3;1 43 | font=Serif 44 | show-clock=0 45 | clock-x-offset=800 46 | clock-y-offset=820 47 | clock-text-size=12 48 | clock-color=1;0;0;0 49 | 50 | [streammux] 51 | ##Boolean property to inform muxer that sources are live 52 | live-source=1 53 | batch-size=1 54 | ##time out in usec, to wait after the first buffer is available 55 | ##to push the batch even if the complete batch is not formed 56 | batched-push-timeout=40000 57 | ## Set muxer output width and height 58 | width=1280 59 | height=720 60 | ## If set to TRUE, system timestamp will be attached as ntp timestamp 61 | ## If set to FALSE, ntp timestamp from rtspsrc, if available, will be attached 62 | # attach-sys-ts-as-ntp=1 63 | 64 | # config-file property is mandatory for any gie section. 65 | # Other properties are optional and if set will override the properties set in 66 | # the infer config file. 67 | [primary-gie] 68 | enable=1 69 | gpu-id=0 70 | gie-unique-id=1 71 | nvbuf-memory-type=0 72 | config-file=config_infer_primary.txt 73 | 74 | [tracker] 75 | enable=1 76 | #tracker-width=640 77 | #tracker-height=384 78 | tracker-width=960 79 | tracker-height=544 80 | gpu-id=0 81 | #ll-lib-file=/opt/nvidia/deepstream/deepstream-5.1/lib/libnvds_mot_klt.so 82 | ll-lib-file=/opt/nvidia/deepstream/deepstream-5.1/lib/libnvds_nvdcf.so 83 | ll-config-file=tracker_config.yml 84 | #enable-past-frame=1 85 | enable-batch-process=1 86 | 87 | 88 | [tests] 89 | file-loop=0 90 | -------------------------------------------------------------------------------- /yolox-deepstream-cpp/yolox-io-cpp/config_infer_primary.txt: -------------------------------------------------------------------------------- 1 | [property] 2 | gpu-id=0 3 | net-scale-factor=1.0 4 | 5 | # 0:RGB 1:BGR 6 | model-color-format=1 7 | 8 | #model-engine-file=yolox_s.engine 9 | #model-engine-file=yolox_nano.engine 10 | model-engine-file=yolox_tiny.engine 11 | 12 | labelfile-path=labels.txt 13 | num-detected-classes=80 14 | 15 | interval=0 16 | gie-unique-id=1 17 | process-mode=1 18 | 19 | # 0=Detector, 1=Classifier, 2=Segmentation, 100=Other 20 | network-type=0 21 | 22 | # 0:Group Rectange 1:DBSCAN 2:NMS 3:DBSCAN+NMS 4:None 23 | cluster-mode=4 24 | maintain-aspect-ratio=1 25 | parse-bbox-func-name=NvDsInferParseCustomYolox 26 | custom-lib-path=nvdsinfer_custom_impl_yolox/libnvdsinfer_custom_impl_yolox.so 27 | 28 | [class-attrs-all] 29 | pre-cluster-threshold=0.45 30 | -------------------------------------------------------------------------------- /yolox-deepstream-cpp/yolox-io-cpp/cpp_io/yolox_tensor: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/yolox-deepstream-cpp/yolox-io-cpp/cpp_io/yolox_tensor -------------------------------------------------------------------------------- /yolox-deepstream-cpp/yolox-io-cpp/cpp_io/yolox_tensor.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | //char true_data[500]; 16 | 17 | int main() 18 | { 19 | while(1) 20 | { 21 | int fd = open("/opt/nvidia/deepstream/deepstream-5.1/sources/yolox-io-cpp/nvdsinfer_custom_impl_yolox/internal_memory.txt",O_RDONLY); 22 | char *addr = (char *)mmap(NULL, 3008, PROT_READ,MAP_SHARED, fd, 0); 23 | if (addr == MAP_FAILED) 24 | { 25 | perror("mmap err"); 26 | return -1; 27 | } 28 | //char* addr = (char*)mmap(NULL, boundingboxes_len, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); 29 | close(fd); 30 | char data[10] = {0}; 31 | std::string str_data; 32 | memcpy(data, addr, 1); // 40*60+10(the largest number of objects is 40) 33 | int data_len = (int(data[0])-48)*60 + 10; 34 | //std::cout << "data_len:" << data_len << std::endl; 35 | /*------------below two line will show Memory overflow question------------*/ 36 | char true_data[data_len] = {0}; 37 | char true_true_data[data_len-10] = {0}; 38 | memcpy(true_data, addr, data_len-1); 39 | std::cout << true_data << std::endl; 40 | munmap(addr,3008); 41 | } 42 | return 0; 43 | } 44 | -------------------------------------------------------------------------------- /yolox-deepstream-cpp/yolox-io-cpp/deepstream_app_config.txt: -------------------------------------------------------------------------------- 1 | [application] 2 | enable-perf-measurement=1 3 | perf-measurement-interval-sec=3 4 | 5 | [tiled-display] 6 | enable=1 7 | rows=1 8 | columns=1 9 | width=1280 10 | height=720 11 | gpu-id=0 12 | nvbuf-memory-type=0 13 | 14 | [source0] 15 | enable=1 16 | type=3 17 | uri=file://../../samples/streams/sample_1080p_h264.mp4 18 | num-sources=1 19 | gpu-id=0 20 | cudadec-memtype=0 21 | 22 | [sink0] 23 | enable=1 24 | type=2 25 | sync=0 26 | source-id=0 27 | gpu-id=0 28 | nvbuf-memory-type=0 29 | 30 | [osd] 31 | enable=1 32 | gpu-id=0 33 | border-width=4 34 | text-size=15 35 | text-color=1;1;1;1; 36 | text-bg-color=0.3;0.3;0.3;1 37 | font=Serif 38 | show-clock=0 39 | clock-x-offset=800 40 | clock-y-offset=820 41 | clock-text-size=12 42 | clock-color=1;0;0;0 43 | nvbuf-memory-type=0 44 | 45 | [streammux] 46 | gpu-id=0 47 | live-source=0 48 | batch-size=1 49 | batched-push-timeout=40000 50 | width=1920 51 | height=1080 52 | enable-padding=0 53 | nvbuf-memory-type=0 54 | 55 | [primary-gie] 56 | enable=1 57 | gpu-id=0 58 | gie-unique-id=1 59 | nvbuf-memory-type=0 60 | config-file=config_infer_primary.txt 61 | 62 | [tracker] 63 | enable=1 64 | #tracker-width=640 65 | #tracker-height=384 66 | tracker-width=960 67 | tracker-height=544 68 | gpu-id=0 69 | #ll-lib-file=/opt/nvidia/deepstream/deepstream-5.1/lib/libnvds_mot_klt.so 70 | ll-lib-file=/opt/nvidia/deepstream/deepstream-5.1/lib/libnvds_nvdcf.so 71 | ll-config-file=tracker_config.yml 72 | #enable-past-frame=1 73 | enable-batch-process=1 74 | 75 | [tests] 76 | file-loop=0 77 | -------------------------------------------------------------------------------- /yolox-deepstream-cpp/yolox-io-cpp/labels.txt: -------------------------------------------------------------------------------- 1 | person 2 | bicycle 3 | car 4 | motorbike 5 | aeroplane 6 | bus 7 | train 8 | truck 9 | boat 10 | traffic light 11 | fire hydrant 12 | stop sign 13 | parking meter 14 | bench 15 | bird 16 | cat 17 | dog 18 | horse 19 | sheep 20 | cow 21 | elephant 22 | bear 23 | zebra 24 | giraffe 25 | backpack 26 | umbrella 27 | handbag 28 | tie 29 | suitcase 30 | frisbee 31 | skis 32 | snowboard 33 | sports ball 34 | kite 35 | baseball bat 36 | baseball glove 37 | skateboard 38 | surfboard 39 | tennis racket 40 | bottle 41 | wine glass 42 | cup 43 | fork 44 | knife 45 | spoon 46 | bowl 47 | banana 48 | apple 49 | sandwich 50 | orange 51 | broccoli 52 | carrot 53 | hot dog 54 | pizza 55 | donut 56 | cake 57 | chair 58 | sofa 59 | pottedplant 60 | bed 61 | diningtable 62 | toilet 63 | tvmonitor 64 | laptop 65 | mouse 66 | remote 67 | keyboard 68 | cell phone 69 | microwave 70 | oven 71 | toaster 72 | sink 73 | refrigerator 74 | book 75 | clock 76 | vase 77 | scissors 78 | teddy bear 79 | hair drier 80 | toothbrush -------------------------------------------------------------------------------- /yolox-deepstream-cpp/yolox-io-cpp/nvdsinfer_custom_impl_yolox/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | #CUDA_VER?= 18 | CUDA_VER=10.2 19 | ifeq ($(CUDA_VER),) 20 | $(error "CUDA_VER is not set") 21 | endif 22 | CC:= g++ 23 | NVCC:=/usr/local/cuda-$(CUDA_VER)/bin/nvcc 24 | 25 | CFLAGS:= -Wall -std=c++11 -shared -fPIC -Wno-error=deprecated-declarations 26 | CFLAGS+= -I../../includes -I/usr/local/cuda-$(CUDA_VER)/include -I/usr/include/opencv4/ -I/usr/lib/gcc/x86_64-linux-gnu/7/include/ 27 | CFLAGS+= -I/opt/nvidia/deepstream/deepstream-5.1/sources/includes 28 | CXXFLAGS:= -fopenmp 29 | 30 | LIBS:= -lnvinfer_plugin -lnvinfer -lnvparsers -L/usr/local/cuda-$(CUDA_VER)/lib64 -lcudart -lcublas -lstdc++fs -L/usr/lib/aarch64-linux-gpu -lopencv_core 31 | LFLAGS:= -shared -Wl,--start-group $(LIBS) -Wl,--end-group -fopenmp 32 | 33 | INCS:= $(wildcard *.h) 34 | SRCFILES:= nvdsparsebbox_yolox.cpp 35 | 36 | TARGET_LIB:= libnvdsinfer_custom_impl_yolox.so 37 | 38 | TARGET_OBJS:= $(SRCFILES:.cpp=.o) 39 | TARGET_OBJS:= $(TARGET_OBJS:.cu=.o) 40 | 41 | all: $(TARGET_LIB) 42 | 43 | %.o: %.cpp $(INCS) Makefile 44 | $(CC) -c -o $@ $(CFLAGS) $(CXXFLAGS) $< 45 | 46 | %.o: %.cu $(INCS) Makefile 47 | $(NVCC) -c -o $@ --compiler-options '-fPIC' $< 48 | 49 | $(TARGET_LIB) : $(TARGET_OBJS) 50 | $(CC) -o $@ $(TARGET_OBJS) $(LFLAGS) 51 | 52 | clean: 53 | rm -rf $(TARGET_LIB) 54 | rm -rf $(TARGET_OBJS) 55 | -------------------------------------------------------------------------------- /yolox-deepstream-cpp/yolox-io-cpp/nvdsinfer_custom_impl_yolox/internal_memory.txt: -------------------------------------------------------------------------------- 1 | 10 2 180 91 182 91 0.909 2 326 101 89 67 0.795 0 13 101 28 59 0.787 0 68 95 17 49 0.746 2 143 99 31 21 0.695 0 101 96 19 40 0.660 2 171 101 15 11 0.474 0 97 97 15 38 0.420 0 86 102 8 24 0.334 2 305 87 45 26 0.331 2 168 100 9 12 0.323 24 45 101 16 24 0.311 2 245 102 52 17 0.323 2 188 104 25 11 0.329 2 137 103 15 12 0.315 2 178 104 20 12 0.304 2 116 102 19 17 0.339 2 121 102 15 15 0.337 2 119 102 16 10 0.350 1 73 137 33 44 0.321 2 177 105 36 17 0.313 1 89 137 18 37 0.300 2 204 162 19 19 0.327 1 90 200 78 94 0.307 -------------------------------------------------------------------------------------------------------------- 2 | -------------------------------------------------------------------------------- /yolox-deepstream-cpp/yolox-io-cpp/nvdsinfer_custom_impl_yolox/libnvdsinfer_custom_impl_yolox.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/yolox-deepstream-cpp/yolox-io-cpp/nvdsinfer_custom_impl_yolox/libnvdsinfer_custom_impl_yolox.so -------------------------------------------------------------------------------- /yolox-deepstream-cpp/yolox-io-cpp/nvdsinfer_custom_impl_yolox/nvdsparsebbox_yolox.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/yolox-deepstream-cpp/yolox-io-cpp/nvdsinfer_custom_impl_yolox/nvdsparsebbox_yolox.o -------------------------------------------------------------------------------- /yolox-deepstream-cpp/yolox-io-cpp/source1_csi_dec_infer_yolox.txt: -------------------------------------------------------------------------------- 1 | 2 | [application] 3 | enable-perf-measurement=1 4 | perf-measurement-interval-sec=5 5 | #gie-kitti-output-dir=streamscl 6 | 7 | [tiled-display] 8 | enable=1 9 | rows=1 10 | columns=1 11 | width=1280 12 | height=720 13 | 14 | [source0] 15 | enable=1 16 | #Type - 1=CameraV4L2 2=URI 3=MultiURI 4=RTSP 5=CSI 17 | type=5 18 | camera-width=640 19 | camera-height=480 20 | camera-fps-n=30 21 | camera-fps-d=1 22 | 23 | [sink0] 24 | enable=1 25 | #Type - 1=FakeSink 2=EglSink 3=File 4=RTSPStreaming 5=Overlay 26 | type=5 27 | sync=0 28 | display-id=0 29 | offset-x=0 30 | offset-y=0 31 | width=0 32 | height=0 33 | overlay-id=1 34 | source-id=0 35 | 36 | [sink1] 37 | enable=0 38 | type=3 39 | #1=mp4 2=mkv 40 | container=1 41 | #1=h264 2=h265 3=mpeg4 42 | codec=1 43 | #encoder type 0=Hardware 1=Software 44 | enc-type=0 45 | sync=0 46 | bitrate=2000000 47 | #H264 Profile - 0=Baseline 2=Main 4=High 48 | #H265 Profile - 0=Main 1=Main10 49 | profile=0 50 | output-file=out.mp4 51 | source-id=0 52 | 53 | [sink2] 54 | enable=0 55 | #Type - 1=FakeSink 2=EglSink 3=File 4=RTSPStreaming 5=Overlay 56 | type=4 57 | #1=h264 2=h265 58 | codec=1 59 | #encoder type 0=Hardware 1=Software 60 | enc-type=0 61 | sync=0 62 | bitrate=4000000 63 | #H264 Profile - 0=Baseline 2=Main 4=High 64 | #H265 Profile - 0=Main 1=Main10 65 | profile=0 66 | # set below properties in case of RTSPStreaming 67 | rtsp-port=8554 68 | udp-port=5400 69 | 70 | [osd] 71 | enable=1 72 | border-width=2 73 | text-size=15 74 | text-color=1;1;1;1; 75 | text-bg-color=0.3;0.3;0.3;1 76 | font=Serif 77 | show-clock=0 78 | clock-x-offset=800 79 | clock-y-offset=820 80 | clock-text-size=12 81 | clock-color=1;0;0;0 82 | 83 | [streammux] 84 | ##Boolean property to inform muxer that sources are live 85 | live-source=1 86 | batch-size=1 87 | ##time out in usec, to wait after the first buffer is available 88 | ##to push the batch even if the complete batch is not formed 89 | batched-push-timeout=40000 90 | ## Set muxer output width and height 91 | width=1280 92 | height=720 93 | ## If set to TRUE, system timestamp will be attached as ntp timestamp 94 | ## If set to FALSE, ntp timestamp from rtspsrc, if available, will be attached 95 | # attach-sys-ts-as-ntp=1 96 | 97 | # config-file property is mandatory for any gie section. 98 | # Other properties are optional and if set will override the properties set in 99 | # the infer config file. 100 | [primary-gie] 101 | enable=1 102 | batch-size=1 103 | gpu-id=0 104 | gie-unique-id=1 105 | nvbuf-memory-type=0 106 | config-file=config_infer_primary.txt 107 | 108 | [tests] 109 | file-loop=0 110 | -------------------------------------------------------------------------------- /yolox-deepstream-cpp/yolox-io-cpp/source1_usb_dec_infer_yolox.txt: -------------------------------------------------------------------------------- 1 | 2 | [application] 3 | enable-perf-measurement=1 4 | perf-measurement-interval-sec=5 5 | #gie-kitti-output-dir=streamscl 6 | 7 | [tiled-display] 8 | enable=1 9 | rows=1 10 | columns=1 11 | width=1280 12 | height=720 13 | 14 | [source0] 15 | enable=1 16 | #Type - 1=CameraV4L2 2=URI 3=MultiURI 17 | type=1 18 | camera-width=640 19 | camera-height=480 20 | camera-fps-n=30 21 | camera-fps-d=1 22 | camera-v4l2-dev-node=0 23 | 24 | [sink0] 25 | enable=1 26 | #Type - 1=FakeSink 2=EglSink 3=File 4=RTSPStreaming 5=Overlay 27 | type=2 28 | sync=0 29 | display-id=0 30 | offset-x=30 31 | offset-y=30 32 | width=1280 33 | height=720 34 | overlay-id=1 35 | source-id=0 36 | 37 | 38 | [osd] 39 | enable=1 40 | border-width=4 41 | text-size=15 42 | text-color=1;1;1;1; 43 | text-bg-color=0.3;0.3;0.3;1 44 | font=Serif 45 | show-clock=0 46 | clock-x-offset=800 47 | clock-y-offset=820 48 | clock-text-size=12 49 | clock-color=1;0;0;0 50 | 51 | [streammux] 52 | ##Boolean property to inform muxer that sources are live 53 | live-source=1 54 | batch-size=1 55 | ##time out in usec, to wait after the first buffer is available 56 | ##to push the batch even if the complete batch is not formed 57 | batched-push-timeout=40000 58 | ## Set muxer output width and height 59 | width=1280 60 | height=720 61 | ## If set to TRUE, system timestamp will be attached as ntp timestamp 62 | ## If set to FALSE, ntp timestamp from rtspsrc, if available, will be attached 63 | # attach-sys-ts-as-ntp=1 64 | 65 | # config-file property is mandatory for any gie section. 66 | # Other properties are optional and if set will override the properties set in 67 | # the infer config file. 68 | [primary-gie] 69 | enable=1 70 | gpu-id=0 71 | gie-unique-id=1 72 | nvbuf-memory-type=0 73 | config-file=config_infer_primary.txt 74 | 75 | [tracker] 76 | enable=1 77 | #tracker-width=640 78 | #tracker-height=384 79 | tracker-width=960 80 | tracker-height=544 81 | gpu-id=0 82 | #ll-lib-file=/opt/nvidia/deepstream/deepstream-5.1/lib/libnvds_mot_klt.so 83 | ll-lib-file=/opt/nvidia/deepstream/deepstream-5.1/lib/libnvds_nvdcf.so 84 | ll-config-file=tracker_config.yml 85 | #enable-past-frame=1 86 | enable-batch-process=1 87 | 88 | [tests] 89 | file-loop=0 90 | -------------------------------------------------------------------------------- /yolox-deepstream-python/yolox-io-python/client.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | import numpy 3 | import time 4 | import re 5 | import mmap 6 | global boundingboxes_txt 7 | global boundingboxes_list 8 | if __name__ == "__main__": 9 | while (1): 10 | with open('/opt/nvidia/deepstream/deepstream-5.1/sources/yolox-io-python/nvdsinfer_custom_impl_yolox/internal_memory.txt', 'r+b') as f: 11 | # mmap基本上接收两个参数,(文件描述符,读取长度),size 为0表示读取整个文件 12 | mm = mmap.mmap(f.fileno(), 0) 13 | mm.seek(0) # 定位到文件头 14 | # byte_numline = mm[0] # mm[]取出来的是byte类型, 要转为int型 15 | byte_numline = int(mm.read(1)) 16 | str_numline = str(byte_numline) # 将bytes转化为str类型 17 | boundingboxes_txt = str(mm[10:int(str_numline)*60 + 10]) 18 | #print("boundingboxes = \n",mm[6:int(str_numline_out)+6]) 19 | mm.close() 20 | boundingboxes_list = re.findall(r"\d+\.?\d*", boundingboxes_txt) 21 | #print('boundingboxes_list = ',boundingboxes_list) 22 | array_boundingbox = numpy.array(boundingboxes_list) 23 | #print("array_boundingbox = ",boundingboxes_list) 24 | box_number = len(boundingboxes_list) // 6 25 | print('box_number = ', box_number) 26 | re_array_boundingbox = numpy.resize(array_boundingbox, (box_number, 6)) 27 | #print('re_array_boundingbox:\n', re_array_boundingbox) 28 | print(re_array_boundingbox) 29 | print("#---------------------------------------------------------------#") 30 | 31 | 32 | -------------------------------------------------------------------------------- /yolox-deepstream-python/yolox-io-python/config_infer_primary.txt: -------------------------------------------------------------------------------- 1 | [property] 2 | gpu-id=0 3 | net-scale-factor=1.0 4 | 5 | # 0:RGB 1:BGR 6 | model-color-format=1 7 | 8 | #model-engine-file=yolox_s.engine 9 | #model-engine-file=yolox_nano.engine 10 | model-engine-file=yolox_tiny.engine 11 | 12 | labelfile-path=labels.txt 13 | num-detected-classes=80 14 | 15 | interval=0 16 | gie-unique-id=1 17 | process-mode=1 18 | 19 | # 0=Detector, 1=Classifier, 2=Segmentation, 100=Other 20 | network-type=0 21 | 22 | # 0:Group Rectange 1:DBSCAN 2:NMS 3:DBSCAN+NMS 4:None 23 | cluster-mode=4 24 | maintain-aspect-ratio=1 25 | parse-bbox-func-name=NvDsInferParseCustomYolox 26 | custom-lib-path=nvdsinfer_custom_impl_yolox/libnvdsinfer_custom_impl_yolox.so 27 | 28 | [class-attrs-all] 29 | pre-cluster-threshold=0.45 30 | -------------------------------------------------------------------------------- /yolox-deepstream-python/yolox-io-python/deepstream_app_config.txt: -------------------------------------------------------------------------------- 1 | [application] 2 | enable-perf-measurement=1 3 | perf-measurement-interval-sec=3 4 | 5 | [tiled-display] 6 | enable=1 7 | rows=1 8 | columns=1 9 | width=1280 10 | height=720 11 | gpu-id=0 12 | nvbuf-memory-type=0 13 | 14 | [source0] 15 | enable=1 16 | type=3 17 | uri=file://../../samples/streams/sample_1080p_h264.mp4 18 | num-sources=1 19 | gpu-id=0 20 | cudadec-memtype=0 21 | 22 | [sink0] 23 | enable=1 24 | type=2 25 | sync=0 26 | source-id=0 27 | gpu-id=0 28 | nvbuf-memory-type=0 29 | 30 | [osd] 31 | enable=1 32 | gpu-id=0 33 | border-width=4 34 | text-size=15 35 | text-color=1;1;1;1; 36 | text-bg-color=0.3;0.3;0.3;1 37 | font=Serif 38 | show-clock=0 39 | clock-x-offset=800 40 | clock-y-offset=820 41 | clock-text-size=12 42 | clock-color=1;0;0;0 43 | nvbuf-memory-type=0 44 | 45 | [streammux] 46 | gpu-id=0 47 | live-source=0 48 | batch-size=1 49 | batched-push-timeout=40000 50 | width=1920 51 | height=1080 52 | enable-padding=0 53 | nvbuf-memory-type=0 54 | 55 | [primary-gie] 56 | enable=1 57 | gpu-id=0 58 | gie-unique-id=1 59 | nvbuf-memory-type=0 60 | config-file=config_infer_primary.txt 61 | 62 | [tracker] 63 | enable=1 64 | #tracker-width=640 65 | #tracker-height=384 66 | tracker-width=960 67 | tracker-height=544 68 | gpu-id=0 69 | #ll-lib-file=/opt/nvidia/deepstream/deepstream-5.1/lib/libnvds_mot_klt.so 70 | ll-lib-file=/opt/nvidia/deepstream/deepstream-5.1/lib/libnvds_nvdcf.so 71 | ll-config-file=tracker_config.yml 72 | #enable-past-frame=1 73 | enable-batch-process=1 74 | 75 | [tests] 76 | file-loop=0 77 | -------------------------------------------------------------------------------- /yolox-deepstream-python/yolox-io-python/labels.txt: -------------------------------------------------------------------------------- 1 | person 2 | bicycle 3 | car 4 | motorbike 5 | aeroplane 6 | bus 7 | train 8 | truck 9 | boat 10 | traffic light 11 | fire hydrant 12 | stop sign 13 | parking meter 14 | bench 15 | bird 16 | cat 17 | dog 18 | horse 19 | sheep 20 | cow 21 | elephant 22 | bear 23 | zebra 24 | giraffe 25 | backpack 26 | umbrella 27 | handbag 28 | tie 29 | suitcase 30 | frisbee 31 | skis 32 | snowboard 33 | sports ball 34 | kite 35 | baseball bat 36 | baseball glove 37 | skateboard 38 | surfboard 39 | tennis racket 40 | bottle 41 | wine glass 42 | cup 43 | fork 44 | knife 45 | spoon 46 | bowl 47 | banana 48 | apple 49 | sandwich 50 | orange 51 | broccoli 52 | carrot 53 | hot dog 54 | pizza 55 | donut 56 | cake 57 | chair 58 | sofa 59 | pottedplant 60 | bed 61 | diningtable 62 | toilet 63 | tvmonitor 64 | laptop 65 | mouse 66 | remote 67 | keyboard 68 | cell phone 69 | microwave 70 | oven 71 | toaster 72 | sink 73 | refrigerator 74 | book 75 | clock 76 | vase 77 | scissors 78 | teddy bear 79 | hair drier 80 | toothbrush -------------------------------------------------------------------------------- /yolox-deepstream-python/yolox-io-python/nvdsinfer_custom_impl_yolox/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | #CUDA_VER?= 18 | CUDA_VER=10.2 19 | ifeq ($(CUDA_VER),) 20 | $(error "CUDA_VER is not set") 21 | endif 22 | CC:= g++ 23 | NVCC:=/usr/local/cuda-$(CUDA_VER)/bin/nvcc 24 | 25 | CFLAGS:= -Wall -std=c++11 -shared -fPIC -Wno-error=deprecated-declarations 26 | CFLAGS+= -I../../includes -I/usr/local/cuda-$(CUDA_VER)/include -I/usr/include/opencv4/ -I/usr/lib/gcc/x86_64-linux-gnu/7/include/ 27 | CFLAGS+= -I/opt/nvidia/deepstream/deepstream-5.1/sources/includes 28 | CXXFLAGS:= -fopenmp 29 | 30 | LIBS:= -lnvinfer_plugin -lnvinfer -lnvparsers -L/usr/local/cuda-$(CUDA_VER)/lib64 -lcudart -lcublas -lstdc++fs -L/usr/lib/aarch64-linux-gpu -lopencv_core 31 | LFLAGS:= -shared -Wl,--start-group $(LIBS) -Wl,--end-group -fopenmp 32 | 33 | INCS:= $(wildcard *.h) 34 | SRCFILES:= nvdsparsebbox_yolox.cpp 35 | 36 | TARGET_LIB:= libnvdsinfer_custom_impl_yolox.so 37 | 38 | TARGET_OBJS:= $(SRCFILES:.cpp=.o) 39 | TARGET_OBJS:= $(TARGET_OBJS:.cu=.o) 40 | 41 | all: $(TARGET_LIB) 42 | 43 | %.o: %.cpp $(INCS) Makefile 44 | $(CC) -c -o $@ $(CFLAGS) $(CXXFLAGS) $< 45 | 46 | %.o: %.cu $(INCS) Makefile 47 | $(NVCC) -c -o $@ --compiler-options '-fPIC' $< 48 | 49 | $(TARGET_LIB) : $(TARGET_OBJS) 50 | $(CC) -o $@ $(TARGET_OBJS) $(LFLAGS) 51 | 52 | clean: 53 | rm -rf $(TARGET_LIB) 54 | rm -rf $(TARGET_OBJS) 55 | -------------------------------------------------------------------------------- /yolox-deepstream-python/yolox-io-python/nvdsinfer_custom_impl_yolox/internal_memory.txt: -------------------------------------------------------------------------------- 1 | 5 2 116 134 112 48 0.859 2 1 133 45 26 0.719 2 38 133 20 11 0.493 2 85 125 67 29 0.331 2 183 140 59 34 0.323 2 34 135 19 9 0.328 2 35 135 25 15 0.482 2 67 136 19 12 0.450 2 0 135 14 11 0.441 2 15 135 31 15 0.424 2 134 101 18 16 0.402 2 291 105 42 17 0.392 1 94 131 15 39 0.364 2 115 102 15 10 0.318 2 298 104 33 11 0.344 2 122 103 19 13 0.319 2 227 101 14 8 0.381 0 89 100 10 25 0.373 2 178 104 31 13 0.365 2 119 102 16 10 0.334 1 89 138 18 37 0.330 1 74 137 32 44 0.323 2 177 105 35 17 0.316 1 90 200 78 94 0.307 -------------------------------------------------------------------------------------------------------------- 2 | -------------------------------------------------------------------------------- /yolox-deepstream-python/yolox-io-python/nvdsinfer_custom_impl_yolox/libnvdsinfer_custom_impl_yolox.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/yolox-deepstream-python/yolox-io-python/nvdsinfer_custom_impl_yolox/libnvdsinfer_custom_impl_yolox.so -------------------------------------------------------------------------------- /yolox-deepstream-python/yolox-io-python/nvdsinfer_custom_impl_yolox/nvdsparsebbox_yolox.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/yolox-deepstream-python/yolox-io-python/nvdsinfer_custom_impl_yolox/nvdsparsebbox_yolox.o -------------------------------------------------------------------------------- /yolox-deepstream-python/yolox-io-python/source1_usb_dec_infer_yolox.txt: -------------------------------------------------------------------------------- 1 | 2 | [application] 3 | enable-perf-measurement=1 4 | perf-measurement-interval-sec=5 5 | #gie-kitti-output-dir=streamscl 6 | 7 | [tiled-display] 8 | enable=1 9 | rows=1 10 | columns=1 11 | width=1280 12 | height=720 13 | 14 | [source0] 15 | enable=1 16 | #Type - 1=CameraV4L2 2=URI 3=MultiURI 17 | type=1 18 | camera-width=640 19 | camera-height=480 20 | camera-fps-n=30 21 | camera-fps-d=1 22 | camera-v4l2-dev-node=0 23 | 24 | [sink0] 25 | enable=1 26 | #Type - 1=FakeSink 2=EglSink 3=File 4=RTSPStreaming 5=Overlay 27 | type=2 28 | sync=0 29 | display-id=0 30 | offset-x=30 31 | offset-y=30 32 | width=1280 33 | height=720 34 | overlay-id=1 35 | source-id=0 36 | 37 | 38 | [osd] 39 | enable=1 40 | border-width=4 41 | text-size=15 42 | text-color=1;1;1;1; 43 | text-bg-color=0.3;0.3;0.3;1 44 | font=Serif 45 | show-clock=0 46 | clock-x-offset=800 47 | clock-y-offset=820 48 | clock-text-size=12 49 | clock-color=1;0;0;0 50 | 51 | [streammux] 52 | ##Boolean property to inform muxer that sources are live 53 | live-source=1 54 | batch-size=1 55 | ##time out in usec, to wait after the first buffer is available 56 | ##to push the batch even if the complete batch is not formed 57 | batched-push-timeout=40000 58 | ## Set muxer output width and height 59 | width=1280 60 | height=720 61 | ## If set to TRUE, system timestamp will be attached as ntp timestamp 62 | ## If set to FALSE, ntp timestamp from rtspsrc, if available, will be attached 63 | # attach-sys-ts-as-ntp=1 64 | 65 | # config-file property is mandatory for any gie section. 66 | # Other properties are optional and if set will override the properties set in 67 | # the infer config file. 68 | [primary-gie] 69 | enable=1 70 | gpu-id=0 71 | gie-unique-id=1 72 | nvbuf-memory-type=0 73 | config-file=config_infer_primary.txt 74 | 75 | [tracker] 76 | enable=1 77 | #tracker-width=640 78 | #tracker-height=384 79 | tracker-width=960 80 | tracker-height=544 81 | gpu-id=0 82 | #ll-lib-file=/opt/nvidia/deepstream/deepstream-5.1/lib/libnvds_mot_klt.so 83 | ll-lib-file=/opt/nvidia/deepstream/deepstream-5.1/lib/libnvds_nvdcf.so 84 | ll-config-file=tracker_config.yml 85 | #enable-past-frame=1 86 | enable-batch-process=1 87 | 88 | [tests] 89 | file-loop=0 90 | -------------------------------------------------------------------------------- /yolox-ros-deepstream/README_EN.md: -------------------------------------------------------------------------------- 1 | yolox-ros-deepstream正在进行中................ 2 | -------------------------------------------------------------------------------- /yolox-ros-deepstream/boxes_ws/.catkin_workspace: -------------------------------------------------------------------------------- 1 | # This file currently only serves to mark the location of a catkin workspace for tool integration 2 | -------------------------------------------------------------------------------- /yolox-ros-deepstream/boxes_ws/src/darknet_ros_msgs/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.12) 2 | 3 | project(darknet_ros_msgs) 4 | 5 | set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}") 6 | 7 | find_package(catkin REQUIRED 8 | COMPONENTS 9 | geometry_msgs 10 | sensor_msgs 11 | std_msgs 12 | message_generation 13 | ) 14 | 15 | add_message_files( 16 | FILES 17 | BoundingBox.msg 18 | BoundingBoxes.msg 19 | BoundingBox_tensor.msg 20 | BoundingBoxes_tensor.msg 21 | ) 22 | 23 | #add_action_files( 24 | # FILES 25 | # CheckForObjects.action 26 | #) 27 | 28 | generate_messages( 29 | DEPENDENCIES 30 | geometry_msgs 31 | sensor_msgs 32 | std_msgs 33 | ) 34 | 35 | catkin_package( 36 | CATKIN_DEPENDS 37 | geometry_msgs 38 | sensor_msgs 39 | message_runtime 40 | std_msgs 41 | ) 42 | -------------------------------------------------------------------------------- /yolox-ros-deepstream/boxes_ws/src/darknet_ros_msgs/msg/BoundingBox.msg: -------------------------------------------------------------------------------- 1 | float64 probability 2 | int64 x_center 3 | int64 y_center 4 | int16 id 5 | string Class 6 | -------------------------------------------------------------------------------- /yolox-ros-deepstream/boxes_ws/src/darknet_ros_msgs/msg/BoundingBox_tensor.msg: -------------------------------------------------------------------------------- 1 | float64 probability 2 | int64 top 3 | int64 left 4 | int64 width 5 | int64 height 6 | int16 id 7 | string Class 8 | -------------------------------------------------------------------------------- /yolox-ros-deepstream/boxes_ws/src/darknet_ros_msgs/msg/BoundingBoxes.msg: -------------------------------------------------------------------------------- 1 | BoundingBox[] bounding_boxes 2 | -------------------------------------------------------------------------------- /yolox-ros-deepstream/boxes_ws/src/darknet_ros_msgs/msg/BoundingBoxes_tensor.msg: -------------------------------------------------------------------------------- 1 | BoundingBox_tensor[] boundingboxes_tensor 2 | -------------------------------------------------------------------------------- /yolox-ros-deepstream/boxes_ws/src/darknet_ros_msgs/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | darknet_ros_msgs 4 | 1.1.4 5 | Darknet is an open source neural network framework that runs on CPU and GPU. You only look once (YOLO) is a state-of-the-art, real-time object detection system. 6 | Marko Bjelonic 7 | BSD 8 | https://github.com/leggedrobotics/darknet_ros 9 | Marko Bjelonic 10 | 11 | catkin 12 | 13 | 14 | geometry_msgs 15 | sensor_msgs 16 | message_generation 17 | std_msgs 18 | 19 | geometry_msgs 20 | sensor_msgs 21 | message_runtime 22 | std_msgs 23 | 24 | -------------------------------------------------------------------------------- /yolox-ros-deepstream/yolox-ros/config_infer_primary.txt: -------------------------------------------------------------------------------- 1 | [property] 2 | gpu-id=0 3 | net-scale-factor=1.0 4 | 5 | # 0:RGB 1:BGR 6 | model-color-format=1 7 | 8 | #model-engine-file=yolox_s.engine 9 | #model-engine-file=yolox_nano.engine 10 | model-engine-file=yolox_tiny.engine 11 | 12 | labelfile-path=labels.txt 13 | num-detected-classes=80 14 | 15 | interval=0 16 | gie-unique-id=1 17 | process-mode=1 18 | 19 | # 0=Detector, 1=Classifier, 2=Segmentation, 100=Other 20 | network-type=0 21 | 22 | # 0:Group Rectange 1:DBSCAN 2:NMS 3:DBSCAN+NMS 4:None 23 | cluster-mode=4 24 | maintain-aspect-ratio=1 25 | parse-bbox-func-name=NvDsInferParseCustomYolox 26 | custom-lib-path=nvdsinfer_custom_impl_yolox/libnvdsinfer_custom_impl_yolox.so 27 | 28 | [class-attrs-all] 29 | pre-cluster-threshold=0.45 30 | -------------------------------------------------------------------------------- /yolox-ros-deepstream/yolox-ros/darknet_ros_msgs: -------------------------------------------------------------------------------- 1 | /home/amov/boxes_ws/src/darknet_ros_msgs -------------------------------------------------------------------------------- /yolox-ros-deepstream/yolox-ros/deepstream_app_config.txt: -------------------------------------------------------------------------------- 1 | [application] 2 | enable-perf-measurement=1 3 | perf-measurement-interval-sec=3 4 | 5 | [tiled-display] 6 | enable=1 7 | rows=1 8 | columns=1 9 | width=1280 10 | height=720 11 | gpu-id=0 12 | nvbuf-memory-type=0 13 | 14 | [source0] 15 | enable=1 16 | type=3 17 | uri=file://../../samples/streams/sample_1080p_h264.mp4 18 | num-sources=1 19 | gpu-id=0 20 | cudadec-memtype=0 21 | 22 | [sink0] 23 | enable=1 24 | type=2 25 | sync=0 26 | source-id=0 27 | gpu-id=0 28 | nvbuf-memory-type=0 29 | 30 | [osd] 31 | enable=1 32 | gpu-id=0 33 | border-width=4 34 | text-size=15 35 | text-color=1;1;1;1; 36 | text-bg-color=0.3;0.3;0.3;1 37 | font=Serif 38 | show-clock=0 39 | clock-x-offset=800 40 | clock-y-offset=820 41 | clock-text-size=12 42 | clock-color=1;0;0;0 43 | nvbuf-memory-type=0 44 | 45 | [streammux] 46 | gpu-id=0 47 | live-source=0 48 | batch-size=1 49 | batched-push-timeout=40000 50 | width=1920 51 | height=1080 52 | enable-padding=0 53 | nvbuf-memory-type=0 54 | 55 | [primary-gie] 56 | enable=1 57 | gpu-id=0 58 | gie-unique-id=1 59 | nvbuf-memory-type=0 60 | config-file=config_infer_primary.txt 61 | 62 | [tracker] 63 | enable=1 64 | #tracker-width=640 65 | #tracker-height=384 66 | tracker-width=960 67 | tracker-height=544 68 | gpu-id=0 69 | #ll-lib-file=/opt/nvidia/deepstream/deepstream-5.1/lib/libnvds_mot_klt.so 70 | ll-lib-file=/opt/nvidia/deepstream/deepstream-5.1/lib/libnvds_nvdcf.so 71 | ll-config-file=tracker_config.yml 72 | #enable-past-frame=1 73 | enable-batch-process=1 74 | 75 | [tests] 76 | file-loop=0 77 | -------------------------------------------------------------------------------- /yolox-ros-deepstream/yolox-ros/labels.txt: -------------------------------------------------------------------------------- 1 | person 2 | bicycle 3 | car 4 | motorbike 5 | aeroplane 6 | bus 7 | train 8 | truck 9 | boat 10 | traffic light 11 | fire hydrant 12 | stop sign 13 | parking meter 14 | bench 15 | bird 16 | cat 17 | dog 18 | horse 19 | sheep 20 | cow 21 | elephant 22 | bear 23 | zebra 24 | giraffe 25 | backpack 26 | umbrella 27 | handbag 28 | tie 29 | suitcase 30 | frisbee 31 | skis 32 | snowboard 33 | sports ball 34 | kite 35 | baseball bat 36 | baseball glove 37 | skateboard 38 | surfboard 39 | tennis racket 40 | bottle 41 | wine glass 42 | cup 43 | fork 44 | knife 45 | spoon 46 | bowl 47 | banana 48 | apple 49 | sandwich 50 | orange 51 | broccoli 52 | carrot 53 | hot dog 54 | pizza 55 | donut 56 | cake 57 | chair 58 | sofa 59 | pottedplant 60 | bed 61 | diningtable 62 | toilet 63 | tvmonitor 64 | laptop 65 | mouse 66 | remote 67 | keyboard 68 | cell phone 69 | microwave 70 | oven 71 | toaster 72 | sink 73 | refrigerator 74 | book 75 | clock 76 | vase 77 | scissors 78 | teddy bear 79 | hair drier 80 | toothbrush -------------------------------------------------------------------------------- /yolox-ros-deepstream/yolox-ros/nvdsinfer_custom_impl_yolox/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | #CUDA_VER?= 18 | CUDA_VER=10.2 19 | ifeq ($(CUDA_VER),) 20 | $(error "CUDA_VER is not set") 21 | endif 22 | CC:= g++ 23 | NVCC:=/usr/local/cuda-$(CUDA_VER)/bin/nvcc 24 | 25 | CFLAGS:= -Wall -std=c++11 -shared -fPIC -Wno-error=deprecated-declarations 26 | CFLAGS+= -I../../includes -I/usr/local/cuda-$(CUDA_VER)/include -I/usr/include/opencv4/ -I/usr/lib/gcc/x86_64-linux-gnu/7/include/ 27 | CFLAGS+= -I/opt/nvidia/deepstream/deepstream-5.1/sources/includes 28 | CXXFLAGS:= -fopenmp 29 | 30 | LIBS:= -lnvinfer_plugin -lnvinfer -lnvparsers -L/usr/local/cuda-$(CUDA_VER)/lib64 -lcudart -lcublas -lstdc++fs -L/usr/lib/aarch64-linux-gpu -lopencv_core 31 | LFLAGS:= -shared -Wl,--start-group $(LIBS) -Wl,--end-group -fopenmp 32 | 33 | INCS:= $(wildcard *.h) 34 | SRCFILES:= nvdsparsebbox_yolox.cpp 35 | 36 | TARGET_LIB:= libnvdsinfer_custom_impl_yolox.so 37 | 38 | TARGET_OBJS:= $(SRCFILES:.cpp=.o) 39 | TARGET_OBJS:= $(TARGET_OBJS:.cu=.o) 40 | 41 | all: $(TARGET_LIB) 42 | 43 | %.o: %.cpp $(INCS) Makefile 44 | $(CC) -c -o $@ $(CFLAGS) $(CXXFLAGS) $< 45 | 46 | %.o: %.cu $(INCS) Makefile 47 | $(NVCC) -c -o $@ --compiler-options '-fPIC' $< 48 | 49 | $(TARGET_LIB) : $(TARGET_OBJS) 50 | $(CC) -o $@ $(TARGET_OBJS) $(LFLAGS) 51 | 52 | clean: 53 | rm -rf $(TARGET_LIB) 54 | rm -rf $(TARGET_OBJS) 55 | -------------------------------------------------------------------------------- /yolox-ros-deepstream/yolox-ros/nvdsinfer_custom_impl_yolox/internal_memory.txt: -------------------------------------------------------------------------------- 1 | 3 2 220 138 104 30 0.851 2 22 134 74 39 0.835 2 65 136 41 21 0.693 2 0 133 23 18 0.344 2 218 144 37 16 0.340 2 0 132 20 18 0.336 2 54 137 30 15 0.304 2 49 135 22 15 0.365 2 73 136 23 17 0.300 2 61 137 22 12 0.339 2 64 137 21 11 0.332 0 89 100 13 26 0.307 2 114 102 14 10 0.303 0 89 99 12 28 0.351 2 298 104 33 11 0.344 2 122 103 19 13 0.319 2 227 101 14 8 0.381 0 89 100 10 25 0.373 2 178 104 31 13 0.365 2 119 102 16 10 0.334 1 89 138 18 37 0.330 1 74 137 32 44 0.323 2 177 105 35 17 0.316 1 90 200 78 94 0.307 -------------------------------------------------------------------------------------------------------------- 2 | -------------------------------------------------------------------------------- /yolox-ros-deepstream/yolox-ros/nvdsinfer_custom_impl_yolox/libnvdsinfer_custom_impl_yolox.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/yolox-ros-deepstream/yolox-ros/nvdsinfer_custom_impl_yolox/libnvdsinfer_custom_impl_yolox.so -------------------------------------------------------------------------------- /yolox-ros-deepstream/yolox-ros/nvdsinfer_custom_impl_yolox/nvdsparsebbox_yolox.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guojianyang/cv-detect-robot/187f93559632911b09f9efbef3667b348c867cc5/yolox-ros-deepstream/yolox-ros/nvdsinfer_custom_impl_yolox/nvdsparsebbox_yolox.o -------------------------------------------------------------------------------- /yolox-ros-deepstream/yolox-ros/source1_csi_dec_infer_yolox.txt: -------------------------------------------------------------------------------- 1 | 2 | [application] 3 | enable-perf-measurement=1 4 | perf-measurement-interval-sec=5 5 | #gie-kitti-output-dir=streamscl 6 | 7 | [tiled-display] 8 | enable=1 9 | rows=1 10 | columns=1 11 | width=1280 12 | height=720 13 | 14 | [source0] 15 | enable=1 16 | #Type - 1=CameraV4L2 2=URI 3=MultiURI 4=RTSP 5=CSI 17 | type=5 18 | camera-width=640 19 | camera-height=480 20 | camera-fps-n=30 21 | camera-fps-d=1 22 | 23 | [sink0] 24 | enable=1 25 | #Type - 1=FakeSink 2=EglSink 3=File 4=RTSPStreaming 5=Overlay 26 | type=5 27 | sync=0 28 | display-id=0 29 | offset-x=0 30 | offset-y=0 31 | width=0 32 | height=0 33 | overlay-id=1 34 | source-id=0 35 | 36 | [sink1] 37 | enable=0 38 | type=3 39 | #1=mp4 2=mkv 40 | container=1 41 | #1=h264 2=h265 3=mpeg4 42 | codec=1 43 | #encoder type 0=Hardware 1=Software 44 | enc-type=0 45 | sync=0 46 | bitrate=2000000 47 | #H264 Profile - 0=Baseline 2=Main 4=High 48 | #H265 Profile - 0=Main 1=Main10 49 | profile=0 50 | output-file=out.mp4 51 | source-id=0 52 | 53 | [sink2] 54 | enable=0 55 | #Type - 1=FakeSink 2=EglSink 3=File 4=RTSPStreaming 5=Overlay 56 | type=4 57 | #1=h264 2=h265 58 | codec=1 59 | #encoder type 0=Hardware 1=Software 60 | enc-type=0 61 | sync=0 62 | bitrate=4000000 63 | #H264 Profile - 0=Baseline 2=Main 4=High 64 | #H265 Profile - 0=Main 1=Main10 65 | profile=0 66 | # set below properties in case of RTSPStreaming 67 | rtsp-port=8554 68 | udp-port=5400 69 | 70 | [osd] 71 | enable=1 72 | border-width=2 73 | text-size=15 74 | text-color=1;1;1;1; 75 | text-bg-color=0.3;0.3;0.3;1 76 | font=Serif 77 | show-clock=0 78 | clock-x-offset=800 79 | clock-y-offset=820 80 | clock-text-size=12 81 | clock-color=1;0;0;0 82 | 83 | [streammux] 84 | ##Boolean property to inform muxer that sources are live 85 | live-source=1 86 | batch-size=1 87 | ##time out in usec, to wait after the first buffer is available 88 | ##to push the batch even if the complete batch is not formed 89 | batched-push-timeout=40000 90 | ## Set muxer output width and height 91 | width=1280 92 | height=720 93 | ## If set to TRUE, system timestamp will be attached as ntp timestamp 94 | ## If set to FALSE, ntp timestamp from rtspsrc, if available, will be attached 95 | # attach-sys-ts-as-ntp=1 96 | 97 | # config-file property is mandatory for any gie section. 98 | # Other properties are optional and if set will override the properties set in 99 | # the infer config file. 100 | [primary-gie] 101 | enable=1 102 | batch-size=1 103 | gpu-id=0 104 | gie-unique-id=1 105 | nvbuf-memory-type=0 106 | config-file=config_infer_primary.txt 107 | 108 | [tests] 109 | file-loop=0 110 | -------------------------------------------------------------------------------- /yolox-ros-deepstream/yolox-ros/source1_usb_dec_infer_yolox.txt: -------------------------------------------------------------------------------- 1 | 2 | [application] 3 | enable-perf-measurement=1 4 | perf-measurement-interval-sec=5 5 | #gie-kitti-output-dir=streamscl 6 | 7 | [tiled-display] 8 | enable=1 9 | rows=1 10 | columns=1 11 | width=1280 12 | height=720 13 | 14 | [source0] 15 | enable=1 16 | #Type - 1=CameraV4L2 2=URI 3=MultiURI 17 | type=1 18 | camera-width=640 19 | camera-height=480 20 | camera-fps-n=30 21 | camera-fps-d=1 22 | camera-v4l2-dev-node=0 23 | 24 | [sink0] 25 | enable=1 26 | #Type - 1=FakeSink 2=EglSink 3=File 4=RTSPStreaming 5=Overlay 27 | type=2 28 | sync=0 29 | display-id=0 30 | offset-x=30 31 | offset-y=30 32 | width=1280 33 | height=720 34 | overlay-id=1 35 | source-id=0 36 | 37 | 38 | [osd] 39 | enable=1 40 | border-width=4 41 | text-size=15 42 | text-color=1;1;1;1; 43 | text-bg-color=0.3;0.3;0.3;1 44 | font=Serif 45 | show-clock=0 46 | clock-x-offset=800 47 | clock-y-offset=820 48 | clock-text-size=12 49 | clock-color=1;0;0;0 50 | 51 | [streammux] 52 | ##Boolean property to inform muxer that sources are live 53 | live-source=1 54 | batch-size=1 55 | ##time out in usec, to wait after the first buffer is available 56 | ##to push the batch even if the complete batch is not formed 57 | batched-push-timeout=40000 58 | ## Set muxer output width and height 59 | width=1280 60 | height=720 61 | ## If set to TRUE, system timestamp will be attached as ntp timestamp 62 | ## If set to FALSE, ntp timestamp from rtspsrc, if available, will be attached 63 | # attach-sys-ts-as-ntp=1 64 | 65 | # config-file property is mandatory for any gie section. 66 | # Other properties are optional and if set will override the properties set in 67 | # the infer config file. 68 | [primary-gie] 69 | enable=1 70 | gpu-id=0 71 | gie-unique-id=1 72 | nvbuf-memory-type=0 73 | config-file=config_infer_primary.txt 74 | 75 | [tracker] 76 | enable=1 77 | #tracker-width=640 78 | #tracker-height=384 79 | tracker-width=960 80 | tracker-height=544 81 | gpu-id=0 82 | #ll-lib-file=/opt/nvidia/deepstream/deepstream-5.1/lib/libnvds_mot_klt.so 83 | ll-lib-file=/opt/nvidia/deepstream/deepstream-5.1/lib/libnvds_nvdcf.so 84 | ll-config-file=tracker_config.yml 85 | #enable-past-frame=1 86 | enable-batch-process=1 87 | 88 | [tests] 89 | file-loop=0 90 | --------------------------------------------------------------------------------