Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: add standalone pipeline for segmentation #8

Open
KMSmichelle opened this issue Feb 4, 2022 · 5 comments
Open

Feature request: add standalone pipeline for segmentation #8

KMSmichelle opened this issue Feb 4, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@KMSmichelle
Copy link

Bug report

Hi, I tried to follow the steps "https://janeliascicomp.github.io/multifish/QuickStart.html" for installation, i suceed to install Nextflow and Singularity, and clone the repository, and found the "download_dataset.sh" is not available in the current version:

Provided the error:
(multifish_conda) kms102104:~/multifish$ ./setup.sh
Extracting Starfinity model...
./setup.sh: line 18: /home/kms102104/multifish/data-sets/download_dataset.sh: No such file or directory

I wish to try your segmentation tool individually as th overview page intoduced that some of these modules can be executed individually, using alternative main-*.nf scripts in the root project directory. However, i couldnt find "main-segmentation.nf" file in the git. Please help.
Thank you.

Environment

  • EASI-FISH Pipeline version: [2.2.0]
  • Nextflow version: [21.10.6]
  • Container runtime: [Singularity]
  • Platform: [Local]
  • Operating system: [Linux]
@KMSmichelle KMSmichelle added the bug Something isn't working label Feb 4, 2022
@krokicki
Copy link
Member

krokicki commented Feb 4, 2022

Hi, @KMSmichelle ,

Thanks for reporting this, we have fixed the error.

Currently, we don't have a way to run the segmentation alone, but we'll definitely consider adding that for a future release.

As a workaround in the meantime, you could run the main pipeline and skip every step except segmentation:
--skip stitching,spot_extraction,registration,warp_spots,measure_intensities,assign_spots

You'll would just need to stage your input data into the stitching/acq_name/export.n5 directory, which is where the segmentation step expects it. I recommend running the demo_tiny test so that you can see what the file structure looks like, and then mimic that.

Best regards,
Konrad

@krokicki krokicki added enhancement New feature or request and removed bug Something isn't working labels Feb 4, 2022
@krokicki krokicki changed the title setup failed Feature request: add standalone pipeline for segmentation Feb 4, 2022
@issuelabeler issuelabeler bot added the bug Something isn't working label Feb 4, 2022
@krokicki krokicki removed the bug Something isn't working label Feb 4, 2022
@KMSmichelle
Copy link
Author

Thanks @krokicki , I tried ./setup.sh and it works !
Thanks for the suggestion, I am trying "demo_tiny.sh" without skipping any step, to understand the whole workflow, but I met another error , see #9

@wangyuhan01
Copy link
Collaborator

Hi, @KMSmichelle ,

Thanks for your interest in the pipeline! You should be able to run segmentation independently on a workstation with gpu.

Starfinity can be installed directly with pip.
pip install git+https://github.com/mpicbg-csbd/stardist@refinement

For testing segmentation with our model, you can download our model here. And you can run the attached .py code to generate predictions (tif files work fine). If you would like to train your own model, please also install Augmend and gputools (optional).

Hope this helps!
starfinity_prediction.py.zip

Best,
Yuhan

@KMSmichelle
Copy link
Author

KMSmichelle commented Feb 28, 2022 via email

@wangyuhan01
Copy link
Collaborator

Hi Michelle,

Depending on the type of augmentation you would like to do, you may change the function to something like this. Please refer to Augmend for details of these function.

from augmend import Augmend, FlipRot90, Elastic, IntensityScaleShift, AdditiveNoise

def augmenter(x,y):
        aug = Augmend()
        aug.add([FlipRot90(axis=(1,2)),FlipRot90(axis=(1,2))])
        aug.add([IntensityScaleShift(scale_range=(.5,2), shift_range=(-.5,.5)),Identity()])
        aug.add([Elastic(axis = (0,1,2),amount=6, grid =6, order=0, use_gpu = True),
                 Elastic(axis = (0,1,2),amount=6, grid =6, order=0, use_gpu = True)],
                probability=.8)
        aug.add([AdditiveNoise(sigma=0.03),Identity()], probability=.5)
        
        return aug([x,y])

Also in model.train(X_trn, Y_trn, validation_data=(X_val,Y_val), augmenter=augmenter)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

3 participants