Giter Club home page Giter Club logo

Comments (9)

jwijffels avatar jwijffels commented on August 19, 2024 1

I'm going to look into it at the end of March.

from image.

emoro avatar emoro commented on August 19, 2024 1

I was having the same problem and it seems that image_darknet_detect does not understand the ~ folder. So I changed to

x <- image_darknet_detect(file = "/Users/myuser/Downloads/car.png", object = yolo_tiny_voc, threshold = 0.19)

and it works

from image.

georoen avatar georoen commented on August 19, 2024

Hi @keithhurley,

I can reproduce your problem. I think it is the cache running full. Using the system monitor, you can see an increment being loaded every iteration. As soon as the hardware limitations are exceeded, the R session dies.

@jwijffels do you have an idea how to fix this? I'm working on a pull request coming up for you, including the latest YOLO version and models. However, as the increment is proportional to size of the network, deploying yolov3.weights (248MB) reaches the hardware limitations very fast.
I guess it has something to do with freeing up some variables before returning the number of detected objects into R, but can not tell exactly, as I am not into C.. Simply calling gc() in R does not have any effect...

Till this issue is closed, restarting the R session is the only option to free up your system resources again.

Thank you very much,
best xmas wishes!

from image.

jwijffels avatar jwijffels commented on August 19, 2024

I can confirm the issue. I'll normally work on this in February as I need the function in March for a client. If you have a pull request on yolo v3, would be great!

from image.

georoen avatar georoen commented on August 19, 2024

Hi @jwijffels: As I understand C pointers a little more. Isn't it possible to return the pointer of the cached network with image_darknet_model()(i.e. in a list slot)? Then image_darknet_detect() could reload the network. In that case deploying yolo on a list of images (e.g. with lapply) would be much faster, too. Right?

Best wishes, Jeroen

from image.

contefranz avatar contefranz commented on August 19, 2024

Hi,
unfortunately I can confirm the the bug is still here. I am using a MacBook Pro (2016) but the session crashes as soon as I lunch the function image_darknet_detect(). The code is the following:

library( image.darknet )
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" ) )

Here it crashes and there is nothing I can do about it!

x <- image_darknet_detect( file = "~/Downloads/Baker_Street.jpg", 
                           object = yolo_tiny_voc,
                           threshold = 0.19 )

screen shot 2019-02-21 at 12 34 28

This is the current session:

> sessionInfo()
R version 3.5.2 (2018-12-20)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Mojave 10.14.2

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] image.darknet_0.1.0

loaded via a namespace (and not attached):
[1] compiler_3.5.2 tools_3.5.2   

Any suggestions from the authors on how to solve this?
Thanks

from image.

Gasp34 avatar Gasp34 commented on August 19, 2024

Hi !
Any news ? I can't open yolov3.weights too

from image.

georoen avatar georoen commented on August 19, 2024

Hi @Gasp34,

If you want to experiment with yolov3.weights you can check out my pull-request #10.

It however does not fix this issue #7, which is due insufficient ram management.

Best

from image.

mishahublog avatar mishahublog commented on August 19, 2024

I was having the same problem and it seems that image_darknet_detect does not understand the ~ folder. So I changed to

x <- image_darknet_detect(file = "/Users/myuser/Downloads/car.png", object = yolo_tiny_voc, threshold = 0.19)

and it works

it works

from image.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.