Comments (17)
Got dbscan to work - not a good fit for this as the eps argument is not intuitive for image dimensions
from lime.
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.
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.
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.
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.
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.
Tried dbscan on a whim - crashed my r session for some reason... I’ll keep looking in to it
from lime.
For Grid seams, have you tried with O3 flag?
from lime.
Haven't tried Grid seams at all - currently implementing SLIC in Rcpp
from lime.
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.
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.
I'm thinking about training a classifier using caret
(probably random forest) on the fashion-mnist dataset. Is that ok?
from lime.
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.
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.
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.
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.
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)
- permute_cases: Error arguments imply differing number of rows: 30000, 0
- Dealing with multiple output regression keras model
- Shiny plotOutput with plot_features from the lime package produces nothing
- Use of lime to be used in conjunction with keras model (regression)
- Error when using MLR3 for LIME
- lime/keras image classification: Input must be a vector, not a `superpixel_list` object. HOT 4
- [!] explain() does not work with ordered factors
- Flow ... through to the interactive_text_explanations
- Question about LIME results HOT 1
- Incorrect diagram in "Understanding lime"? HOT 1
- lime predicts other label than CNN
- Error in feature_distribution[[i]] : subscript out of bounds
- Error in cut.default(x[[i]], unique(explainer$bin_cuts[[i]]), labels = FALSE, : invalid number of intervals
- Error in Image Explanation
- Documentation gap concerning usage with additional libraries HOT 1
- Compatibility with tidymodels HOT 2
- Family in glmnet is always gaussian
- Release lime 0.5.3
- Error in combine_vars(data, params$plot_env, vars, drop = params$drop) :
- Allow `plot_features(cases = )` to accept integer indices even when `x` has rownames
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lime.