ObjectDetector icon indicating copy to clipboard operation
ObjectDetector copied to clipboard

Darknet support

Open pcuenca opened this issue 6 years ago • 0 comments

Main tasks include:

  • [x] Proof of concept implementation.
  • [ ] Reuse JdeRobot labels instead of having duplicate metadata files.
  • [ ] Remove hardcoded assumption of Coco categories.
  • [ ] Error handling: dynamic library or model files cannot be found.

The current version works, but it assumes Coco labels and loads a separate metadata file with Coco categories taken from the Darknet distribution. I'll be updating this PR as I work on the improvement tasks above.

To test YOLOv3-tiny, please follow these steps:

  1. Download and compile Darknet to obtain libdarknet.so.
  2. Copy yolov3-tiny.cfg from the Darknet distribution into Net/Darknet.
  3. Download yolov3-tiny.weights and place it into Net/Darknet.
  4. Update your DYLD_LIBRARY_PATH to include the directory where libdarknet.so resides.
  5. Run the object detector as usual, using the yml configuration file supplied in this PR.

Other models are possible. The corresponding darknet weights and configuration files must be placed in the Net/Darknet directory. They must have the same name (except for the extension), which must in turn match the Model name defined in the YAML configuration file.

Credits

  • All data files have been taken from the Darknet distribution.
  • The darknet.py file was also copied from the Darknet distribution, but it includes modifications to trigger detection from a numpy image instead of a file.

pcuenca avatar Oct 01 '18 09:10 pcuenca