Coder Social home page Coder Social logo

Comments (6)

stlou avatar stlou commented on July 24, 2024 3

Hey! That seemed to work! Will play around with the app and see if I run into anything else, but thanks so much for your help!

If anyone else runs into this problem -- here's what I had to do:

  1. While in the ml4a master directory, run setup.sh. This should populate the directory with a bunch of files, including image-net-2012.sqlite3, our pesky culprit.
  2. In ofApp.cpp, remove ofToDataPath() from line 22 (I removed it from line 20, too, just to make sure). So, that line now reads: ccv.setup("../../../../data/image-net-2012.sqlite3");
  3. I was actually still getting an error, and realized that the image-net-2012.sqlite3 file was still in the ml4a master directory, and not in the data directory as expected. So, I just moved the file into the data directory.

This might be a bit of a hack, but it got the app up and running for me! Looking forward to playing with it.

from ml4a-ofx.

genekogan avatar genekogan commented on July 24, 2024 1

if you are compiling from source, the location depends on whether the #RELEASE flag is defined as you'll see in ofApp -- there's some weirdness with the new macs not interpreting relative paths the same way as before. we'll need to reevaluate this because the paths have been giving us trouble for a while now.

from ml4a-ofx.

stlou avatar stlou commented on July 24, 2024

I noticed this same problem, and it seems like you've already fixed the line on ofApp.cpp to reflect the change that HerrBertling mentioned. I ran the shell script as referenced, but when I go to Add Samples in the app, the app crashes and I'm still getting the error in the console:

[ error ] Can't find network file ../../../data/../../../../data/image-net-2012.sqlite3 [notice ] Adding samples...

Any ideas why this might still be happening?

(sorry if it's too much to be raising issues on multiple threads, but obviously just started playing around with these OF apps, and would love to get them working on my machine)

from ml4a-ofx.

stlou avatar stlou commented on July 24, 2024

Not sure if this could be the source, but the only other relevant place where I could find the ../../../data that's concatenated on to the beginning of the correct path (../../../../data/image-net-2012.sqlite3) is in the ofUtils.cpp file from Open Frameworks.

In that file, starting at L64:

string defaultDataPath(){
    #if defined TARGET_OSX
        try{
            return std::filesystem::canonical(ofFilePath::join(ofFilePath::getCurrentExeDir(),  "../../../data/")).string();
        }catch(...){
            return ofFilePath::join(ofFilePath::getCurrentExeDir(),  "../../../data/");
        }

Since I'm using OSX, I thought this could maybe be part of the issue. Based on my uneducated look at what this snippet of code is doing, it doesn't seem like it's the culprit, but is the only place I could find that might be connected with the faulty path.

Maybe this helps, maybe it's nothing.

from ml4a-ofx.

genekogan avatar genekogan commented on July 24, 2024

try to remove the ofToDataPath in the link to the sql file or provide it an absolute path. i'm not exactly sure what's going wrong here.

from ml4a-ofx.

genekogan avatar genekogan commented on July 24, 2024

this may also be caused by newer macs running translocation on all applications. if you run the setup script setup.sh first that will fix this, or moving the application to another folder, then moving it back will also give it access back to the files.

from ml4a-ofx.

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.