I'm able to replicate the instructions at Object detection in just 3 lines of R code using Tiny YOLO and don't have any problems.
This is the R code in the instructions:
#install.packages("devtools") If devtools is not available
# devtools::install_github("bnosac/image", subdir = "image.darknet", build_vignettes = TRUE)
library(image.darknet)
google_car <- tempfile(fileext = ".jpg")
download.file("https://cdn-images-1.medium.com/max/1600/1*vOB-yPySUl_07EU1v7iDpQ.png", destfile = google_car)
yolo_tiny_voc <- image_darknet_model(
type = "detect",
model = "tiny-yolo-voc.cfg",
weights = system.file(package="image.darknet", "models", "tiny-yolo-voc.weights"),
labels = system.file(package="image.darknet", "include", "darknet", "data", "voc.names")
)
x <- image_darknet_detect(
file = google_car,
object = yolo_tiny_voc,
threshold = 0.19
)
And here are my results:
/tmp/RtmpZZgAoN/file30e944fafe77.jpg: Predicted in 3.217825 seconds.
Boxes: 845 of which 4 above the threshold.
person: 24%
car: 96%
person: 40%
bicycle: 50%
Note that image_darknet_detect() has the side effect of writing a file called predictions.png in the working directory:

And my session info:
sessioninfo::session_info()
─ Session info ────────────────────────────────────────────────────────────────────────────────
setting value
version R version 3.4.3 Patched (2018-03-01 r74338)
os Ubuntu 14.04.5 LTS
system x86_64, linux-gnu
ui RStudio
language (EN)
collate en_US.UTF-8
ctype en_US.UTF-8
tz Etc/UTC
date 2018-10-10
─ Packages ────────────────────────────────────────────────────────────────────────────────────
package * version date lib source
assertthat 0.2.0 2017-04-11 [1] RSPM (R 3.4.3)
cli 1.0.0 2017-11-05 [1] RSPM (R 3.4.3)
crayon 1.3.4 2017-09-16 [1] CRAN (R 3.4.0)
curl 3.1 2017-12-12 [1] RSPM (R 3.4.3)
devtools 1.13.5 2018-02-18 [2] CRAN (R 3.4.3)
digest 0.6.15 2018-01-28 [1] RSPM (R 3.4.3)
git2r 0.21.0 2018-01-04 [2] CRAN (R 3.4.3)
httr 1.3.1 2017-08-20 [1] RSPM (R 3.4.3)
igraph 1.1.2 2017-07-21 [1] RSPM (R 3.4.3)
image.darknet * 0.1.0 2018-10-10 [1] Github (bnosac/image@1803a6a)
magrittr 1.5 2014-11-22 [1] RSPM (R 3.4.4)
memoise 1.1.0 2017-04-21 [2] CRAN (R 3.4.3)
miniCRAN * 0.2.11 2018-01-15 [1] RSPM (R 3.4.3)
pkgconfig 2.0.1 2017-03-21 [1] RSPM (R 3.4.3)
R6 2.2.2 2017-06-17 [1] RSPM (R 3.4.3)
rstudioapi 0.7 2017-09-07 [1] CRAN (R 3.4.0)
sessioninfo 1.1.0 2018-09-25 [1] RSPM (R 3.4.3)
withr 2.1.1 2017-12-19 [1] RSPM (R 3.4.3)
XML 3.98-1.9 2017-06-19 [1] RSPM (R 3.4.3)