AlexeyAB / darknet

YOLOv4 / Scaled-YOLOv4 / YOLO - Neural Networks for Object Detection (Windows and Linux version of Darknet )
http://pjreddie.com/darknet/
Other
21.8k stars 7.97k forks source link

Improve API #3053

Open AlexeyAB opened 5 years ago

AlexeyAB commented 5 years ago

Improve API compatibility with other software (applications, libraries, ...)

  1. Remove unnecessary API functions, which:

    • isn't related to AI/Neural networks/Computer vision
    • duplicate the functionality
    • it present as functions from standard libraries in different languages
    • should be used only as internal functions
  2. Add API function for each feature: Detector (yolo), Classifier, RNN (text generation), RNN_vid, ... from examples: https://github.com/pjreddie/darknet/tree/master/examples


Change names of API-functions, based on the best practice:


May be move some c-files from /src/ folder to /example/ folder as in original repository: https://github.com/pjreddie/darknet/tree/master/examples

anand-bala commented 3 years ago

Hey, @AlexeyAB do you need any help with this? I am trying to use your code as a library and would love if the C++ API was wrapped in a namespace.

stephanecharette commented 3 years ago

You may also want to look at one of the newer C++ APIs for darknet: https://github.com/stephanecharette/DarkHelp#what-is-darkhelp

anand-bala commented 3 years ago

@stephanecharette How is DarkHelp different from this? It doesn't look like you're putting things in namespaces either? Moreover, is there any particular reason you don't use darknet as a git submodule?

stephanecharette commented 3 years ago

I wanted a single class, something easy to use in commercial projects where I didn't want to deal with having darknet itself as a dependency as the darknet code is a bit of a mess.

stephanecharette commented 3 years ago

As for namespace, since it is a single class I didn't see a need to have a DarkHelp ns with a single DarkHelp class within it, but go ahead and declare a namespace prior to #including darkhelp.hpp if that is what you'd like. Note that DarkHelp is used by many commercial projects already. You can find us on the darknet/yolo discord where both DarkHelp and DarkMark have a dedicated channel if you want more help.

anand-bala commented 3 years ago

Thanks a tonne @stephanecharette

holger-prause commented 3 years ago

On 10.03.2021 22:25, Stéphane Charette wrote:

I wanted a single class, something easy to use in commercial projects where I didn't want to deal with having darknet itself as a dependency as the darknet code is a bit of a mess.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/AlexeyAB/darknet/issues/3053#issuecomment-796140087, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB4OCQ23GDALF5IHRG3VF5LTC7IT3ANCNFSM4HI2FADQ.

Try using the dnn module of opencv. You can even compile opencv dnn module with cuda support if desired.

-- Diese E-Mail wurde von AVG auf Viren geprüft. http://www.avg.com

anand-bala commented 3 years ago

@holger-prause I think the point of using Darknet is for the out-of-the-box support for YOLO.