image icon indicating copy to clipboard operation
image copied to clipboard

Implementing yolo v3

Open georoen opened this issue 6 years ago • 7 comments

This PR proposes an updated engine for image.darknet. It:

  • supports yolov3,
  • does not solve #7,
  • is only BETA.

What I did is practically:

  1. clone pjreddie/darknet into inst/include/
  2. copy inst/include/darknet/src into src/
  3. "debugged" some files in src/ by looking at inst/include/darknet/examples/detector.c

The last step however involved changing some pointers. As I may be into R packages, I am new to C and have some questions why. Sometimes I had to just add an &, some other times I had to change &net.w to net->w? Long story short, it would be cool if you take a particular look at the changes in src/__R_API_detector.c, src/__R_API_classifier.c and src/compare.c, before merging.

Best wishes!

georoen avatar Dec 28 '18 19:12 georoen

nice effort and a lot of code changes! if this is the first time you start using C with R you probably took a difficult project :) -> is for accessing object elements and methods of a pointer

Some questions

  • do you also know if pjreddies darknet yolo is now also working fine on windows? of should we use the windows compatible fork
  • on which platform did you test it out
  • do you know if trained models of yolov2 are compatible with yolov3

jwijffels avatar Dec 28 '18 20:12 jwijffels

I'm aware of the scope of this project. So I started slowly by cloning @pjreddie's code, see commit 0255d3c and 372151c, and myself only edited the three C files noted above.

  • I do not know about Windows. Will have to try inside a VM.
  • I build and tested this image.darknet version on Ubuntu 16.04 and 18.04, both R Version 3.5.2.
  • yolov2 works fine, just download the yolov2.weights into system.file(package="image.darknet", "models", "yolov2.weights").

georoen avatar Dec 29 '18 20:12 georoen

Hi @jwijffels, I just checked Windows compatibility today. Both, your and my updated version of image.darknet work on Windows 7 with R 3.5.1, Rtools 3.5 and devtools 2.0.1 installed.

georoen avatar Jan 07 '19 12:01 georoen

Hi @georoen I'll start checking this beginning of february

jwijffels avatar Jan 14 '19 08:01 jwijffels

Hi @jwijffels How are you doing? Will latest YOLO be implemented soon? Best, Jeroen

georoen avatar May 20 '19 09:05 georoen

Had to skip this for the time being due to other priorities. Is there already a yolo v4?

jwijffels avatar May 20 '19 14:05 jwijffels

Hi @jwijffels, sorry for the late responds - this time it was me having other priorities...

Nevertheless, meanwhile there were no changes in the official YOLO repo or website and I guess my pull request is still up to date from this aspect. The other aspect is. that, you will need to merge this PR with your commit #ab7c47a on 6 Feb.

Let me know how it goes. Very best, Jeroen

georoen avatar Aug 06 '19 11:08 georoen