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

[FR]: Openlogo-model: logo-detection with pytorch #28

Closed
ozett opened this issue Jan 29, 2022 · 15 comments
Closed

[FR]: Openlogo-model: logo-detection with pytorch #28

ozett opened this issue Jan 29, 2022 · 15 comments

Comments

@ozett
Copy link

ozett commented Jan 29, 2022

maybe this is a pytorch model like yolo5 and can be integrated?
is not on the torch-hub. so this must be done manually?

Modell:
https://github.com/OlafenwaMoses/DeepStack_OpenLogo/releases/download/v1/openlogo.pt

Site:
https://github.com/OlafenwaMoses/DeepStack_OpenLogo

image

@ozett
Copy link
Author

ozett commented Jan 29, 2022

looks like it could be done like yolov5

image

@snowzach
Copy link
Owner

snowzach commented Feb 2, 2022

Yeah, Deepstack looks to be a lot of helper stuff around the yolo models. I was able to add support for it. I added a new model type of deepstack. You can download the .pt model and set type: deepstack and modelFile: models/openlogo.pt

@snowzach snowzach closed this as completed Feb 2, 2022
@ozett
Copy link
Author

ozett commented Feb 5, 2022

whats this?

doods.doods - ERROR - Could not create detector deepstack/logo: PytorchStreamReader failed reading zip archive: failed finding central directory

image

config.yaml (unsure what image-size needed for openlogo.pt...)

    - name: logo
      type: deepstack
      modelFile: models/openlogo.pt
      width: 224
      height: 224
      numThreads: 0
      numConcurrent: 4


@ozett
Copy link
Author

ozett commented Feb 5, 2022

my model file was incomplete from a broken download.
downloaded it again. and looks better.

can you cache the downloaded models (like yolov5 does it), so they are not re-downloaded every start?
edit: found this:
image
maybe you show an explicit example for clarification purpose?

image

@ozett
Copy link
Author

ozett commented Feb 5, 2022

image size error?
what size did you use in the config.yaml for testing?

edit: 640 is correct?

new_shape=(640, 640),

image

@ozett
Copy link
Author

ozett commented Feb 5, 2022

yolov5 works fine:
image

@ozett
Copy link
Author

ozett commented Feb 5, 2022

whats this error?

image

@ozett
Copy link
Author

ozett commented Feb 5, 2022

as openlogo.pt worked in my test like a yolo model, may i have to configure it in dood2.yaml
simply as yolov5?

edit:
Another ❓ arises:
HOW ould i configure yolov5 with self-trained weights for yolov5? I have a cat-model trained for yolov5.
whats the syntax for dood2.yaml?

edit: can not configure like yolov5.
image

   - name: logotorch
      type: pytorch
      modelFile: models/openlogo.pt,openlogo.pt
      width: 640
      height: 640
      numThreads: 0
      numConcurrent: 4

@ozett
Copy link
Author

ozett commented Mar 19, 2022

maybe related? -> ultralytics/yolov5#5234 (comment)

openlogo still throws error:

RuntimeError: The expanded size of the tensor (1) must match the existing size (80) at non-singleton dimension 3. Target sizes: [1, 3, 1, 1, 2]. Tensor sizes: [3, 48, 80, 2]

.

image

config:

   - name: logodeep
      type: deepstack
      modelFile: models/openlogo.pt
      width: 640
      height: 640
      numThreads: 0
      numConcurrent: 4

@snowzach
Copy link
Owner

I don't totally understand the deepstack framework but at a glance it definitely looks like it's related. It looks like something changed from Yolov6. I will try to figure out how to make it use a yolo5 model. I am buried at the moment, not sure how soon I can get to it though.

@snowzach snowzach reopened this Mar 20, 2022
@snowzach
Copy link
Owner

I think this might be a different issue. Openlogo works fine for me.

@ozett
Copy link
Author

ozett commented Mar 20, 2022

what causes my error? i tested only with one image. maybe that image?
i will check

@snowzach
Copy link
Owner

Yeah, any image that fails will help me.

@ozett
Copy link
Author

ozett commented Mar 20, 2022

#38 (comment)

@snowzach snowzach reopened this Mar 21, 2022
@snowzach
Copy link
Owner

Okay, closing this ticket again in favor of the other one

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

2 participants