Skip to content

Inference with Grayscale Image #55

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

Open
Rabia-Saeed opened this issue Nov 2, 2020 · 1 comment
Open

Inference with Grayscale Image #55

Rabia-Saeed opened this issue Nov 2, 2020 · 1 comment

Comments

@Rabia-Saeed
Copy link

Rabia-Saeed commented Nov 2, 2020

Hi,

I have trained yolov3 (custom classes and grayscale images) and the inference seems to work good in python. I need to do inference in C++. For this reason I and using this work and the config file I have is for yolov3-tiny with channels=1. However, I have issues:

  1. what(): shape '[255, 256, 1, 1]' is invalid for input of size 64992 while loading the weights. I use the same config file in python and I have no issue.
    I figures that this is related to the output layer filters and I modified them to 24 (instead of 255) as I have 3 classes. I don't have this issue anymore but a new one
  2. what(): Given groups=1, weight of size [16, 3, 3, 3], expected input[1, 1, 416, 416] to have 3 channels, but got 1 channels instead
    I defined channels=1 in config during both training and inference process.
    Hence, I am unable to run it in C++.

Please let me know if you know what could be the reason. Thanks!

@Rabia-Saeed
Copy link
Author

Rabia-Saeed commented Nov 2, 2020

update: I modified previous filter in Darknet::create_modules() to 1 (instead of 3) and I don't have any errors. But my results are still not ok

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

1 participant