Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/abailoni/sfb-shape-analysis
https://github.com/abailoni/sfb-shape-analysis
Last synced: 24 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/abailoni/sfb-shape-analysis
- Owner: abailoni
- Created: 2021-04-01T07:39:51.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-06-02T10:43:42.000Z (over 3 years ago)
- Last Synced: 2024-11-05T11:55:25.501Z (2 months ago)
- Language: Python
- Size: 19.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SFB-shape-analysis
### Installation
- Clone the repository: `git clone https://github.com/abailoni/SFB-shape-analysis.git`
- Move to the package directory: `cd SFB-shape-analysis`
- To install the dependencies, you will need [miniconda](https://docs.conda.io/en/latest/miniconda.html) or [conda](https://docs.conda.io/projects/conda/en/latest/user-guide/install/)
- Once you have installed conda, run the command `conda env create --name=shapeAnalysis --file=environment.yml`
- Before to run any of the scripts, activate your new environment with `conda activate shapeAnalysis`
- Install package with `python setup.py install`### How to use the scripts
Scripts can be found in the `scripts` folder. Most of the scripts require two arguments:- `DATA_DIR`: folder including several subfolders, one for each video. Each subfolder is expected to contain .tif files (one for each frame)
- `PROJECT_DIR`: results will be saved into subfolders of this directoryFor example, to run the preprocessing step:
`python scripts/run_preprocessing.py --DATA_DIR= --PROJECT_DIR=`
Then train an ilastik classifier (see below) using the preprocessed images. After the ilastik pipeline has been trained, you can run the full pipeline with the following script (which will also require the arguments `ilastik_path` and `ilastik_project_path`):
`python scripts/run_full_pipeline.py --DATA_DIR= --PROJECT_DIR= --ilastik_path= --ilastik_project_path=`
### Training ilastik classifier
Some useful [ilastik](https://www.ilastik.org/download.html) documentation material:- [Train a pixel classifier with ilastik](https://www.ilastik.org/documentation/pixelclassification/pixelclassification):
- Probably you want to create one ilastik project for each type of images / microscope / focal-length you want to process
- When adding images to the ilastik project, remember to select `tyx` as input format, so the images are interpreted as videos and not 3D volumes
- After you are done with training and painting the labels, in the training step, select the `Suggest Features` option to find the most informative features and possibly make the pipeline more efficient
- [Use ilastik from command line](https://www.ilastik.org/documentation/basics/headless) (see example of usage in `scripts/2_run_ilastik_segmentation.py`)