lcit / ext3dlbp Goto Github PK
View Code? Open in Web Editor NEWExtended three-dimensional rotation invariant local binary patterns (LBP), Image and Vision Computing (2017)
License: MIT License
Extended three-dimensional rotation invariant local binary patterns (LBP), Image and Vision Computing (2017)
License: MIT License
Does the library work only for int32 data type for the 3D array?
I have this function that reads a nifti file and return a niiROI (np.ndarray with float type).
def readNifty(filePath):
image = sitk.ReadImage(filePath)
print("Reading Nifty format from {}".format(filePath))
print("Image size: {}".format(image.GetSize()))
metadata = Metadata(image.GetOrigin(), image.GetSpacing(), image.GetDirection())
# Converting from SimpleITK image to Numpy array. But also is changed the coordinate systems
# from the image which use (x,y,z) to the array using (z,y,x).
volume_zyx = sitk.GetArrayFromImage(image)
volume_xyz = np.transpose(volume_zyx, (2, 1, 0)) #back to the initial xyz coordinate system
print("Volume shape: {}".format(volume_xyz.shape))
print("Minimum value: {}".format(np.min(volume_xyz)))
print("Maximum value: {}".format(np.max(volume_xyz)))
return volume_xyz, metadata # return two items.
When I run this, I have encountered memory error:
(img_3d_NI,img_3d_RD,img_3d_CI) = lbp.convert_3d_image(niiROI) #img3D
MemoryError
Any tips on solving this would be great. Thanks!
Installing OpenCV + Contrib + FFmpeg, such error encountered at the end of make -j8
[ 25%] Built target libprotobuf
CMakeFiles/Makefile2:2452: recipe for target 'modules/core/CMakeFiles/opencv_core.dir/all' failed
make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2
What might be the problem?
Python 3.7.3 (default, Mar 27 2019, 22:11:17)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
import ext3DLBPpy
Traceback (most recent call last):
File "", line 1, in
ImportError: /home/kai/masterthesis/ext3DLBP/python_wrapper/build/ext3DLBPpy.so: undefined symbol: _ZTIN5boost6python15instance_holderE
Hello...
In your paper, the joint of NI/RD shows promising results (classification accuracy hits 94.6% for sample rate: 1, 42) and I'd like to reproduce the method for experiments. However the result of that using the given construct_histograms function, was a 3 dimensional array:
joint_2d = np.outer(hist1,hist2) #Joint: NI/RD
#(52, 12, 12)
While the concatenations are 2 dimensional (which can be fed to classifiers):
concat_of_ni_rd = np.concatenate([hist1,hist2]) #Concatenation: NI+RD, #(52, 24)
concat_of_ni_rd_ci = np.concatenate([hist1,hist2,hist3]) #Concatenation: NI+RD+CI #(52, 36)
What should it be done to make the joint vectors be ready for training? Thanks!
This example below reads .bmp files. To have it read images from LIDC-IDRI, e.g. LIDC-IDRI-0124_GT1_1.nii.gz, this can be done by modifying this function def from_images_to_3D_array(directory, size)? Thanks.
examples/convert_3d_texture_python/main.py
I was testing the model (lbp = ext3DLBPpy.NI_RD_CI_LBP_P42g_R1(mur, V)
) with 50+ nii.gz files. The first 22 files were fine. But when it comes to processing the 23rd file, this error occurred. I have tried different spatial resolution, but the error is the same.
$ python3 test.py
Reading Nifty format from .../training/LIDC-IDRI-0385_GT1_1.nii.gz
Image size: (15, 18, 15)
Volume shape: (15, 18, 15)
Minimum value: 48.0
Maximum value: 2009.0
python3: malloc.c:4023: _int_malloc: Assertion `(unsigned long) (size) >= (unsigned long) (nb)' failed.
Aborted (core dumped)
I have no idea what this error suggests. What might be the problem, do you think? Thanks.
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.