GithubHelp home page GithubHelp logo

lcit / ext3dlbp Goto Github PK

View Code? Open in Web Editor NEW
9.0 9.0 3.0 1.61 MB

Extended three-dimensional rotation invariant local binary patterns (LBP), Image and Vision Computing (2017)

License: MIT License

Shell 0.02% C++ 56.57% CMake 0.10% Python 43.32%

ext3dlbp's People

Contributors

lcit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ext3dlbp's Issues

MemoryError

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!

Makefile:160: recipe for target 'all' failed

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

undefined symbol: _ZTIN5boost6python15instance_holderE

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

joint vs concatenate?

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!

To read LIDC-IDRI?

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

python3: malloc.c:4023: _int_malloc: Assertion `(unsigned long) (size) >= (unsigned long) (nb)' failed

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.