Giter VIP home page Giter VIP logo

deepimagej-plugin's Introduction

GitHub All Releases GitHub release (latest SemVer) GitHub

DeepImageJ

The ImageJ plugin to run deep-learning models

DeepImageJ is a user-friendly plugin that enables the use of a variety of pre-trained deep learning models in ImageJ. The plugin bridges the gap between deep learning and standard life-science applications. DeepImageJ runs image-to-image operations on a standard CPU-based computer or on a GPU, and does not require any deep learning expertise.

Start using it with the guidelines in the Wiki.

Find further information about DeepImageJ environment at https://deepimagej.github.io

Conditions of use

The DeepImageJ project is an open source software (OSS) under the BSD 2-Clause License. All the resources provided here are freely available.

As a matter of academic integrity, we strongly encourage users to include adequate references whenever they present or publish results that are based on the resources provided here.

References

@article{gomez2021deepimagej,
  title={DeepImageJ: A user-friendly environment to run deep learning models in ImageJ},
  author={G{\'o}mez-de-Mariscal, Estibaliz and Garc{\'i}a-L{\'o}pez-de-Haro, Carlos and Ouyang, Wei and Donati, Laur{\`e}ne and Lundberg, Emma and Unser, Michael and Mu{\~{n}}oz-Barrutia, Arrate and Sage, Daniel},
  journal={Nature Methods},
  year={2021},
  volume={18},
  number={10},
  pages={1192-1195},
  URL = {https://doi.org/10.1038/s41592-021-01262-9},
  doi = {10.1038/s41592-021-01262-9}
}

deepimagej-plugin's People

Contributors

carloscj18 avatar carlosuc3m avatar crtorreg avatar ctrueden avatar deepimagej avatar esgomezm avatar ivan-ea avatar lmoyasans avatar mkitti avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

deepimagej-plugin's Issues

Path issue

Hello,

I'm trying to run this plugin that looks quite interesting, unfortunately the models folder isn't properly recognized. The path is: /home/user/.opt/Fiji.app//models instead of /home/user/.opt/Fiji.app/models. And no models are recognized (model folders are present).

I tried building the project after modifying this line to remove the extra separator, but I get a Class not found error instead when accessing the plugin in Fiji menu (probably a misstep in the build).

BTW, there are no build instructions, and the build config expects you to have ImageJ/ and Fiji/ in a Desktop/ folder, so I had to comment those line (and copy the files manually after of course). Please add build instructions in the README.

Note : I think it would be best if dist/ and the final zip file were not committed, as they can be produced from source code, and it's bad practice to track the compiled files (also it makes the repo heavy unnecessarily and clutters the history).

I'm running Archlinux, with Fiji with ImageJ 1.52p Java 1.8.0_66 :)

Cheers,
~Nico

Error loading PyTorch Model

Recently,I wanna use LiveCellSegmentationBoundaryModel to analyze my cell images. However, when I click on Plugin>DeepImageJ>DeepImagJ Run, I got a popup warning:
1686663016742
Then, when I try to run on the example image, I got an popup again:
1686663153776
I also got an error in console:
1686662676426

What can I do?
Thanks for your helps!

batch size error on FIJI

Hi
I downloaded a deepImageJ model from bioimage model zoo for FIJI.
Using DeepImageJ plugin, I tested it on the example image stack that came with the model.

3D U-Net Arabidopsis model

On the example image, I get this error in the Log Window:

Error applying the model
Output batch size bigger than 1 for tensor 'output'.
 Batch_size > 1 not supported by this version of DeepImageJ
Output tensor 'output' with tensor organization -> BYXC, and dimensions -> [256, 256, 8, 1], has a batch of 256. This version of DeepImageJ only supports batch sizes of 1.

When running DeepImageJ:
image

the tile size is 256,256,8,1 (Y,X,Z,C) , but the output in the log file has mentioned 256,256,8,1 and batch size of 256??


Also, a suggestion for the per_sample_scale_range.ijm macro
On line 33, when it checks if the image is RGB, this doesn't work for images that have a lookup table other than "Grays"
If my image had a "Red" or "Magenta" lookup table, it will think its an RGB image and run the RGB processing.
This is particularly a problem as most of the images from the microscopes have some sort of LUT applied to it

Build results in git repository grow git repository unnecessarily … + other suggestions

I've seen that you are currently adding all packaged ZIPs, along dependencies and old versions, into the repository. A fresh checkout is already 271 MB in size, and will likely grow dramatically over time.
May I suggest to follow standard git(hub) practices, and only check in source code into the repository; you can tag releases and attach build results via the 'Releases' function of github, where users can download your ready to use packages.
While the project is still in its early stages, you might benefit from force pushing a cleaner, more lightweight git repository (for cleanup of large files, tools like https://rtyley.github.io/bfg-repo-cleaner/ could be used), as the total size will always only grow over time.

Further suggestions would be:

  • Automatic dependency management, e.g. via Ivy, or moving the build process to Maven, which seems to be the standard for the official ImageJ2/SciJava subprojects. They offer scaffold pom.xmls which can easily be extended.
  • I would highly suggest to move over to TensorFlow 1.15, which follows 1.x API, but allows loading of models serialized with 2.0, which is the standard version since early October. (It should be backward compatible). I tested your plugin with TF 1.15 and it worked without issues.
  • Chosing a -gpu build will give users the ability to use CUDA accelerated processing (with seamless CPU-fallback).

Thanks for the great work, and I'm looking forward to your publication.

Install model from zip file should interpret drag-n-drop properly

doing drag-n-drog (on linux) into the zip file line edit, will prepend file://. One has to manually remove that in order to make it work...

Bonus: drag-n-drop introduces a whitespace in the end that also prevents it from working even if file:// is removed.

screenshot image

Process stack of multiple images

So far there does not seem to be a way to process a stack (e.g. a time lapse acquistion) of images with the same model (processing frame by frame with the model, without passing multiple frames to it).
With the recent updates, scripting this, is sort of possible, however since for every frame the model gets reloaded, it has a very high overhead like this; hence it would be nice, if this would be added as a feature (furthermore, the model could remain loaded if the user wants to process multiple images with the same model).
(Concerning image stacks, it would be nice if the plugin would process the currently selected slice, like most other plugins do, currently it always processes the first. Maybe a dialog like in many other operations, prompting the user whether to process the current frame or all iteratively.)

Thanks, best regards, Christian
PS: I've seen there is a new repository deepImagej-ij2-plugin … will this be the main place of development now?

JAX support?

Greetings,

I have some JAX (Flax) based models, and I was wondering whether you have plans to add support for them, or instead, you prefer if the models can be converted to one of the supported frameworks.

Error in nChannel 1

Hello,

When I use DeepImageJ on Fiji with this image, an example provided by CellProfiler, it works fine, but when I use it with my own images, it returns "Error in nChannel 1." Can you please help me with this problem?

Btw, thank you for the great software. I just found it yesterday and it can save me hours of work if I figure it out.

Best,
Amir

add batch dimension to exported numpy arrays

The exported NumPy array should have the format defined in input.
If the axes are defined with bxyz, then the numpy array should have those 5 dimensions. E.g. [1,512,512,128].

Note: the input definition refers to the input of the preprocessing and not to the input of the model

CUDA versions

My CUDA version is 11.8. How can I do gpu connection ?

fixing check rgb for image scaling macro

Hi @esgomezm

You can do a quick fix for the per_sample_scale_range.ijm macro where it checks if the image if its RGB. You can use eval() in ImageJ Macro to run the javascript code for checking if its RGB. I know flag is supposed to be 1 or 0 :), but I just kept it the same for simplicity.
Let me know if you want me to send a pull request or anything. I'm not sure where to though.

//script returns 4 if its rgb: https://imagej.nih.gov/ij/developer/api/ij/ij/ImagePlus.html#getType()
flag_rgb=eval("script", "importClass(Packages.ij.IJ);\nIJ.getImage().getType()");

// Convert the RGB image as a stack of slices so it processes the intensity of each slice.
if (flag_rgb==4){
	run("Make Composite");
	run("Stack to Images");
	run("Concatenate...", "  title=stack image1=[Red] image2=[Green] image3=[Blue]");
}

At line 102:

// EXECUTE THE FUNCTION TO THE WHOLE IMAGE
percentile_normalization(min_percentile, max_percentile, nBins);
// Convert the slices into channel to avoid confussion between 3D and multichannel images.
if (flag_rgb==4){
	run("Properties...", "channels=3 slices=1 frames=1 pixel_width=1.0000 pixel_height=1.0000 voxel_depth=1.0000");
}

Cheers
Pradeep

Error patch size is too large

I'm trying to run the Noise2Void Denoising model on my images. When selecting the model from the Run menu, the patch size is set to 400 and one cannot modify it.

But when running it, the error is "Patch size is too large (400)".

Why can't I change the patch size and why is it giving me this error?

I tried with 2 channel timelapse, then one channel, then one image, always the same error.

See debug log (no pre or post processing):

DeepImageJ (8.9 us) : Load model: Fully Residual U-net - TEM(fru-net_sev_segmentation)
DeepImageJ (18.4 ms) : Load model error: false
DeepImageJ (18.9 ms) : start progress
DeepImageJ (75.0 ms) : start runner
DeepImageJ (75.4 ms) : call runner
DeepImageJ (76.4 ms) : image size 1756x45
Error patch size is too large 400
DeepImageJ (82.6 ms) : Error, output is null

Cheers,
~Nico

Error loading tensorflow_saved_model_bundle

My deepimageJ was working fine before in the model Widefield Super-resolution (GAN - TxRed) and LiveCellSegmentationBoundaryModel, but now, I suddenly get a popup warning that Error loading tensorflow_saved_model_bundle
1687005194087
1687005247493
The screen shot of console
1687005719069
What should I do to fix it?

Access to HPC Cluster

Hi
can I configure Fiji + DeepImageJ on my local PC that it can access and use a HPC cluster for ML calculations? Pre- and postprocessing I would like to do on my local PC. The HPC cluster runs with Slurm.
Is this already implemented and described anywhere? Or would it be a new feature request? Or is this idea impossible at all.

I asked this already @image.sc (https://forum.image.sc/t/fiji-csbdeep-or-deepimagej-access-to-hpc-cluster/62483) but from the response it seems to be a rather challenging project.

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.