diff --git a/yolov5/CMakeLists.txt b/yolov5/CMakeLists.txt
new file mode 100644
index 0000000..55f84c9
--- /dev/null
+++ b/yolov5/CMakeLists.txt
@@ -0,0 +1,41 @@
+cmake_minimum_required(VERSION 2.6)
+
+project(yolov5)
+
+add_definitions(-std=c++11)
+
+option(CUDA_USE_STATIC_CUDA_RUNTIME OFF)
+set(CMAKE_CXX_STANDARD 11)
+set(CMAKE_BUILD_TYPE Debug)
+
+find_package(CUDA REQUIRED)
+
+set(CUDA_NVCC_PLAGS ${CUDA_NVCC_PLAGS};-std=c++11;-g;-G;-gencode;arch=compute_30;code=sm_30)
+
+include_directories(${PROJECT_SOURCE_DIR}/include)
+if (CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64")
+ message("embed_platform on")
+ include_directories(/usr/local/cuda/targets/aarch64-linux/include)
+ link_directories(/usr/local/cuda/targets/aarch64-linux/lib)
+else()
+ message("embed_platform off")
+ include_directories(/usr/local/cuda/include)
+ link_directories(/usr/local/cuda/lib64)
+endif()
+
+
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Ofast -Wfatal-errors -D_MWAITXINTRIN_H_INCLUDED")
+
+cuda_add_library(yololayer SHARED ${PROJECT_SOURCE_DIR}/yololayer.cu)
+
+find_package(OpenCV)
+include_directories(OpenCV_INCLUDE_DIRS)
+
+add_executable(yolov5s ${PROJECT_SOURCE_DIR}/yolov5s.cpp)
+target_link_libraries(yolov5s nvinfer)
+target_link_libraries(yolov5s cudart)
+target_link_libraries(yolov5s yololayer)
+target_link_libraries(yolov5s ${OpenCV_LIBS})
+
+add_definitions(-O2 -pthread)
+
diff --git a/yolov5/README.md b/yolov5/README.md
new file mode 100644
index 0000000..eb900b7
--- /dev/null
+++ b/yolov5/README.md
@@ -0,0 +1,52 @@
+# yolov5
+
+The Pytorch implementation is [ultralytics/yolov5](https://github.com/ultralytics/yolov5).
+
+## How to Run
+
+```
+1. generate yolov5s.wts from pytorch implementation with yolov5s.pt
+
+git clone https://github.com/wang-xinyu/tensorrtx.git
+git clone https://github.com/ultralytics/yolov5.git
+// download its weights 'yolov5s.pt'
+cd yolov5
+cp ../tensorrtx/yolov5s/gen_wts.py .
+python gen_wts.py
+// a file 'yolov5s.wts' will be generated.
+
+2. put yolov5s.wts into yolov5, build and run
+
+mv yolov5s.wts ../tensorrtx/yolov5/
+cd ../tensorrtx/yolov5
+mkdir build
+cd build
+cmake ..
+make
+sudo ./yolov5s -s // serialize model to plan file i.e. 'yolov5s.engine'
+sudo ./yolov5s -d ../samples // deserialize plan file and run inference, the images in samples will be processed.
+
+3. check the images generated, as follows. _zidane.jpg and _bus.jpg
+```
+
+
+
+
+
+
+
+
+
+## Config
+
+- Input shape defined in yololayer.h
+- Number of classes defined in yololayer.h
+- FP16/FP32 can be selected by the macro in yolov5s.cpp
+- GPU id can be selected by the macro in yolov5s.cpp
+- NMS thresh in yolov5s.cpp
+- BBox confidence thresh in yolov5s.cpp
+
+## More Information
+
+See the readme in [home page.](https://github.com/wang-xinyu/tensorrtx)
+
diff --git a/yolov5/common.hpp b/yolov5/common.hpp
new file mode 100644
index 0000000..20ce35c
--- /dev/null
+++ b/yolov5/common.hpp
@@ -0,0 +1,295 @@
+#ifndef YOLOV5_COMMON_H_
+#define YOLOV5_COMMON_H_
+
+#include
+#include