csailvision / netdissect Goto Github PK
View Code? Open in Web Editor NEWNetwork Dissection http://netdissect.csail.mit.edu for quantifying interpretability of deep CNNs.
License: MIT License
Network Dissection http://netdissect.csail.mit.edu for quantifying interpretability of deep CNNs.
License: MIT License
since python 2 has stopped support, so will there be plans to update the code to python3?
Where should I put the cloned repo inside the compiled caffe folder in order not to get the import error of no module named caffe?
I have already matcaffe and pycaffe compiled in that folder.
the function globexists is missing from rundissect_pytorch_external.sh:
./script/rundissect_pytorch_external.sh: line 209: globexists: command not found
it does exist, however, in rundissect.sh
In upsample.py
line 352, the step size (3rd param) passed to np.arange
is 0, yielding a ZeroDivisionError
. This is caused by t
having value 1, and reduction
having value 2: 1 // 2 = 0
. The fieldmap is ((0,0), (4,4), (1,1))
.
The conv layer that is being analyzed has a 4x4 kernel, 4 output channels, and a stride of 1. Its input size is 3x120x120, the output size is 4x117x117.
I am going to debug this further but just wanted to share this already.
@lingeo writes: I ran the code just as the readme shown, while i got this srror:
Traceback (most recent call last):
File "src/labelprobe.py", line 306, in
parallel=args.parallel)
File "src/labelprobe.py", line 101, in label_probe
thresh, labelcat, batch_size, ahead, verbose, parallel)
File "src/labelprobe.py", line 134, in fast_process
result.get(31536000)
File "/usr/lib/python2.7/multiprocessing/pool.py", line 558, in get
raise self._value
TypeError: call() got an unexpected keyword argument 'grid'
Is there anything wrong with my python2.7? or should I use the python3.5? and why?
FileNotFoundError: [Errno 2] No such file or directory: 'dataset/broden1_224/index_sm.csv'
How can I identify a concept in an image? I want to debug the dataset to understand the concepts labelled for each image, but I couldn't find a simple way.
I know that the CSV files in the dataset folder index for each image and its concepts (part, object, etc.). But I couldn't find a way to see the label concept in an image; for example, I'd like to know which image has the wheel part concept. Can I identify this using only the CSV files? If not, could you tell me where in the code can I extract this information?
Hi! When I was trying to download the BRODEN dataset as instructed, I got "connection refused" error. Neither can I access the project page for further information at http://netdissect.csail.mit.edu. Is there any way to get these data and info?
Running the default script script/rundissect_pytorch.sh
fails for the generating view step with the following error traceback:
Writing imgmax
ls: cannot access probes/pytorch_alexnet_imagenet/html/features.html: No such file or directory
Generating views
features
Adding tallys of unit/label alignments.
Generating html summary probes/pytorch_alexnet_imagenet/html-features.html
Sorting units by score.
Visualizing features unit 114
Traceback (most recent call last):
File "src/viewprobe.py", line 429, in
verbose=True)
File "src/viewprobe.py", line 112, in generate_html_summary
imsave(self.ed.filename(['html', imfn]), tiled)
File ".../anaconda2/lib/python2.7/site-packages/scipy/misc/pilutil.py", line 199, in imsave
im.save(name)
File ".../anaconda2/lib/python2.7/site-packages/PIL/Image.py", line 1823, in save
fp = builtins.open(filename, "w+b")
IOError: [Errno 2] No such file or directory: 'probes/pytorch_alexnet_imagenet/html-image/features-0114.jpg'
The directory html-image
does not even exist in the generated file structure. What does exist is:
probes/pytorch_alexnet_imagenet/html/image
. The last two directories are empty.
I'm trying to run resnet152 trained on ImageNet using the python wrapper provided in the repository with the standard settings but the results are not the same as in the paper. Any suggestions for that.
This framework works perfectly! I was wondering if this framework can possibly examine the VGG16 trained on the cifar10 dataset?
Hi,
Where in the code did you remove the mean and divide images by the std?
I could not find this. If it's missing - this could be a potential bug.
Hi, I try to run net-dissect-lite on win10. pytorch 1.9.0, torchvision0.10.0,
I run it through python main.py, but I encountered an error "OverflowError: timeout value is too large" when extracting features.
The screenshot of the specific error is as follows. I spent a long time to find the relevant solution, but it was not successful.
I guess through the above error message "file missing, loading from scratch" whether it may be caused by mmap_files and mmap_max_files not being generated correctly. I will be very grateful if you can help
In rundissect_pytorch.sh
the predefined string for WEIGHTS
is set to none
which in turn is not interpreted as None
by the argument parser. This results in an error on loading the network weights.
script/rundissect_pytorch.sh: line 199: globexists: command not found
Generating graph
Traceback (most recent call last):
File "src/graphprobe.py", line 114, in
stats = summarize(loadviz(directory, blob), args.threshold,
File "src/graphprobe.py", line 20, in loadviz
with open(html_fn) as f:
IOError: [Errno 2] No such file or directory: 'probes/pytorch_alexnet_imagenet/html-features.html'
Hi,
I tried your toolbox using my trained model and your broden dataset. I ran rundissect.sh, and I finally got this:
Traceback (most recent call last):
File "src/report.py", line 425, in
verbose=True)
File "src/report.py", line 45, in generate_html_summary
save=ed.filename('html/' + barfn))
File "/home/cc/NetDissect-release1/src/bargraph.py", line 106, in bar_graph_svg
barheight, barwidth, show_labels, filename)
File "/home/cc/NetDissect-release1/src/bargraph.py", line 110, in make_svg_bargraph
unitheight = float(barheight) / max(heights)
ValueError: max() arg is an empty sequence
Do you know how to fix this problem? Thank you.
b.t.w. there is no html folder under NetDissect.
Hello everyone,
I would like to understand why the selected threshold value (0.04) in the paper is low? For such a low value, sometimes even random excitation can achieve that IOU right?
NetDissect/src/netprobe_pytorch.py
Line 19 in 6c6fc51
Line 19-21 and 32-33 can be removed without harming the functionality.
Traceback (most recent call last):
File "src/netprobe_pytorch.py", line 291, in
split=args.split, cl_args=args, verbose=True)
File "src/netprobe_pytorch.py", line 52, in create_probe
data = loadseg.SegmentationData(args.dataset)
File "/home/czy/NetDissect/src/loadseg.py", line 63, in init
self.image = [decode_index_dict(r) for r in DictUnicodeReader(f)]
File "/home/czy/NetDissect/src/unicsv.py", line 48, in init
self.reader = csv.DictReader(f, dialect=dialect, **kwds)
File "/home/czy/.conda/envs/python36/lib/python3.6/csv.py", line 87, in init
self.reader = reader(f, dialect, *args, **kwds)
TypeError: argument 1 must be an iterator
Anyone want to do interpretable research on deep learning? Let's add a friend to have a detailed chat.
Hello,
I have a model prepared in Caffe2 framework, trained on a different dataset. I have a .pk file with me. How can I use network dissection to know the information from middle layers using my model.
Suppose we load the names of the "label" column of the generated csv file into the array label, is the number of unique semantic detectors equal to length(unique(label))?
Also, would it be possible to release the script and data to generate Fig.7 and Fig.8 of the paper? Thanks.
@quantombone @adikhosla @metalbubble @andrewowens @visionATcsail Hi thanks for sharing the code , i am having few queries
Thanks in advance
LAYERS is set to "features" in the default rundissect_pytorch.sh, and after run rundissect_pytorch.sh, I will see the visualized results about the all 256 units from probes/pytorch_alexnet_imagenet/features.html.
My question is if I want to see the scores of the first conv layer in network(such as alexnet) with 64 units, what should I do.
If I need to make some changes to LAYERS in rundissect_pytorch.sh or do something else?
I would be appreciate if the author could clear my confusion.
THANKS!
Hi, how much work would it be to create a 299 version of the broden dataset (to complement the existing 224, 227, 384)? I was hoping it would be as easy as adding a few lines to the makebroden.sh
script but I'm not sure (due to the annotations making things a little more complicated, and I don't know what joingseg does).
If someone is able to provide a quick explanation of what steps to take, I would be happy to do them myself, and then make PR if it would be helpful for others. Quite a few popular models use the larger image size.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.