Skip to content

[Feature Request opencv-dnn] Swish Activation, Mish Activation #15693

Closed

Description

@LukeAI

Google's famous Efficientnet uses the Swish Activation function
It is currently not possible to use efficientnet in opencv due to the absence of swish.

The newer Mish activation function reportedly outperforms swish and would be great to have as an option.

Activity

  1. dkurt commented on Oct 13, 2019

    @dkurt
    Member

    It's possible for now to enable this network with custom layers mechanism. Please read a tutorial https://docs.opencv.org/master/dc/db1/tutorial_dnn_custom_layers.html.

  2. suab321321 commented on Oct 15, 2019

    @suab321321

    @dkurt @LukeAI I would like to help with this one

  3. dkurt commented on Oct 15, 2019

    @dkurt
    Member

    @suab321321, thanks! Feel free to open a PR

  4. grassknoted commented on Oct 22, 2019

    @grassknoted

    Hi @dkurt seeing no progress, I was wondering if I could take this issue up? I had a look at the link:

    Please read a tutorial https://docs.opencv.org/master/dc/db1/tutorial_dnn_custom_layers.html.

    I'm still unsure of where to add the Mish activation function. Could you just help me get started, please?

  5. alalek commented on Oct 22, 2019

    @alalek
    Member

    Usage questions should go to Users OpenCV Q/A forum: http://answers.opencv.org
    Custom layers are part of User code. Check "samples".

  6. grassknoted commented on Oct 22, 2019

    @grassknoted

    Thanks for the reply @alalek !
    Just to clarify, I would need to create an Mish function example in the samples/ directory, right? Something like: samples/python/mish.py?

  7. alalek commented on Oct 22, 2019

    @alalek
    Member

    Well, if you want to add this implementation OpenCV then check this patch: #10889 + add tests on data from original framework (1-2 layers, to ensure that it is parsed properly).

    Not sure if this is really "good first issue".

  8. dkurt commented on Oct 22, 2019

    @dkurt
    Member
  9. grassknoted commented on Oct 22, 2019

    @grassknoted

    Well, if you want to add this implementation OpenCV then check this patch: #10889 + add tests on data from original framework (1-2 layers, to ensure that it is parsed properly).

    Not sure if this is really "good first issue".

    Looking at the required changes, I'm not very sure I could take this on. I will instead look for more beginner focussed issues. Thank you @dkurt and @alalek for the help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions