Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yolov8-seg, output error #1525

Closed
TianLuluC opened this issue May 14, 2024 · 18 comments
Closed

yolov8-seg, output error #1525

TianLuluC opened this issue May 14, 2024 · 18 comments

Comments

@TianLuluC
Copy link

Env

  • GPU, RTX3060
  • OS, Ubuntu 20.04.4 LTS
  • Cuda version,12.2
  • TensorRT version, 8.2.5.1

About this repo

  • which branch/tag/commit are you using?
    master
  • which model?
    yolov8-seg

Your problem

warm_up->(640, 640, 3), time->4.74ms
warm_up->(640, 640, 3), time->3.88ms
yolov8_seg_trt.py:401: RuntimeWarning: overflow encountered in exp
return 1 / (1 + np.exp(-x))
result_boxes[j]:[ 0. 0. 1391.6953 713.90625]
result_classid[j]:399.013671875
Exception in thread Thread-21:
Traceback (most recent call last):
File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "yolov8_seg_trt.py", line 483, in run
batch_image_raw, use_time = self.yolov8_wrapper.infer(self.yolov8_wrapper.get_raw_image(self.image_path_batch))
File "yolov8_seg_trt.py", line 201, in infer
categories[int(result_classid[j])], result_scores[j]
IndexError: list index out of range

  • what is your command?
    python3 yolov8_seg_trt.py
  • what's your output?

image

  • what output do you expect?
    box and mask
@TianLuluC TianLuluC changed the title yolov8-seg, yolov8-seg, output error May 14, 2024
@wang-xinyu
Copy link
Owner

@lindsayshuo pls advice

@lindsayshuo
Copy link
Contributor

Env

  • GPU, RTX3060
  • OS, Ubuntu 20.04.4 LTS
  • Cuda version,12.2
  • TensorRT version, 8.2.5.1

About this repo

  • which branch/tag/commit are you using?
    master
  • which model?
    yolov8-seg

Your problem

warm_up->(640, 640, 3), time->4.74ms
warm_up->(640, 640, 3), time->3.88ms
yolov8_seg_trt.py:401: RuntimeWarning: overflow encountered in exp
return 1 / (1 + np.exp(-x))
result_boxes[j]:[ 0. 0. 1391.6953 713.90625]
result_classid[j]:399.013671875
Exception in thread Thread-21:
Traceback (most recent call last):
File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "yolov8_seg_trt.py", line 483, in run
batch_image_raw, use_time = self.yolov8_wrapper.infer(self.yolov8_wrapper.get_raw_image(self.image_path_batch))
File "yolov8_seg_trt.py", line 201, in infer
categories[int(result_classid[j])], result_scores[j]
IndexError: list index out of range

  • what is your command?
    python3 yolov8_seg_trt.py
  • what's your output?

image

  • what output do you expect?
    box and mask

是不是官方模型,我看是索引超了

@TianLuluC
Copy link
Author

TianLuluC commented May 14, 2024

Env

  • GPU, RTX3060
  • OS, Ubuntu 20.04.4 LTS
  • Cuda version,12.2
  • TensorRT version, 8.2.5.1

About this repo

  • which branch/tag/commit are you using?
    master
  • which model?
    yolov8-seg

Your problem

warm_up->(640, 640, 3), time->4.74ms
warm_up->(640, 640, 3), time->3.88ms
yolov8_seg_trt.py:401: RuntimeWarning: overflow encountered in exp
return 1 / (1 + np.exp(-x))
result_boxes[j]:[ 0. 0. 1391.6953 713.90625]
result_classid[j]:399.013671875
Exception in thread Thread-21:
Traceback (most recent call last):
File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "yolov8_seg_trt.py", line 483, in run
batch_image_raw, use_time = self.yolov8_wrapper.infer(self.yolov8_wrapper.get_raw_image(self.image_path_batch))
File "yolov8_seg_trt.py", line 201, in infer
categories[int(result_classid[j])], result_scores[j]
IndexError: list index out of range

  • what is your command?
    python3 yolov8_seg_trt.py
  • what's your output?

image

  • what output do you expect?
    box and mask

是不是官方模型,我看是索引超了

不是,custom dataset, yolov8 训练的自定义模型,3类
class_id 输出是比较大浮点数

@lindsayshuo
Copy link
Contributor

Env

  • GPU, RTX3060
  • OS, Ubuntu 20.04.4 LTS
  • Cuda version,12.2
  • TensorRT version, 8.2.5.1

About this repo

  • which branch/tag/commit are you using?
    master
  • which model?
    yolov8-seg

Your problem

warm_up->(640, 640, 3), time->4.74ms
warm_up->(640, 640, 3), time->3.88ms
yolov8_seg_trt.py:401: RuntimeWarning: overflow encountered in exp
return 1 / (1 + np.exp(-x))
result_boxes[j]:[ 0. 0. 1391.6953 713.90625]
result_classid[j]:399.013671875
Exception in thread Thread-21:
Traceback (most recent call last):
File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "yolov8_seg_trt.py", line 483, in run
batch_image_raw, use_time = self.yolov8_wrapper.infer(self.yolov8_wrapper.get_raw_image(self.image_path_batch))
File "yolov8_seg_trt.py", line 201, in infer
categories[int(result_classid[j])], result_scores[j]
IndexError: list index out of range

  • what is your command?
    python3 yolov8_seg_trt.py
  • what's your output?

image

  • what output do you expect?
    box and mask

是不是官方模型,我看是索引超了

不是,custom dataset, yolov8 训练的自定义模型,3类

是用最新代码的wts导出的吗

@TianLuluC
Copy link
Author

Env

  • GPU, RTX3060
  • OS, Ubuntu 20.04.4 LTS
  • Cuda version,12.2
  • TensorRT version, 8.2.5.1

About this repo

  • which branch/tag/commit are you using?
    master
  • which model?
    yolov8-seg

Your problem

warm_up->(640, 640, 3), time->4.74ms
warm_up->(640, 640, 3), time->3.88ms
yolov8_seg_trt.py:401: RuntimeWarning: overflow encountered in exp
return 1 / (1 + np.exp(-x))
result_boxes[j]:[ 0. 0. 1391.6953 713.90625]
result_classid[j]:399.013671875
Exception in thread Thread-21:
Traceback (most recent call last):
File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "yolov8_seg_trt.py", line 483, in run
batch_image_raw, use_time = self.yolov8_wrapper.infer(self.yolov8_wrapper.get_raw_image(self.image_path_batch))
File "yolov8_seg_trt.py", line 201, in infer
categories[int(result_classid[j])], result_scores[j]
IndexError: list index out of range

  • what is your command?
    python3 yolov8_seg_trt.py
  • what's your output?

image

  • what output do you expect?
    box and mask

是不是官方模型,我看是索引超了

不是,custom dataset, yolov8 训练的自定义模型,3类

是用最新代码的wts导出的吗

是的,master, 刚pull的

@lindsayshuo
Copy link
Contributor

Env

  • GPU, RTX3060
  • OS, Ubuntu 20.04.4 LTS
  • Cuda version,12.2
  • TensorRT version, 8.2.5.1

About this repo

  • which branch/tag/commit are you using?
    master
  • which model?
    yolov8-seg

Your problem

warm_up->(640, 640, 3), time->4.74ms
warm_up->(640, 640, 3), time->3.88ms
yolov8_seg_trt.py:401: RuntimeWarning: overflow encountered in exp
return 1 / (1 + np.exp(-x))
result_boxes[j]:[ 0. 0. 1391.6953 713.90625]
result_classid[j]:399.013671875
Exception in thread Thread-21:
Traceback (most recent call last):
File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "yolov8_seg_trt.py", line 483, in run
batch_image_raw, use_time = self.yolov8_wrapper.infer(self.yolov8_wrapper.get_raw_image(self.image_path_batch))
File "yolov8_seg_trt.py", line 201, in infer
categories[int(result_classid[j])], result_scores[j]
IndexError: list index out of range

  • what is your command?
    python3 yolov8_seg_trt.py
  • what's your output?

image

  • what output do you expect?
    box and mask

是不是官方模型,我看是索引超了

不是,custom dataset, yolov8 训练的自定义模型,3类

是用最新代码的wts导出的吗

是的,master, 刚pull的

你用c++试了吗

@TianLuluC
Copy link
Author

Env

  • GPU, RTX3060
  • OS, Ubuntu 20.04.4 LTS
  • Cuda version,12.2
  • TensorRT version, 8.2.5.1

About this repo

  • which branch/tag/commit are you using?
    master
  • which model?
    yolov8-seg

Your problem

warm_up->(640, 640, 3), time->4.74ms
warm_up->(640, 640, 3), time->3.88ms
yolov8_seg_trt.py:401: RuntimeWarning: overflow encountered in exp
return 1 / (1 + np.exp(-x))
result_boxes[j]:[ 0. 0. 1391.6953 713.90625]
result_classid[j]:399.013671875
Exception in thread Thread-21:
Traceback (most recent call last):
File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "yolov8_seg_trt.py", line 483, in run
batch_image_raw, use_time = self.yolov8_wrapper.infer(self.yolov8_wrapper.get_raw_image(self.image_path_batch))
File "yolov8_seg_trt.py", line 201, in infer
categories[int(result_classid[j])], result_scores[j]
IndexError: list index out of range

  • what is your command?
    python3 yolov8_seg_trt.py
  • what's your output?

image

  • what output do you expect?
    box and mask

是不是官方模型,我看是索引超了

不是,custom dataset, yolov8 训练的自定义模型,3类

是用最新代码的wts导出的吗

是的,master, 刚pull的

你用c++试了吗

没有,只用了python

@lindsayshuo
Copy link
Contributor

Env

  • GPU, RTX3060
  • OS, Ubuntu 20.04.4 LTS
  • Cuda version,12.2
  • TensorRT version, 8.2.5.1

About this repo

  • which branch/tag/commit are you using?
    master
  • which model?
    yolov8-seg

Your problem

warm_up->(640, 640, 3), time->4.74ms
warm_up->(640, 640, 3), time->3.88ms
yolov8_seg_trt.py:401: RuntimeWarning: overflow encountered in exp
return 1 / (1 + np.exp(-x))
result_boxes[j]:[ 0. 0. 1391.6953 713.90625]
result_classid[j]:399.013671875
Exception in thread Thread-21:
Traceback (most recent call last):
File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "yolov8_seg_trt.py", line 483, in run
batch_image_raw, use_time = self.yolov8_wrapper.infer(self.yolov8_wrapper.get_raw_image(self.image_path_batch))
File "yolov8_seg_trt.py", line 201, in infer
categories[int(result_classid[j])], result_scores[j]
IndexError: list index out of range

  • what is your command?
    python3 yolov8_seg_trt.py
  • what's your output?

image

  • what output do you expect?
    box and mask

是不是官方模型,我看是索引超了

不是,custom dataset, yolov8 训练的自定义模型,3类

是用最新代码的wts导出的吗

是的,master, 刚pull的

你用c++试了吗

没有,只用了python

可以把j打出来看看

@TianLuluC
Copy link
Author

TianLuluC commented May 14, 2024

@lindsayshuo
image

@lindsayshuo
Copy link
Contributor

@lindsayshuo image

output[i * 38001: (i + 1) * 38001] 看看这个是不是空

@TianLuluC
Copy link
Author

@lindsayshuo
image
不为空

@lindsayshuo
Copy link
Contributor

@lindsayshuo image 不为空

result_boxes, result_scores, result_classid,result_proto_coef 这几个打印下

@TianLuluC
Copy link
Author

@lindsayshuo
image

@lindsayshuo
Copy link
Contributor

@lindsayshuo image

打印int(result_classid[j])]这个呢

@TianLuluC
Copy link
Author

@lindsayshuo
image
model有3类,值应该为 <3

@lindsayshuo
Copy link
Contributor

#1526

@lindsayshuo
Copy link
Contributor

已经提交修复

@TianLuluC
Copy link
Author

@lindsayshuo @wang-xinyu 谢谢!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants