Giter Club home page Giter Club logo

Comments (17)

thomasp85 avatar thomasp85 commented on August 24, 2024 1

Got dbscan to work - not a good fit for this as the eps argument is not intuitive for image dimensions

from lime.

thomasp85 avatar thomasp85 commented on August 24, 2024 1

Sorry about being slow on this - I'll begin working on lime again soon and will get back to you on the image explanation part

from lime.

thomasp85 avatar thomasp85 commented on August 24, 2024

Wow - the superpixel implementation is really slow, mainly due to k-means being slow with the required number of clusters. I'll try to play with some alternative clustering algorithms to see if it can be speed up...

from lime.

thomasp85 avatar thomasp85 commented on August 24, 2024

Hmm... An alternative algorithm to SLIC is Grid Seams (http://ieeexplore.ieee.org/document/6816834/) - a C++ implementation is available for inspiration: https://github.com/richarddlu/grid_seams

from lime.

thomasp85 avatar thomasp85 commented on August 24, 2024

Another possibility is to improve upon SLIC. The main bottleneck is the k-means algorithm, but it seems there's no need to consider all pixels simultaneously as we know that pixels belonging to the same cluster is located spatially close to each other...

from lime.

pommedeterresautee avatar pommedeterresautee commented on August 24, 2024

I have not tried anything applied to image and Lime, but currently I am playing with dbscan on another project. Would it mak things better? (perf are super good and there is only 1 reaured hyper parameter which can be the minimal size of a block, very handy)

from lime.

thomasp85 avatar thomasp85 commented on August 24, 2024

Tried dbscan on a whim - crashed my r session for some reason... I’ll keep looking in to it

from lime.

pommedeterresautee avatar pommedeterresautee commented on August 24, 2024

For Grid seams, have you tried with O3 flag?

from lime.

thomasp85 avatar thomasp85 commented on August 24, 2024

Haven't tried Grid seams at all - currently implementing SLIC in Rcpp

from lime.

expectopatronum avatar expectopatronum commented on August 24, 2024

Hi @thomasp85, is there any way how I could contribute to this issue? (I'll also gladly create test cases or later on a demo notebook/tutorial since I have no experience with Rcpp...)

from lime.

thomasp85 avatar thomasp85 commented on August 24, 2024

If you have an image classifier and some test images to share it would help greatly - I already have most of the framework set up but as I doesn’t really do any image classification myself it’s hard to make a proper test

from lime.

expectopatronum avatar expectopatronum commented on August 24, 2024

I'm thinking about training a classifier using caret (probably random forest) on the fashion-mnist dataset. Is that ok?

from lime.

thomasp85 avatar thomasp85 commented on August 24, 2024

I think we'll probably need some larger, more complex images? - have you seen the article and the use cases they have there?

But then again, I know next to nothing about image classification...

from lime.

expectopatronum avatar expectopatronum commented on August 24, 2024

Yes I saw it, but so far I couldn't figure out which dataset he was using. He also has an example using MNIST data. Do you know of any more interesting image datasets? Maybe the CIFAR-10 dataset is more interesting?

from lime.

expectopatronum avatar expectopatronum commented on August 24, 2024

I managed to train a tensorflow model on the CIFAR dataset, because with caret it never finished (I tried random forest and neural nets), maybe the data is too big. The model performance is not good yet but I was able to define predict_model and model_type in a way that it is recognized by explain. I'm pretty sure predict_model could/should be improved. But if you're interested I can show it to you and you can use the model for testing. Meanwhile I can try to improve the accuracy of the classifier.

from lime.

AdamSpannbauer avatar AdamSpannbauer commented on August 24, 2024

Hi. I installed the image branch to see how its current state would work with one of the pretrained models shipped with keras.

I ran into an error (which might be totally expected in the current state of the dev), and I thought I'd share my script here in case it aids the dev process at all. The script I used is here, where I attempted to use lime to explain predictions created by the pretrained VGG19 imagenet weights.

I created the 'image_explainer' object w/o error (I'm not sure how to verify if it was created correctly). There was an error when calling lime:::explain.imagefile: Error in ``*tmp*``[4, , ] : subscript out of bounds. The error occurs in line 59 of image.R; the first dimension value is 3 when running with the image_explainer created in my script.

Without exploration I changed the index in the line from 4 to 3 to see if it would work with dumb luck. It then ran into error in line 71 where it seems as if the perm matrix dimensions are transposed from what they should be for the colnames assignment to work.

Not sure if any of this helps, but I'd be more than happy to help if there's any additional exploration needed for the dev of the image features in this version of lime.


Edit: I've realized that some issues I'm running into might stem from creating the explainer with only one observation. I will recreate with more observations and see if the issues persist.

from lime.

AdamSpannbauer avatar AdamSpannbauer commented on August 24, 2024

No worries. Just wanted to share in case it helped dev in any way. I was/am excited to play with the new functionality in the R version; no rush on the dev process. Great work so far.

from lime.

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.