Skip to content

Here we introduce the problem of 3D solids classification with a CNN (spheres and octahedra). We implemented a 3D GradCam model, in order to underline the most relevant 3D volumes useful for classification.

Notifications You must be signed in to change notification settings

lodeguns/Solids-classification-3D-CNN-3D-GradCam

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Solids-classification-3D-CNN-3D-GradCam

Here we introduce the problem of 3D CNN solids classification (spheres and octahedra).

Furthermore, we implemented a 3D GradCam model, in order to underline the most relevant 3D volumes of the original image that are useful for the classification.

Solid Generator

This script generates spheres and octahedra (for the test and training set) depending on the max size of the solid and its diameter. The positions (x,y,z) in the space NxNxN (in this case N=32, but it could be expanded) are given randomly and the voxels intensities inside the solids are chosen randomly in a fixed interval.

python solid_generator.py

Set in your experiment the folders: data_solid, test_solid, labels_solid.

Model and Execution

The problem is so simple that reach the 100% of accuracy in the test set on the 4th epoch.

The model and the training is written in the script_v0.3 on a Jupyter Notebook.

We have done the experiment on a NVIDIA GeForce 1070.

Environment:

Tensorflow version: 1.8.0
Python version: 3.6.7 |Anaconda, Inc.| (default, Oct 23 2018, 19:16:44) 
[GCC 7.3.0]

Test the features

Once you run the model, in the training are saved all the numpy matrices of gradients, weights, etc.. these one could be checked with the script test_feature.py. Whit this script you can walk around the filters and check in which way the CNN works.

python test_feature.py

Such for example here are shown, for a sphere and an octahedron, 2 CNN filters given in the first convolutional layer:

3D Grad Cam

With simple set-ups is possible to visualize (positive-negative) gradients of the last layer on a 3D space.

python plot_gradcam.py

We disclaim any responsibility for this post. It is only an exercise on neural networks in 3D spaces.

@NeuroneLab - University of Salerno

dott. Francesco Bardozzo ([email protected])

dott. Gioele Ciaparrone ([email protected])

dott. Mattia Delli Priscoli ([email protected])

Prof. Roberto Tagliaferri ([email protected])

About

Here we introduce the problem of 3D solids classification with a CNN (spheres and octahedra). We implemented a 3D GradCam model, in order to underline the most relevant 3D volumes useful for classification.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published