Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ install
data

# models
models
# models
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set(CMAKE_BUILD_TYPE Release)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Ofast -Wfatal-errors")

#add wrapper
set(TRT_WRAPPER_DIR ${CMAKE_CURRENT_SOURCE_DIR}/tensorRTWrapper/code)
set(TRT_WRAPPER_DIR ${CMAKE_CURRENT_SOURCE_DIR}/tensorRTW/code)
add_subdirectory(${TRT_WRAPPER_DIR})
include_directories(${TRT_WRAPPER_DIR}/include)

Expand All @@ -20,6 +20,6 @@ link_directories(${OpenCV_LIBRARIES_DIRS})

#build runYolov3
add_executable(runYolov3 main.cpp eval.cpp dataReader.cpp)
target_link_libraries(runYolov3 TrtNet ${OpenCV_LIBS})
target_link_libraries(runYolov3 TrtNet ${OpenCV_LIBS} pthread)

install(TARGETS runYolov3 DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/install/)
80 changes: 80 additions & 0 deletions coco.names
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
person
bicycle
car
motorbike
aeroplane
bus
train
truck
boat
traffic light
fire hydrant
stop sign
parking meter
bench
bird
cat
dog
horse
sheep
cow
elephant
bear
zebra
giraffe
backpack
umbrella
handbag
tie
suitcase
frisbee
skis
snowboard
sports ball
kite
baseball bat
baseball glove
skateboard
surfboard
tennis racket
bottle
wine glass
cup
fork
knife
spoon
bowl
banana
apple
sandwich
orange
broccoli
carrot
hot dog
pizza
donut
cake
chair
sofa
pottedplant
bed
diningtable
toilet
tvmonitor
laptop
mouse
remote
keyboard
cell phone
microwave
oven
toaster
sink
refrigerator
book
clock
vase
scissors
teddy bear
hair drier
toothbrush
2 changes: 2 additions & 0 deletions demo.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#./install/runYolov3 --caffemodel=./yolov3_608.caffemodel --prototxt=./yolov3_608_trt.prototxt --input=./test.jpg --W=608 --H=608 --class=80
./install/runYolov3 --caffemodel=./models/mobilenet_yolov3_lite_deploy.caffemodel --prototxt=./models/mobilenet_yolov3_lite_deploy.prototxt --inputstream=video --videofile=test.avi --W=320 --H=320 --class=20 --classname=voc.names --display=1
8 changes: 7 additions & 1 deletion include/configs.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,19 @@ namespace Tn
const std::string INPUT_PROTOTXT ="yolov3_trt.prototxt";
const std::string INPUT_CAFFEMODEL = "yolov3.caffemodel";
const std::string INPUT_IMAGE = "test.jpg";
const std::string VIDEOFILE = "sample.mp4";
const std::string SAVEFILE = "result";
const std::string INPUT_STREAM = "cam";
const std::string CLASS_NAME = "coco.name";
const std::string EVAL_LIST = "";
const std::string CALIBRATION_LIST = "";
const std::string MODE = "fp32";
const std::string OUTPUTS= "yolo-det";//layer82-conv,layer94-conv,layer106-conv
const int DISPLAY = 1;
const int SAVEIMG = 0;
const int INPUT_WIDTH = 608;
const int INPUT_HEIGHT = 608;

const int CAM = 0;
const int DETECT_CLASSES = 80;
const float NMS_THRESH = 0.45;
}
Expand Down
Loading