Skip to content

Commit

Permalink
fix(tensorrt_yolox): update yolox-s model (autowarefoundation#4949)
Browse files Browse the repository at this point in the history
* fix(tensorrt_yolox): update yolox-s model

Signed-off-by: badai-nguyen <[email protected]>

* fix: cspell check

Signed-off-by: badai-nguyen <[email protected]>

* fix: typo

Signed-off-by: badai-nguyen <[email protected]>

* fix: lint_cmake check

Signed-off-by: badai-nguyen <[email protected]>

---------

Signed-off-by: badai-nguyen <[email protected]>
  • Loading branch information
badai-nguyen authored and tkimura4 committed Sep 13, 2023
1 parent 0351eb8 commit 4c2772c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
17 changes: 10 additions & 7 deletions perception/tensorrt_yolox/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ set(DATA_PATH "${CMAKE_CURRENT_SOURCE_DIR}/data")
if(NOT EXISTS "${DATA_PATH}")
execute_process(COMMAND mkdir -p ${DATA_PATH})
endif()
function(download FILE_NAME FILE_HASH)
function(download SUB_DIR FILE_NAME FILE_HASH)
message(STATUS "Checking and downloading ${FILE_NAME}")
set(FILE_PATH ${DATA_PATH}/${FILE_NAME})
set(STATUS_CODE 0)
Expand All @@ -44,14 +44,14 @@ function(download FILE_NAME FILE_HASH)
else()
message(STATUS "diff ${FILE_NAME}")
message(STATUS "File hash changes. Downloading now ...")
file(DOWNLOAD https://awf.ml.dev.web.auto/perception/models/${FILE_NAME} ${FILE_PATH} STATUS DOWNLOAD_STATUS TIMEOUT 3600)
file(DOWNLOAD https://awf.ml.dev.web.auto/perception/${SUB_DIR}/${FILE_NAME} ${FILE_PATH} STATUS DOWNLOAD_STATUS TIMEOUT 3600)
list(GET DOWNLOAD_STATUS 0 STATUS_CODE)
list(GET DOWNLOAD_STATUS 1 ERROR_MESSAGE)
endif()
else()
message(STATUS "not found ${FILE_NAME}")
message(STATUS "File doesn't exists. Downloading now ...")
file(DOWNLOAD https://awf.ml.dev.web.auto/perception/models/${FILE_NAME} ${FILE_PATH} STATUS DOWNLOAD_STATUS TIMEOUT 3600)
file(DOWNLOAD https://awf.ml.dev.web.auto/perception/${SUB_DIR}/${FILE_NAME} ${FILE_PATH} STATUS DOWNLOAD_STATUS TIMEOUT 3600)
list(GET DOWNLOAD_STATUS 0 STATUS_CODE)
list(GET DOWNLOAD_STATUS 1 ERROR_MESSAGE)
endif()
Expand All @@ -62,10 +62,13 @@ function(download FILE_NAME FILE_HASH)
endif()
endfunction()

download(yolox-tiny.onnx 97028baf73ce55e115599c9c60651b08)
download(yolox-sPlus-opt.onnx bf3b0155351f90fcdca2626acbfd3bcf)
download(yolox-sPlus-opt.EntropyV2-calibration.table c6e6f1999d5724a017516a956096701f)
download(label.txt 9ceadca8b72b6169ee6aabb861fe3e1e)
set(V1_PATH models/object_detection_yolox_s/v1)
download(models yolox-tiny.onnx 97028baf73ce55e115599c9c60651b08)
download(models yolox-sPlus-opt.onnx bf3b0155351f90fcdca2626acbfd3bcf)
download(models yolox-sPlus-opt.EntropyV2-calibration.table c6e6f1999d5724a017516a956096701f)
download(${V1_PATH} yolox-sPlus-T4-960x960-pseudo-finetune.onnx 37165a7e67bdaf6acff93925c628f2b2)
download(${V1_PATH} yolox-sPlus-T4-960x960-pseudo-finetune.EntropyV2-calibration.table d266ea9846b10e4dab53572152c6fd8f)
download(models label.txt 9ceadca8b72b6169ee6aabb861fe3e1e)

##########
# tensorrt_yolox
Expand Down
3 changes: 2 additions & 1 deletion perception/tensorrt_yolox/launch/yolox_s_plus_opt.launch.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?xml version="1.0"?>
<launch>
<!-- cspell:ignore finetune -->
<arg name="input/image" default="/sensing/camera/camera0/image_rect_color"/>
<arg name="output/objects" default="/perception/object_recognition/detection/rois0"/>
<arg name="model_name" default="yolox-sPlus-opt"/>
<arg name="model_name" default="yolox-sPlus-T4-960x960-pseudo-finetune"/>
<arg name="model_path" default="$(find-pkg-share tensorrt_yolox)/data"/>
<arg name="score_threshold" default="0.35"/>
<arg name="nms_threshold" default="0.7"/>
Expand Down

0 comments on commit 4c2772c

Please sign in to comment.