Giter VIP home page Giter VIP logo

Comments (4)

joinany avatar joinany commented on August 19, 2024

I found that the filters of 255 should be changed to 18 in my case. Thanks.

from tensorrt_yolo3_module.

Hanlos avatar Hanlos commented on August 19, 2024

Did you test the project with yolo-v3(416*416)?

$ python3 trt_yolo3_module_1batch.py
Reading engine from file yolov3-608.trt
Traceback (most recent call last):
File "trt_yolo3_module_1batch.py", line 214, in
output_dic_list = alpha_yolo3_unit.process_frame_batch(input_dic_list)
File "trt_yolo3_module_1batch.py", line 185, in process_frame_batch
(class_list_all,box_list_all,conf_list_all) = self.detection(procession_tuple)
File "trt_yolo3_module_1batch.py", line 99, in detection
output = output.reshape(shape)
ValueError: cannot reshape array of size 3042 into shape (1,255,13,13)

you must generate yolov3-416.onnx by change the cfg file and yolov3_to_onnx.py file ,the height and width and the out shape 19,38,76 to 13,26,52, I change this, and success!

from tensorrt_yolo3_module.

JWSunny avatar JWSunny commented on August 19, 2024

@Hanlos hello, thanks for you sharing, but how can i change the yolov3_to_onnx.py file? can you provide guidance, thanks.

from tensorrt_yolo3_module.

liguoyu666 avatar liguoyu666 commented on August 19, 2024

I found that the filters of 255 should be changed to 18 in my case. Thanks.

Hello,I have a similar problem when I convert my weight, I changed the cfg and trt_yolo3_module_1batch.py

`[convolutional]
size=1
stride=1
pad=1
filters=21
activation=linear

[yolo]
mask = 3,4,5
anchors = 15,17, 23,26, 30,34, 37,43, 47,52, 66,75, 97,109, 196,233, 576,713
classes=2
num=9
jitter=.3
ignore_thresh = .7
truth_thresh = 1
random=1`

self.num_classes = 2 in trt_yolo3_module_1batch.py

Traceback (most recent call last): File "/home/lgy/PycharmProjects/TensorRT_yolo3_module/trt_yolo3_module_1batch.py", line 216, in <module> output_dic_list = alpha_yolo3_unit.process_frame_batch(input_dic_list) File "/home/lgy/PycharmProjects/TensorRT_yolo3_module/trt_yolo3_module_1batch.py", line 187, in process_frame_batch (class_list_all,box_list_all,conf_list_all) = self.detection(procession_tuple) File "/home/lgy/PycharmProjects/TensorRT_yolo3_module/trt_yolo3_module_1batch.py", line 101, in detection output = output.reshape(shape) ValueError: cannot reshape array of size 3549 into shape (1,255,13,13)

from tensorrt_yolo3_module.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.