Skip to content

Commit

Permalink
fix model path in yolov8 examples (#5864)
Browse files Browse the repository at this point in the history
  • Loading branch information
nihui authored Jan 2, 2025
1 parent 3b7eac2 commit 488c292
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 30 deletions.
24 changes: 12 additions & 12 deletions examples/yolov8.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,20 +291,20 @@ static int detect_yolov8(const cv::Mat& bgr, std::vector<Object>& objects)
// yolov8.opt.use_bf16_storage = true;

// https://github.com/nihui/ncnn-android-yolov8/tree/master/app/src/main/assets
yolov8.load_param("yolov8n_pnnx.py.ncnn.param");
yolov8.load_model("yolov8n_pnnx.py.ncnn.bin");
// yolov8.load_param("yolov8s_pnnx.py.ncnn.param");
// yolov8.load_model("yolov8s_pnnx.py.ncnn.bin");
// yolov8.load_param("yolov8m_pnnx.py.ncnn.param");
// yolov8.load_model("yolov8m_pnnx.py.ncnn.bin");
yolov8.load_param("yolov8n.ncnn.param");
yolov8.load_model("yolov8n.ncnn.bin");
// yolov8.load_param("yolov8s.ncnn.param");
// yolov8.load_model("yolov8s.ncnn.bin");
// yolov8.load_param("yolov8m.ncnn.param");
// yolov8.load_model("yolov8m.ncnn.bin");

// if you use oiv7 models, you shall call draw_objects_oiv() instead
// yolov8.load_param("yolov8n_oiv7_pnnx.py.ncnn.param");
// yolov8.load_model("yolov8n_oiv7_pnnx.py.ncnn.bin");
// yolov8.load_param("yolov8s_oiv7_pnnx.py.ncnn.param");
// yolov8.load_model("yolov8s_oiv7_pnnx.py.ncnn.bin");
// yolov8.load_param("yolov8m_oiv7_pnnx.py.ncnn.param");
// yolov8.load_model("yolov8m_oiv7_pnnx.py.ncnn.bin");
// yolov8.load_param("yolov8n_oiv7.ncnn.param");
// yolov8.load_model("yolov8n_oiv7.ncnn.bin");
// yolov8.load_param("yolov8s_oiv7.ncnn.param");
// yolov8.load_model("yolov8s_oiv7.ncnn.bin");
// yolov8.load_param("yolov8m_oiv7.ncnn.param");
// yolov8.load_model("yolov8m_oiv7.ncnn.bin");

const int target_size = 640;
const float prob_threshold = 0.25f;
Expand Down
12 changes: 6 additions & 6 deletions examples/yolov8_obb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -325,12 +325,12 @@ static int detect_yolov8_obb(const cv::Mat& bgr, std::vector<Object>& objects)
// yolov8.opt.use_bf16_storage = true;

// https://github.com/nihui/ncnn-android-yolov8/tree/master/app/src/main/assets
yolov8.load_param("yolov8n_obb_pnnx.py.ncnn.param");
yolov8.load_model("yolov8n_obb_pnnx.py.ncnn.bin");
// yolov8.load_param("yolov8s_obb_pnnx.py.ncnn.param");
// yolov8.load_model("yolov8s_obb_pnnx.py.ncnn.bin");
// yolov8.load_param("yolov8m_obb_pnnx.py.ncnn.param");
// yolov8.load_model("yolov8m_obb_pnnx.py.ncnn.bin");
yolov8.load_param("yolov8n_obb.ncnn.param");
yolov8.load_model("yolov8n_obb.ncnn.bin");
// yolov8.load_param("yolov8s_obb.ncnn.param");
// yolov8.load_model("yolov8s_obb.ncnn.bin");
// yolov8.load_param("yolov8m_obb.ncnn.param");
// yolov8.load_model("yolov8m_obb.ncnn.bin");

const int target_size = 1024;
const float prob_threshold = 0.25f;
Expand Down
12 changes: 6 additions & 6 deletions examples/yolov8_pose.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,12 +317,12 @@ static int detect_yolov8_pose(const cv::Mat& bgr, std::vector<Object>& objects)
// yolov8.opt.use_bf16_storage = true;

// https://github.com/nihui/ncnn-android-yolov8/tree/master/app/src/main/assets
yolov8.load_param("yolov8n_pose_pnnx.py.ncnn.param");
yolov8.load_model("yolov8n_pose_pnnx.py.ncnn.bin");
// yolov8.load_param("yolov8s_pose_pnnx.py.ncnn.param");
// yolov8.load_model("yolov8s_pose_pnnx.py.ncnn.bin");
// yolov8.load_param("yolov8m_pose_pnnx.py.ncnn.param");
// yolov8.load_model("yolov8m_pose_pnnx.py.ncnn.bin");
yolov8.load_param("yolov8n_pose.ncnn.param");
yolov8.load_model("yolov8n_pose.ncnn.bin");
// yolov8.load_param("yolov8s_pose.ncnn.param");
// yolov8.load_model("yolov8s_pose.ncnn.bin");
// yolov8.load_param("yolov8m_pose.ncnn.param");
// yolov8.load_model("yolov8m_pose.ncnn.bin");

const int target_size = 640;
const float prob_threshold = 0.25f;
Expand Down
12 changes: 6 additions & 6 deletions examples/yolov8_seg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -326,12 +326,12 @@ static int detect_yolov8_seg(const cv::Mat& bgr, std::vector<Object>& objects)
// yolov8.opt.use_bf16_storage = true;

// https://github.com/nihui/ncnn-android-yolov8/tree/master/app/src/main/assets
yolov8.load_param("yolov8n_seg_pnnx.py.ncnn.param");
yolov8.load_model("yolov8n_seg_pnnx.py.ncnn.bin");
// yolov8.load_param("yolov8s_seg_pnnx.py.ncnn.param");
// yolov8.load_model("yolov8s_seg_pnnx.py.ncnn.bin");
// yolov8.load_param("yolov8m_seg_pnnx.py.ncnn.param");
// yolov8.load_model("yolov8m_seg_pnnx.py.ncnn.bin");
yolov8.load_param("yolov8n_seg.ncnn.param");
yolov8.load_model("yolov8n_seg.ncnn.bin");
// yolov8.load_param("yolov8s_seg.ncnn.param");
// yolov8.load_model("yolov8s_seg.ncnn.bin");
// yolov8.load_param("yolov8m_seg.ncnn.param");
// yolov8.load_model("yolov8m_seg.ncnn.bin");

const int target_size = 640;
const float prob_threshold = 0.25f;
Expand Down

0 comments on commit 488c292

Please sign in to comment.