-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Explainable output model #7
Comments
Reader of the future, skip this post, as it's a waste of time Alright, I've had a quick go at making this work in an independent container, before I decide how to plug this into this repo. This Dockerfile should work:
Build this with something like:
Then on the host system, clone that repo:
Next run it with:
Then inside the image run:
On the first run, this should start downloading a whole load of models to the In another terminal, get the container ID with
I moved this into the same folder as the Dockerfile, and just bundled these into the image, by appending this line to the Dockerfile:
then rebuild it with the same build command as above. Re-run the container with the modfied image, and executing the script:
I moved from a
However, even after upgrading the memory, the command still gives:
That's all for now.... |
This repo claims to fix this: https://github.com/PowerOfCreation/keras-grad-cam However, I now see:
|
hi, did you try to add at the begin: |
I'll try this shortly and update the thread. In the meantime can you explain to me what the overall usage of this part would be like. With the current (YOLOv3) conversion we do something like:
I'm trying to figure out what this new method does exactly. Take this example from the README: Would the equivelant conversion for this be:
Or am I misunderstanding? What is this actually supposed to do, strictly from a user's perspective: What are you feeding the API and what do you want back? |
Hi @vulcan25 , the idea behind is to have another API method, user can call to collect the output of the explicable keras model, mostly for debugging to have an insight about model performance. As usage perspective, it could be desiderable to have a separate endpoint method to call, witch will respond including the computed heatmapped images stored into Redis DB. Example:
Thx |
Okay, and in that case I'm really struggling to get this running in docker though, even just the bare example:
Have you had any sucess making this work in Docker? |
|
@vulcan25 Think this can help https://github.com/ryoasu/grad-cam?files=1 there’s a Docker file as well |
This was the one ! I've got that running, and converting images. Give me a few days to tie this in to our repo. I plan to do some slight re-strucutring first. |
@simonfreeman80 See this commit for the 're-structuring' i mentioned: b239681 Probably best familiarise yourself with that (although it shouldn't make a difference to you really) any queries on that, please log a separate issue. grad-cam integration is looking good so stay tuned for a further update. |
HI @vulcan25, unable to use Docker, but I'm trying to run on my Anaconda local env (CPU, no CUDA) I'm getting this warning: I'm still trying to figure it out how to use our original model YOLOv3) that's the scope, cause there's no point to use the vgg16 one. I'll try to port the code in the simple image detect code. |
Lots of the stuff in that repo seemed to relate to config loading, so I forked it and made some changes: https://github.com/vulcan25/grad-cam You should be able to install with:
Or clone it, then from a python interpreter in the grad-cam folder:
See the bottom of grad_cam/gy.py for the example usage:
Save the generated images with:
Notice at the top of this file I set some parms:
I'm not sure if you could swap these with the path to your Perhaps this usage and both of those functions are relevant. Is that what's referred to as the model definition? However here's the info I get back from the return of the The heatmap value for each like:
The cam value for each like:
I'm also seeing this output in the terminal, so I'm not sure if I need to capture that and return it also:
I had this problem, so moved from a 4GB RAM system to 8GB. What spec is your machine? |
I'm really stuck on this part. Hopefully you can make some discovery here. See this commit on the This has lead me to errors like:
I'm starting to think this first model isn't compatible with the grad cam stuff, but maybe I'm not understanding how the keras stuff works fully. Hopefully the info I've put here gets you closer to a solution. I may need to invest some time in other projects, but will keep an eye on this for any developments. If you can make the grad cam script work with your model, I'd be more than happy to tie this into the main repo . Good luck! |
Hi @vulcan25 , thx so much for your help and effort: I'll surely dive in to run some exaustive tests about GradCam on Yolov3. Apparently seems not to be that easy! |
Hi @vulcan25, I'm looking for a possible methods to integrate an explicable output for Keras-YOLO model, so basically alongside boundary boxes, the "activation" areas witch fires the CNN.
I was looking this:
https://github.com/jacobgil/keras-grad-cam
Just want to share with you, I'll start do some experiment in the weekend...
Take care
Thx
The text was updated successfully, but these errors were encountered: