GithubHelp home page GithubHelp logo

gtrancourt / microct-leaf-traits Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 1.0 27.8 MB

Functions to segment plant leaves microCT scans into distinct tissues and to extract anatomical data and other functional traits.

License: MIT License

Python 60.32% Jupyter Notebook 39.68%

microct-leaf-traits's People

Contributors

gtrancourt avatar

Forkers

daveb-dev

microct-leaf-traits's Issues

Leaf traits analysis: Opening fullstack predictions with negative values

Opened full stack predictions with negative values. E.g.:

np.unique(raw_pred_stack[100])
[-103  -52   -1    0   51  102]

I don't know what might have caused this, but managed to get rid of this error when re-saving the file in ImageJ. If this happens, an error message will be printed and the program will stop.

Error in `Load_Resize_and_Save_Stack` in python 3

Traceback (most recent call last):
  File "/home/gtrancourt/Dropbox/_github/microCT-leaf-traits/Leaf_Segmentation_py3.py", line 101, in <module>
    gridrec_stack = Load_Resize_and_Save_Stack(filepath, grid_name, rescale_factor)
  File "/home/gtrancourt/Dropbox/_github/microCT-leaf-traits/Leaf_Segmentation_Functions_py3.py", line 1024, in Load_Resize_and_Save_Stack
    stack_rs = np.empty(np.array(stack.shape)/np.array([1, rescale_factor, rescale_factor]))
TypeError: 'numpy.float64' object cannot be interpreted as an integer

Full stack prediction error: Input contains NaN, infinity or a value too large for dtype('float32').

Dont' know what caused this yet. Waiting for it to rehappen.

  File "/home/gtrancourt/Dropbox/_github/microCT-leaf-traits/Leaf_Segmentation_py3.py", line 148, in <module>
    rf_transverse, gridrec_stack, phaserec_stack, localthick_stack, "transverse")
  File "/home/gtrancourt/Dropbox/_github/microCT-leaf-traits/Leaf_Segmentation_Functions_py3.py", line 436, in RFPredictCTStack
    class_prediction_transverse = rf_transverse.predict(FL_reshape)
  File "/home/gtrancourt/anaconda2/envs/py37/lib/python3.7/site-packages/sklearn/ensemble/forest.py", line 543, in predict
    proba = self.predict_proba(X)
  File "/home/gtrancourt/anaconda2/envs/py37/lib/python3.7/site-packages/sklearn/ensemble/forest.py", line 583, in predict_proba
    X = self._validate_X_predict(X)
  File "/home/gtrancourt/anaconda2/envs/py37/lib/python3.7/site-packages/sklearn/ensemble/forest.py", line 362, in _validate_X_predict
    return self.estimators_[0]._validate_X_predict(X, check_input=True)
  File "/home/gtrancourt/anaconda2/envs/py37/lib/python3.7/site-packages/sklearn/tree/tree.py", line 377, in _validate_X_predict
    X = check_array(X, dtype=DTYPE, accept_sparse="csr")
  File "/home/gtrancourt/anaconda2/envs/py37/lib/python3.7/site-packages/sklearn/utils/validation.py", line 573, in check_array
    allow_nan=force_all_finite == 'allow-nan')
  File "/home/gtrancourt/anaconda2/envs/py37/lib/python3.7/site-packages/sklearn/utils/validation.py", line 56, in _assert_all_finite
    raise ValueError(msg_err.format(type_err, X.dtype))
ValueError: Input contains NaN, infinity or a value too large for dtype('float32').

Error with 3 layers stacks created by ImageJ

An error occurs sometimes when ImageJ generates an 8-bit image that seems to have only one color layer, but that is imported as 3 layers in python.

Traceback (most recent call last):
  File "/home/guillaume/Dropbox/_github/microCT-leaf-traits/Leaf_Segmentation_py3.py", line 93, in <module>
    filepath, label_name, rescale_factor, labelled_stack=True)
  File "/home/guillaume/Dropbox/_github/microCT-leaf-traits/Leaf_Segmentation_Functions_py3.py", line 1026, in Load_Resize_and_Save_Stack
    stack, to_trim = Trim_Individual_Stack(stack, rescale_factor, labelled_stack)
  File "/home/guillaume/Dropbox/_github/microCT-leaf-traits/Leaf_Segmentation_Functions_py3.py", line 931, in Trim_Individual_Stack
    1, 3), np.repeat(2, 3)])#, np.repeat(3, 3), np.repeat(4, 3), np.repeat(5, 3)])
ValueError: operands could not be broadcast together with shapes (4,) (3,3) 

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.