Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.9%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

Basic Info
  • Host: GitHub
  • Owner: peng-lab
  • License: mit
  • Language: Python
  • Default Branch: main
  • Size: 2.78 MB
Statistics
  • Stars: 0
  • Watchers: 0
  • Forks: 1
  • Open Issues: 5
  • Releases: 0
Created almost 2 years ago · Last pushed about 1 year ago
Metadata Files
Readme Contributing License Code of conduct Citation

README.md

LSFM DeStripe PyTorch

Build Status Documentation Code Coverage

A PyTorch implementation of LSFM DeStripe method


Quick Start

Use as Python API

(1) Provide a filename, run slice by slice (suitable for extremely large file) suppose we have a to-be-processed volume saved in data_path with vertical stripe in it ```python from lsfm_destripe import DeStripe

exe = DeStripe() ###to run with default parameters for training out = exe.train( X1=datapath, isvertical=True, angleoffset=[0], mask=maskpath, ) where the volume in `mask_path` is to specifically indicate structures that are to be reserved after processing, left out can run prue DeStripe without constraint, `is_vertical` is to define whether the stirpes, or say the direction of light sheet propagation is along vertical or horizona. In practice, the stripe maight not be strictly vertical/horizontal, thus the angle offset in degree can be defined in `angle_offset`. Moreover, for multi-directional LSFM, for example Ultramicroscope II, Lavision Biotec. whose outputs exhibit stripes in 3 directions, -10 degrees, 0 degress, and 10 degrees, DeStripe can also remove all the stripes at the same time by runing: python out = exe.train( X1=datapath, isvertical=True, angleoffset=[-10, 0, 10], mask=maskpath, ) Alternatively, DeStripe can be initialized with user-defined train parameters, a full list of input arguments in `__init__` is here: losseps: float = 10 qr: float = 0.5 resampleratio: int = 3 GFkernelsizetrain: int = 29 GFkernelsizeinference: int = 29 hessiankernelsigma: float = 1 samplinginMSEloss: int = 2 isotropichessian: bool = True lambdatv: float = 1 lambdahessian: float = 1 inc: int = 16 nepochs: int = 300 wedgedegree: float = 29 nneighbors: int = 16 fastGF: bool = False requireglobalcorrection: bool = True fusionGFkernelsize: int = 49 fusionGaussiankernel_size: int = 49 device: str = None ```

(2) Provide a array, i.e., the image to be processed, and necessary parameters (more suitable for small data or for use in napari) suppose we have a to-be-processed volume img_arr that has been read in as a np.ndarray or dask.array.core.Array and has vertical stripes in it ```python from lsfm_destripe import DeStripe

run with default training params

out = DeStripe.trainonfullarr( X=imgarr, isvertical=True, angleoffset=[0], mask=maskarr, device="cuda", ) `` whereimgarrhas a size of $S \times 1 \times M \times N$,maskarrhas a size of $S \times M \times N$ with element 1 and 0 giving reserve or not respectively,deviceby default is "cpu". Also, customized training can be done by wrapping the training params that you'd like to change as a Dict.: ``python from lsfmdestripe import DeStripe

out = DeStripe.trainonfullarr( X=imgarr, isvertical=True, angleoffset=[0], mask=maskarr, device="cuda", trainparams = {"resample_ratio": 3}, ) ```

Run from command line for batch processing

suppose we have a to-be-processed volume saved in /path/to/my/image.tiff and it has vertical stripes, and we'd like to save the result from DeStripe as /path/to/save/result.tif bash destripe --X1_path /path/to/my/image.tiff \ --is_vertical True \ --angle_offset 0 \ --save_path /path/to/save/result.tif in addition, all the training parameters can be changed in command line: bash destripe --X1_path /path/to/my/image.tiff \ --is_vertical True \ --angle_offset 0,-10,10 \ --save_path /path/to/save/result.tif a full list of changeable args: usage: run_destripe --X1_path --save_path --is_vertical --angle_offset [--loss_eps 10] [--qr 0.5] [--resample_ratio 3] [--GF_kernel_size_train 29] [--GF_kernel_size_inference 29] [--hessian_kernel_sigma 1] [--sampling_in_MSEloss 2] [--isotropic_hessian "True"] [--lambda_tv 1] [--lambda_hessian 1] [--inc 16] [--n_epochs 300] [--wedge_degree 29] [--n_neighbors 16] [--fast_GF "False"] [--require_global_correction "True"] [--fusion_GF_kernel_size 49] [--fusion_Gaussian_kernel_size 49] [--X2_path None] [--mask_path None] [--boundary None] [--save_path_top_or_left_view None] [--save_path_bottom_or_right_view None]

Installation

Stable Release: pip install lsfm_destripe
Development Head: pip install git+https://github.com/peng-lab/lsfm_destripe.git

Development

See CONTRIBUTING.md for information related to developing the code.

MIT license

Owner

  • Name: peng-lab
  • Login: peng-lab
  • Kind: organization

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
preferred-citation:
  type: conference-paper
  authors:
  - family-names: "Liu"
    given-names: "Yu"
    orcid: "https://orcid.org/0000-0000-0000-0000"
  - family-names: ""
    given-names: "Hew"
    orcid: "https://orcid.org/0000-0000-0000-0000"
  doi: "10.0000/00000"
  month: 9
  start: 1 # First page number
  end: 10 # Last page number
  title: "My awesome research software"
  issue: 1
  volume: 1
  year: 2021

GitHub Events

Total
  • Issues event: 3
  • Push event: 10
  • Public event: 1
  • Pull request review event: 1
  • Pull request event: 2
  • Fork event: 1
  • Create event: 3
Last Year
  • Issues event: 3
  • Push event: 10
  • Public event: 1
  • Pull request review event: 1
  • Pull request event: 2
  • Fork event: 1
  • Create event: 3

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 1
  • Total pull requests: 1
  • Average time to close issues: 6 days
  • Average time to close pull requests: 6 days
  • Total issue authors: 1
  • Total pull request authors: 1
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 1
  • Average time to close issues: 6 days
  • Average time to close pull requests: 6 days
  • Issue authors: 1
  • Pull request authors: 1
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • yuliu96 (1)
  • jxchen01 (1)
Pull Request Authors
  • yuliu96 (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 95 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 2
  • Total maintainers: 1
pypi.org: lsfm-destripe

DeStripe module in Leonardo toolset for LSFM destriping

  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 95 Last month
Rankings
Dependent packages count: 9.9%
Average: 32.8%
Dependent repos count: 55.8%
Maintainers (1)
Last synced: 9 months ago