Results table rounding and readout inconsistency

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Results table rounding and readout inconsistency

Anjum, Sommer
Hi,

I have a macro below reproducing an issue that I have run into with FIJI that carries over to plugins.

1.) When the value of a point ROI is x.5, FIJI rounds DOWN for the results table
2.) If the results table is set to 0 decimal places, the value from ‘getResult’ does not reflect the rounded
3.) There is no option to change the rounding

Can someone please shed some light on this? I have tried adding 1e-05 to values and still run into the issue with rounding.

/////// BEGIN  MACRO ///////////////////////////////////////////////////////////////

newImage("Test", "8-bit black", 100, 100, 1);
run("Set Measurements...", "area centroid center redirect=None decimal=3");
makePoint(12.367, 20.500);
print("First point added: 12.367, 20.500");
roiManager("Add"); run("Measure");
print("Measurement rounded to 3 decimal places: " + getResult('X') + ", " + getResult("Y")); run("Clear Results");

run("Set Measurements...", "area centroid center redirect=None decimal=0"); run("Measure”);
print("Measurement rounded to 0 decimal places: " + getResult('X') + ", " + getResult("Y"));
print("This new measurement has the y-value of 20.500 rounded down to 20 instead of rounded up, but this only shows up in the results table.");
print("The printed value or stored value is not rounded at all.");
roiManager("reset");

makePoint(12.367, 30.510);
print("Second point added: 12.367, 30.510");
roiManager("Add");
run("Measure”);
print("Measurement rounded to 0 decimal places: " + getResult('X') + ", " + getResult("Y"));
print("This time, the y-coordinate is 30.510, so it is rounded up to 31");
print("Again, the rounded value shows up in the results table, but not in the printed or stored value");
print("There is no setting to make 0.5 from the results table round down");
run("Clear Results");
roiManager("reset");

makePoint(43.269, 22.500 + 1e-05);
print("Third point added: 43.269, 22.500 + 1e-05 ");
roiManager("Add");
run("Measure");
print("Measurement rounded to 0 decimal places: " + getResult('X') + ", " + getResult("Y"));
print("The results table value shows 23 for y, but this value is not stored or printed");

/////// END  MACRO ///////////////////////////////////////////////////////////////


Best,
Sommer Anjum

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Results table rounding and readout inconsistency

Schmid, Michael
Hi,

the ResultsTable stores the values as numbers, not as text, with full
machine precision (double precision, about 17 digits).
[In principle, Results tables can also hold text, but this is not and
should not be used for numeric data].
You can also change the number of digits in the Results Table at a later
time, to see more digits, if you found out that you need better
precision than what is currently shown.

The getResult() macro call retrieves the number. This is intended; it
makes e.g. macros work consistently, irrespective of how many digits are
displayed. Spreadsheet programs like excel and LibreOffice Calc do the
same: The calculation is done with full machine precision, even if less
digits are shown.

If you want to round numbers to the nearest integer, you can use the
macro commands Math.round or, for short, 'round' (20.5 will be rounded
up to 21, -20.5 to -20). There is also Math.ceil (always rounds up; note
that e.g. Math.ceil(-1.99) = -1) and Math.floor (always rounds down).


Rounding of numbers for displaying in ImageJ uses the default behavior
of DecimalFormat in Java, which is RoundingMode HALF_EVEN or "Banker's
rounding":
 
https://docs.oracle.com/javase/6/docs/api/java/math/RoundingMode.html#HALF_EVEN

Depending on whether the last integer digit is odd or even, it rounds up
or down (reverse for negative numbers). When rounding to 0 decimals, 1.5
and 2.5 get rounded to 2, 3.5 and 4.5 get rounded to 4.

It seems to me that there is no setting for DecimalFormat that makes it
round the same way as the Math.round function, so we can't have full
consistency between Math.round and display of half-integer numbers with
zero decimals.


Michael
________________________________________________________________
On 15.04.20 18:57, Anjum, Sommer wrote:

> Hi,
>
> I have a macro below reproducing an issue that I have run into with FIJI that carries over to plugins.
>
> 1.) When the value of a point ROI is x.5, FIJI rounds DOWN for the results table
> 2.) If the results table is set to 0 decimal places, the value from ‘getResult’ does not reflect the rounded
> 3.) There is no option to change the rounding
>
> Can someone please shed some light on this? I have tried adding 1e-05 to values and still run into the issue with rounding.
>
> /////// BEGIN  MACRO ///////////////////////////////////////////////////////////////
>
> newImage("Test", "8-bit black", 100, 100, 1);
> run("Set Measurements...", "area centroid center redirect=None decimal=3");
> makePoint(12.367, 20.500);
> print("First point added: 12.367, 20.500");
> roiManager("Add"); run("Measure");
> print("Measurement rounded to 3 decimal places: " + getResult('X') + ", " + getResult("Y")); run("Clear Results");
>
> run("Set Measurements...", "area centroid center redirect=None decimal=0"); run("Measure”);
> print("Measurement rounded to 0 decimal places: " + getResult('X') + ", " + getResult("Y"));
> print("This new measurement has the y-value of 20.500 rounded down to 20 instead of rounded up, but this only shows up in the results table.");
> print("The printed value or stored value is not rounded at all.");
> roiManager("reset");
>
> makePoint(12.367, 30.510);
> print("Second point added: 12.367, 30.510");
> roiManager("Add");
> run("Measure”);
> print("Measurement rounded to 0 decimal places: " + getResult('X') + ", " + getResult("Y"));
> print("This time, the y-coordinate is 30.510, so it is rounded up to 31");
> print("Again, the rounded value shows up in the results table, but not in the printed or stored value");
> print("There is no setting to make 0.5 from the results table round down");
> run("Clear Results");
> roiManager("reset");
>
> makePoint(43.269, 22.500 + 1e-05);
> print("Third point added: 43.269, 22.500 + 1e-05 ");
> roiManager("Add");
> run("Measure");
> print("Measurement rounded to 0 decimal places: " + getResult('X') + ", " + getResult("Y"));
> print("The results table value shows 23 for y, but this value is not stored or printed");
>
> /////// END  MACRO ///////////////////////////////////////////////////////////////
>
>
> Best,
> Sommer Anjum
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Results table rounding and readout inconsistency

Krs5
Hi,

That said, I am a little surprised to notice the x and y values are not the same as XM and YM for a single point

     X          Y          XM          YM
   12        20          12           20
   12        31          12           30
   43        23          44           22
   44        23          44           22

Furthermore, if I use ROI Manager > Measure this gives the same results as above.
However, ROI Manager More > List gives the below results of X and Y

   X          Y
  12        20
  12        30
  43        22
  43        22

So it seems there is some inconsistency in all of this.


The code below shows the above problem

newImage("Test", "8-bit black", 100, 100, 1);
run("Set Measurements...", "centroid center redirect=None decimal=0");
makePoint(12.367, 20.500);
roiManager("Add");
run("Measure");

makePoint(12.367, 30.510);
roiManager("Add");
run("Measure");

makePoint(43.269, 22.500 + 1e-05);
roiManager("Add");
run("Measure");

makePoint(43.5, 22.500 + 1e-05);
roiManager("Add");
run("Measure");
//roiManager("Measure"); // X, Y, XM and YM results same as above
roiManager("List"); // Results different

Best wishes

Kees

________________________________

Hi,

the ResultsTable stores the values as numbers, not as text, with full
machine precision (double precision, about 17 digits).
[In principle, Results tables can also hold text, but this is not and
should not be used for numeric data].
You can also change the number of digits in the Results Table at a later
time, to see more digits, if you found out that you need better
precision than what is currently shown.

The getResult() macro call retrieves the number. This is intended; it
makes e.g. macros work consistently, irrespective of how many digits are
displayed. Spreadsheet programs like excel and LibreOffice Calc do the
same: The calculation is done with full machine precision, even if less
digits are shown.

If you want to round numbers to the nearest integer, you can use the
macro commands Math.round or, for short, 'round' (20.5 will be rounded
up to 21, -20.5 to -20). There is also Math.ceil (always rounds up; note
that e.g. Math.ceil(-1.99) = -1) and Math.floor (always rounds down).


Rounding of numbers for displaying in ImageJ uses the default behavior
of DecimalFormat in Java, which is RoundingMode HALF_EVEN or "Banker's
rounding":

https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.oracle.com%2Fjavase%2F6%2Fdocs%2Fapi%2Fjava%2Fmath%2FRoundingMode.html%23HALF_EVEN&data=02%7C01%7Ckrs5%40leicester.ac.uk%7Cc0e25c571b02418d958208d7e164d618%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C0%7C637225695522764117&sdata=ygS52qD%2BNhiI8kktssEz%2B%2BIPdT3QrBAJ4LVocVdqKxY%3D&reserved=0

Depending on whether the last integer digit is odd or even, it rounds up
or down (reverse for negative numbers). When rounding to 0 decimals, 1.5
and 2.5 get rounded to 2, 3.5 and 4.5 get rounded to 4.

It seems to me that there is no setting for DecimalFormat that makes it
round the same way as the Math.round function, so we can't have full
consistency between Math.round and display of half-integer numbers with
zero decimals.


Michael
________________________________________________________________
On 15.04.20 18:57, Anjum, Sommer wrote:

> Hi,
>
> I have a macro below reproducing an issue that I have run into with FIJI that carries over to plugins.
>
> 1.) When the value of a point ROI is x.5, FIJI rounds DOWN for the results table
> 2.) If the results table is set to 0 decimal places, the value from ‘getResult’ does not reflect the rounded
> 3.) There is no option to change the rounding
>
> Can someone please shed some light on this? I have tried adding 1e-05 to values and still run into the issue with rounding.
>
> /////// BEGIN  MACRO ///////////////////////////////////////////////////////////////
>
> newImage("Test", "8-bit black", 100, 100, 1);
> run("Set Measurements...", "area centroid center redirect=None decimal=3");
> makePoint(12.367, 20.500);
> print("First point added: 12.367, 20.500");
> roiManager("Add"); run("Measure");
> print("Measurement rounded to 3 decimal places: " + getResult('X') + ", " + getResult("Y")); run("Clear Results");
>
> run("Set Measurements...", "area centroid center redirect=None decimal=0"); run("Measure”);
> print("Measurement rounded to 0 decimal places: " + getResult('X') + ", " + getResult("Y"));
> print("This new measurement has the y-value of 20.500 rounded down to 20 instead of rounded up, but this only shows up in the results table.");
> print("The printed value or stored value is not rounded at all.");
> roiManager("reset");
>
> makePoint(12.367, 30.510);
> print("Second point added: 12.367, 30.510");
> roiManager("Add");
> run("Measure”);
> print("Measurement rounded to 0 decimal places: " + getResult('X') + ", " + getResult("Y"));
> print("This time, the y-coordinate is 30.510, so it is rounded up to 31");
> print("Again, the rounded value shows up in the results table, but not in the printed or stored value");
> print("There is no setting to make 0.5 from the results table round down");
> run("Clear Results");
> roiManager("reset");
>
> makePoint(43.269, 22.500 + 1e-05);
> print("Third point added: 43.269, 22.500 + 1e-05 ");
> roiManager("Add");
> run("Measure");
> print("Measurement rounded to 0 decimal places: " + getResult('X') + ", " + getResult("Y"));
> print("The results table value shows 23 for y, but this value is not stored or printed");
>
> /////// END  MACRO ///////////////////////////////////////////////////////////////
>
>
> Best,
> Sommer Anjum
>
> --
> ImageJ mailing list: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fimagej.nih.gov%2Fij%2Flist.html&data=02%7C01%7Ckrs5%40leicester.ac.uk%7Cc0e25c571b02418d958208d7e164d618%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C0%7C637225695522764117&sdata=%2Bj3TnJtG59oJ545HJdZAX4Yo3dd9FAeRbzKZHBO0pCc%3D&reserved=0
>

--
ImageJ mailing list: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fimagej.nih.gov%2Fij%2Flist.html&data=02%7C01%7Ckrs5%40leicester.ac.uk%7Cc0e25c571b02418d958208d7e164d618%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C0%7C637225695522764117&sdata=%2Bj3TnJtG59oJ545HJdZAX4Yo3dd9FAeRbzKZHBO0pCc%3D&reserved=0

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Results table rounding and readout inconsistency

Wayne Rasband-2
> On Apr 17, 2020, at 4:11 AM, Straatman, Kees (Dr.) <[hidden email]> wrote:
>
> Hi,
>
> That said, I am a little surprised to notice the x and y values are not the same as XM and YM for a single point

These point rounding errors are fixed in the ImageJ 1.52a6 daily build. Numbers with 0 decimal places are now displayed in Results tables using the DecimalFormat RoundingMode of HALF_UP instead of HALF_EVEN.

-wayne


>     X          Y          XM          YM
>   12        20          12           20
>   12        31          12           30
>   43        23          44           22
>   44        23          44           22
>
> Furthermore, if I use ROI Manager > Measure this gives the same results as above.
> However, ROI Manager More > List gives the below results of X and Y
>
>   X          Y
>  12        20
>  12        30
>  43        22
>  43        22
>
> So it seems there is some inconsistency in all of this.
>
>
> The code below shows the above problem
>
> newImage("Test", "8-bit black", 100, 100, 1);
> run("Set Measurements...", "centroid center redirect=None decimal=0");
> makePoint(12.367, 20.500);
> roiManager("Add");
> run("Measure");
>
> makePoint(12.367, 30.510);
> roiManager("Add");
> run("Measure");
>
> makePoint(43.269, 22.500 + 1e-05);
> roiManager("Add");
> run("Measure");
>
> makePoint(43.5, 22.500 + 1e-05);
> roiManager("Add");
> run("Measure");
> //roiManager("Measure"); // X, Y, XM and YM results same as above
> roiManager("List"); // Results different
>
> Best wishes
>
> Kees
>
> ________________________________
>
> Hi,
>
> the ResultsTable stores the values as numbers, not as text, with full
> machine precision (double precision, about 17 digits).
> [In principle, Results tables can also hold text, but this is not and
> should not be used for numeric data].
> You can also change the number of digits in the Results Table at a later
> time, to see more digits, if you found out that you need better
> precision than what is currently shown.
>
> The getResult() macro call retrieves the number. This is intended; it
> makes e.g. macros work consistently, irrespective of how many digits are
> displayed. Spreadsheet programs like excel and LibreOffice Calc do the
> same: The calculation is done with full machine precision, even if less
> digits are shown.
>
> If you want to round numbers to the nearest integer, you can use the
> macro commands Math.round or, for short, 'round' (20.5 will be rounded
> up to 21, -20.5 to -20). There is also Math.ceil (always rounds up; note
> that e.g. Math.ceil(-1.99) = -1) and Math.floor (always rounds down).
>
>
> Rounding of numbers for displaying in ImageJ uses the default behavior
> of DecimalFormat in Java, which is RoundingMode HALF_EVEN or "Banker's
> rounding":
>
> https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.oracle.com%2Fjavase%2F6%2Fdocs%2Fapi%2Fjava%2Fmath%2FRoundingMode.html%23HALF_EVEN&amp;data=02%7C01%7Ckrs5%40leicester.ac.uk%7Cc0e25c571b02418d958208d7e164d618%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C0%7C637225695522764117&amp;sdata=ygS52qD%2BNhiI8kktssEz%2B%2BIPdT3QrBAJ4LVocVdqKxY%3D&amp;reserved=0
>
> Depending on whether the last integer digit is odd or even, it rounds up
> or down (reverse for negative numbers). When rounding to 0 decimals, 1.5
> and 2.5 get rounded to 2, 3.5 and 4.5 get rounded to 4.
>
> It seems to me that there is no setting for DecimalFormat that makes it
> round the same way as the Math.round function, so we can't have full
> consistency between Math.round and display of half-integer numbers with
> zero decimals.
>
>
> Michael
> ________________________________________________________________
> On 15.04.20 18:57, Anjum, Sommer wrote:
>> Hi,
>>
>> I have a macro below reproducing an issue that I have run into with FIJI that carries over to plugins.
>>
>> 1.) When the value of a point ROI is x.5, FIJI rounds DOWN for the results table
>> 2.) If the results table is set to 0 decimal places, the value from ‘getResult’ does not reflect the rounded
>> 3.) There is no option to change the rounding
>>
>> Can someone please shed some light on this? I have tried adding 1e-05 to values and still run into the issue with rounding.
>>
>> /////// BEGIN  MACRO ///////////////////////////////////////////////////////////////
>>
>> newImage("Test", "8-bit black", 100, 100, 1);
>> run("Set Measurements...", "area centroid center redirect=None decimal=3");
>> makePoint(12.367, 20.500);
>> print("First point added: 12.367, 20.500");
>> roiManager("Add"); run("Measure");
>> print("Measurement rounded to 3 decimal places: " + getResult('X') + ", " + getResult("Y")); run("Clear Results");
>>
>> run("Set Measurements...", "area centroid center redirect=None decimal=0"); run("Measure”);
>> print("Measurement rounded to 0 decimal places: " + getResult('X') + ", " + getResult("Y"));
>> print("This new measurement has the y-value of 20.500 rounded down to 20 instead of rounded up, but this only shows up in the results table.");
>> print("The printed value or stored value is not rounded at all.");
>> roiManager("reset");
>>
>> makePoint(12.367, 30.510);
>> print("Second point added: 12.367, 30.510");
>> roiManager("Add");
>> run("Measure”);
>> print("Measurement rounded to 0 decimal places: " + getResult('X') + ", " + getResult("Y"));
>> print("This time, the y-coordinate is 30.510, so it is rounded up to 31");
>> print("Again, the rounded value shows up in the results table, but not in the printed or stored value");
>> print("There is no setting to make 0.5 from the results table round down");
>> run("Clear Results");
>> roiManager("reset");
>>
>> makePoint(43.269, 22.500 + 1e-05);
>> print("Third point added: 43.269, 22.500 + 1e-05 ");
>> roiManager("Add");
>> run("Measure");
>> print("Measurement rounded to 0 decimal places: " + getResult('X') + ", " + getResult("Y"));
>> print("The results table value shows 23 for y, but this value is not stored or printed");
>>
>> /////// END  MACRO ///////////////////////////////////////////////////////////////
>>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Microscope Image Focus Quality plugin

Krs5
Dear list and Curtis

I tried the Microscope Image Focus Quality plugin (https://imagej.net/Microscope_Focus_Quality) in Fiji but got the below error message

[ERROR] org.tensorflow.TensorFlowException: Could not find SavedModel .pb or .pbtxt at supplied export directory path: C:\Users\Home\DOCUME~1\IM6357~1\FIJI-W~1\Fiji.app\models\microscope-image-quality
at org.tensorflow.SavedModelBundle.load(Native Method)
at org.tensorflow.SavedModelBundle.access$000(SavedModelBundle.java:27)
at org.tensorflow.SavedModelBundle$Loader.load(SavedModelBundle.java:32)
at org.tensorflow.SavedModelBundle.load(SavedModelBundle.java:95)
at net.imagej.tensorflow.DefaultTensorFlowService.loadModel(DefaultTensorFlowService.java:113)
at sc.fiji.imageFocus.MicroscopeImageFocusQualityClassifier.run(MicroscopeImageFocusQualityClassifier.java:182)
at org.scijava.command.CommandModule.run(CommandModule.java:199)
at org.scijava.module.ModuleRunner.run(ModuleRunner.java:168)
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:127)
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:66)
at org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:228)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

and when I checked the folder models\microscope-image-quality is empty. Where would I find the model files?

Best wishes

Kees


Dr Ir K.R. Straatman
Senior Experimental Officer

Advanced Imaging Facility

Centre for Core Biotechnology Services
University of Leicester
www.le.ac.uk/advanced-imaging-facility<http://www.le.ac.uk/advanced-imaging-facility>


--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Microscope Image Focus Quality plugin

Herbie
Good day Kees,

if you have your images as a focus stack, you may try "Easy Focus":
<https://www.gluender.de/Miscellanea/MiscTexts/UtilitiesText.html#Gl-2019-3>


 From the ReadMe-doc:
<https://www.gluender.de/Miscellanea/MiscTexts/MiscExcerpts/ReadMe_EF.html>

-- Easy Focus is an “ImageJ”-Macro that returns the best focused slice
of a stack that represents a focus series. The stack may contain a
single focus series (z-stack), a temporal sequence of focus series, or
focus series of colour channels (4D-hyperstacks).
-- Easy Focus requires stacks of square-sized image-support or selection
(ROI).
-- Easy Focus-analyses are RGB-agnostic and cannot be applied to
5D-hyperstacks.

Regards

Herbie

:::::::::::::::::::::::::::::::::::::::::::::::::::
Am 27.04.20 um 15:48 schrieb Straatman, Kees (Dr.):

> Dear list and Curtis
>
> I tried the Microscope Image Focus Quality plugin (https://imagej.net/Microscope_Focus_Quality) in Fiji but got the below error message
>
> [ERROR] org.tensorflow.TensorFlowException: Could not find SavedModel .pb or .pbtxt at supplied export directory path: C:\Users\Home\DOCUME~1\IM6357~1\FIJI-W~1\Fiji.app\models\microscope-image-quality
> at org.tensorflow.SavedModelBundle.load(Native Method)
> at org.tensorflow.SavedModelBundle.access$000(SavedModelBundle.java:27)
> at org.tensorflow.SavedModelBundle$Loader.load(SavedModelBundle.java:32)
> at org.tensorflow.SavedModelBundle.load(SavedModelBundle.java:95)
> at net.imagej.tensorflow.DefaultTensorFlowService.loadModel(DefaultTensorFlowService.java:113)
> at sc.fiji.imageFocus.MicroscopeImageFocusQualityClassifier.run(MicroscopeImageFocusQualityClassifier.java:182)
> at org.scijava.command.CommandModule.run(CommandModule.java:199)
> at org.scijava.module.ModuleRunner.run(ModuleRunner.java:168)
> at org.scijava.module.ModuleRunner.call(ModuleRunner.java:127)
> at org.scijava.module.ModuleRunner.call(ModuleRunner.java:66)
> at org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:228)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> at java.lang.Thread.run(Thread.java:748)
>
> and when I checked the folder models\microscope-image-quality is empty. Where would I find the model files?
>
> Best wishes
>
> Kees
>
>
> Dr Ir K.R. Straatman
> Senior Experimental Officer
>
> Advanced Imaging Facility
>
> Centre for Core Biotechnology Services
> University of Leicester
> www.le.ac.uk/advanced-imaging-facility<http://www.le.ac.uk/advanced-imaging-facility>
>
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Microscope Image Focus Quality plugin

jchanson-2
In reply to this post by Krs5
        I just tried the microscope image focus quality plugin, too... and hit the same wall - no trained model available.  Looking through the github site, the model should be available here - https://storage.googleapis.com/microscope-image-quality/static/model/model.ckpt-1000042.  But, I get a security violation when I try to access it.

Thanks,
Jeff

-----Original Message-----
From: Straatman, Kees (Dr.) <[hidden email]>
Sent: Monday, April 27, 2020 9:49 AM
To: [hidden email]
Subject: [EXTERNAL] Microscope Image Focus Quality plugin

EXTERNAL EMAIL: Use caution before replying, clicking links, and opening attachments.

Dear list and Curtis

I tried the Microscope Image Focus Quality plugin (https://imagej.net/Microscope_Focus_Quality) in Fiji but got the below error message

[ERROR] org.tensorflow.TensorFlowException: Could not find SavedModel .pb or .pbtxt at supplied export directory path: C:\Users\Home\DOCUME~1\IM6357~1\FIJI-W~1\Fiji.app\models\microscope-image-quality
at org.tensorflow.SavedModelBundle.load(Native Method) at org.tensorflow.SavedModelBundle.access$000(SavedModelBundle.java:27)
at org.tensorflow.SavedModelBundle$Loader.load(SavedModelBundle.java:32)
at org.tensorflow.SavedModelBundle.load(SavedModelBundle.java:95)
at net.imagej.tensorflow.DefaultTensorFlowService.loadModel(DefaultTensorFlowService.java:113)
at sc.fiji.imageFocus.MicroscopeImageFocusQualityClassifier.run(MicroscopeImageFocusQualityClassifier.java:182)
at org.scijava.command.CommandModule.run(CommandModule.java:199)
at org.scijava.module.ModuleRunner.run(ModuleRunner.java:168)
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:127)
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:66)
at org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:228)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

and when I checked the folder models\microscope-image-quality is empty. Where would I find the model files?

Best wishes

Kees


Dr Ir K.R. Straatman
Senior Experimental Officer

Advanced Imaging Facility

Centre for Core Biotechnology Services
University of Leicester
www.le.ac.uk/advanced-imaging-facility<http://www.le.ac.uk/advanced-imaging-facility>


--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Microscope Image Focus Quality plugin

Herbie
Good day Jeff,

it would be helpful to know the purpose of using of this AI-approach.

The focus-topic is a broad one and there are many tools that can be
used, depending on the defined task.

In-focus patches in a single slice.
Relatively best focused slice of a stack.
etc.

As far as I know, nobody did a comparison of the very AI-approach with
approaches based on signal-theory. One thing is sure, the latter are
much faster...

Regards

Herbie

:::::::::::::::::::::::::::::::::::::::::::
Am 06.05.20 um 18:47 schrieb Jeff C Hanson:

> I just tried the microscope image focus quality plugin, too... and hit the same wall - no trained model available.  Looking through the github site, the model should be available here - https://storage.googleapis.com/microscope-image-quality/static/model/model.ckpt-1000042.  But, I get a security violation when I try to access it.
>
> Thanks,
> Jeff
>
> -----Original Message-----
> From: Straatman, Kees (Dr.) <[hidden email]>
> Sent: Monday, April 27, 2020 9:49 AM
> To: [hidden email]
> Subject: [EXTERNAL] Microscope Image Focus Quality plugin
>
> EXTERNAL EMAIL: Use caution before replying, clicking links, and opening attachments.
>
> Dear list and Curtis
>
> I tried the Microscope Image Focus Quality plugin (https://imagej.net/Microscope_Focus_Quality) in Fiji but got the below error message
>
> [ERROR] org.tensorflow.TensorFlowException: Could not find SavedModel .pb or .pbtxt at supplied export directory path: C:\Users\Home\DOCUME~1\IM6357~1\FIJI-W~1\Fiji.app\models\microscope-image-quality
> at org.tensorflow.SavedModelBundle.load(Native Method) at org.tensorflow.SavedModelBundle.access$000(SavedModelBundle.java:27)
> at org.tensorflow.SavedModelBundle$Loader.load(SavedModelBundle.java:32)
> at org.tensorflow.SavedModelBundle.load(SavedModelBundle.java:95)
> at net.imagej.tensorflow.DefaultTensorFlowService.loadModel(DefaultTensorFlowService.java:113)
> at sc.fiji.imageFocus.MicroscopeImageFocusQualityClassifier.run(MicroscopeImageFocusQualityClassifier.java:182)
> at org.scijava.command.CommandModule.run(CommandModule.java:199)
> at org.scijava.module.ModuleRunner.run(ModuleRunner.java:168)
> at org.scijava.module.ModuleRunner.call(ModuleRunner.java:127)
> at org.scijava.module.ModuleRunner.call(ModuleRunner.java:66)
> at org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:228)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> at java.lang.Thread.run(Thread.java:748)
>
> and when I checked the folder models\microscope-image-quality is empty. Where would I find the model files?
>
> Best wishes
>
> Kees
>
>
> Dr Ir K.R. Straatman
> Senior Experimental Officer
>
> Advanced Imaging Facility
>
> Centre for Core Biotechnology Services
> University of Leicester
> www.le.ac.uk/advanced-imaging-facility<http://www.le.ac.uk/advanced-imaging-facility>
>
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Microscope Image Focus Quality plugin

John Minter
In reply to this post by jchanson-2
Jeff. are you behind a firewall? I managed to get the Microscope Image
Focus Quality plug-in to install on both Win1o and Mac. You are correct
that it downloads a lot of data from the google-apis site and it takes a
while to do so. I was able to run both the test images and my own. Note: it
requires 16 bit images...

Best regards,
John Minter

On Wed, May 6, 2020 at 12:54 PM Jeff C Hanson <
[hidden email]> wrote:

>         I just tried the microscope image focus quality plugin, too... and
> hit the same wall - no trained model available.  Looking through the github
> site, the model should be available here -
> https://storage.googleapis.com/microscope-image-quality/static/model/model.ckpt-1000042.
> But, I get a security violation when I try to access it.
>
> Thanks,
> Jeff
>
> -----Original Message-----
> From: Straatman, Kees (Dr.) <[hidden email]>
> Sent: Monday, April 27, 2020 9:49 AM
> To: [hidden email]
> Subject: [EXTERNAL] Microscope Image Focus Quality plugin
>
> EXTERNAL EMAIL: Use caution before replying, clicking links, and opening
> attachments.
>
> Dear list and Curtis
>
> I tried the Microscope Image Focus Quality plugin (
> https://imagej.net/Microscope_Focus_Quality) in Fiji but got the below
> error message
>
> [ERROR] org.tensorflow.TensorFlowException: Could not find SavedModel .pb
> or .pbtxt at supplied export directory path:
> C:\Users\Home\DOCUME~1\IM6357~1\FIJI-W~1\Fiji.app\models\microscope-image-quality
> at org.tensorflow.SavedModelBundle.load(Native Method) at
> org.tensorflow.SavedModelBundle.access$000(SavedModelBundle.java:27)
> at org.tensorflow.SavedModelBundle$Loader.load(SavedModelBundle.java:32)
> at org.tensorflow.SavedModelBundle.load(SavedModelBundle.java:95)
> at
> net.imagej.tensorflow.DefaultTensorFlowService.loadModel(DefaultTensorFlowService.java:113)
> at
> sc.fiji.imageFocus.MicroscopeImageFocusQualityClassifier.run(MicroscopeImageFocusQualityClassifier.java:182)
> at org.scijava.command.CommandModule.run(CommandModule.java:199)
> at org.scijava.module.ModuleRunner.run(ModuleRunner.java:168)
> at org.scijava.module.ModuleRunner.call(ModuleRunner.java:127)
> at org.scijava.module.ModuleRunner.call(ModuleRunner.java:66)
> at
> org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:228)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> at java.lang.Thread.run(Thread.java:748)
>
> and when I checked the folder models\microscope-image-quality is empty.
> Where would I find the model files?
>
> Best wishes
>
> Kees
>
>
> Dr Ir K.R. Straatman
> Senior Experimental Officer
>
> Advanced Imaging Facility
>
> Centre for Core Biotechnology Services
> University of Leicester
> www.le.ac.uk/advanced-imaging-facility<
> http://www.le.ac.uk/advanced-imaging-facility>
>
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Microscope Image Focus Quality plugin

Krs5
Dear John, Jeff and list,

I installed the plugin using Fiji as on https://imagej.net/Microscope_Focus_Quality. I also can download the sample images but the plugin fails with the TensorFlowExeption: "Could not find SavedModel .pb
or .pbtxt at supplied export directory path" as I originally reported, and there is no model saved in the models folder under Fiji, what I guess is the problem. I am not behind a fire wall. If I follow the link like Jeff also reported I get :
<Error>
<script/>
<Code>NoSuchKey</Code>
<Message>The specified key does not exist.</Message>
<Details>
No such object: microscope-image-quality/static/model/model.ckpt-1000042
</Details>
</Error>

I found however an other problem. If I enable the TensorFlow update site the Stardist plugin (https://imagej.net/StarDist) fails. Removing the TensorFlow plugin solves the problem again.

Best wishes

Kees
________________________________
From: ImageJ Interest Group  on behalf of John Minter
Sent: 06 May 2020 20:34
To: [hidden email] <[hidden email]>
Subject: Re: Microscope Image Focus Quality plugin

Jeff. are you behind a firewall? I managed to get the Microscope Image
Focus Quality plug-in to install on both Win1o and Mac. You are correct
that it downloads a lot of data from the google-apis site and it takes a
while to do so. I was able to run both the test images and my own. Note: it
requires 16 bit images...

Best regards,
John Minter

On Wed, May 6, 2020 at 12:54 PM Jeff C Hanson <
[hidden email]> wrote:

>         I just tried the microscope image focus quality plugin, too... and
> hit the same wall - no trained model available.  Looking through the github
> site, the model should be available here -
> https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstorage.googleapis.com%2Fmicroscope-image-quality%2Fstatic%2Fmodel%2Fmodel.ckpt-1000042&amp;data=02%7C01%7Ckrs5%40leicester.ac.uk%7Cfb89d760e0a845db779008d7f1f4e540%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C0%7C637243906435597795&amp;sdata=1JJ3eu2r3mmycDtI9h6eRCQnlIVA67ci6aHyJ1STslU%3D&amp;reserved=0.
> But, I get a security violation when I try to access it.
>
> Thanks,
> Jeff
>
> -----Original Message-----
> From: Straatman, Kees (Dr.) <[hidden email]>
> Sent: Monday, April 27, 2020 9:49 AM
> To: [hidden email]
> Subject: [EXTERNAL] Microscope Image Focus Quality plugin
>
> EXTERNAL EMAIL: Use caution before replying, clicking links, and opening
> attachments.
>
> Dear list and Curtis
>
> I tried the Microscope Image Focus Quality plugin (
> https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fimagej.net%2FMicroscope_Focus_Quality&amp;data=02%7C01%7Ckrs5%40leicester.ac.uk%7Cfb89d760e0a845db779008d7f1f4e540%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C0%7C637243906435597795&amp;sdata=MIlrKZXy1AGQNedloUVXO6jdwxbjLPKTtxXJF0Sjkxo%3D&amp;reserved=0) in Fiji but got the below
> error message
>
> [ERROR] org.tensorflow.TensorFlowException: Could not find SavedModel .pb
> or .pbtxt at supplied export directory path:
> C:\Users\Home\DOCUME~1\IM6357~1\FIJI-W~1\Fiji.app\models\microscope-image-quality
> at org.tensorflow.SavedModelBundle.load(Native Method) at
> org.tensorflow.SavedModelBundle.access$000(SavedModelBundle.java:27)
> at org.tensorflow.SavedModelBundle$Loader.load(SavedModelBundle.java:32)
> at org.tensorflow.SavedModelBundle.load(SavedModelBundle.java:95)
> at
> net.imagej.tensorflow.DefaultTensorFlowService.loadModel(DefaultTensorFlowService.java:113)
> at
> sc.fiji.imageFocus.MicroscopeImageFocusQualityClassifier.run(MicroscopeImageFocusQualityClassifier.java:182)
> at org.scijava.command.CommandModule.run(CommandModule.java:199)
> at org.scijava.module.ModuleRunner.run(ModuleRunner.java:168)
> at org.scijava.module.ModuleRunner.call(ModuleRunner.java:127)
> at org.scijava.module.ModuleRunner.call(ModuleRunner.java:66)
> at
> org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:228)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> at java.lang.Thread.run(Thread.java:748)
>
> and when I checked the folder models\microscope-image-quality is empty.
> Where would I find the model files?
>
> Best wishes
>
> Kees
>
>
> Dr Ir K.R. Straatman
> Senior Experimental Officer
>
> Advanced Imaging Facility
>
> Centre for Core Biotechnology Services
> University of Leicester
> https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.le.ac.uk%2Fadvanced-imaging-facility&amp;data=02%7C01%7Ckrs5%40leicester.ac.uk%7Cfb89d760e0a845db779008d7f1f4e540%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C0%7C637243906435597795&amp;sdata=AB8nqxpgto1QNyzE9zsGLAMps6%2F0UUmeDBVhV8ifEVY%3D&amp;reserved=0<
> https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.le.ac.uk%2Fadvanced-imaging-facility&amp;data=02%7C01%7Ckrs5%40leicester.ac.uk%7Cfb89d760e0a845db779008d7f1f4e540%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C0%7C637243906435597795&amp;sdata=AB8nqxpgto1QNyzE9zsGLAMps6%2F0UUmeDBVhV8ifEVY%3D&amp;reserved=0>
>
>
> --
> ImageJ mailing list: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fimagej.nih.gov%2Fij%2Flist.html&amp;data=02%7C01%7Ckrs5%40leicester.ac.uk%7Cfb89d760e0a845db779008d7f1f4e540%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C0%7C637243906435597795&amp;sdata=tGDQSzfoPBR3UxfcoJHdHa2cQhpuiYI4C4%2FII7Uvyug%3D&amp;reserved=0
>
> --
> ImageJ mailing list: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fimagej.nih.gov%2Fij%2Flist.html&amp;data=02%7C01%7Ckrs5%40leicester.ac.uk%7Cfb89d760e0a845db779008d7f1f4e540%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C0%7C637243906435597795&amp;sdata=tGDQSzfoPBR3UxfcoJHdHa2cQhpuiYI4C4%2FII7Uvyug%3D&amp;reserved=0
>

--
ImageJ mailing list: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fimagej.nih.gov%2Fij%2Flist.html&amp;data=02%7C01%7Ckrs5%40leicester.ac.uk%7Cfb89d760e0a845db779008d7f1f4e540%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C0%7C637243906435597795&amp;sdata=tGDQSzfoPBR3UxfcoJHdHa2cQhpuiYI4C4%2FII7Uvyug%3D&amp;reserved=0

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Microscope Image Focus Quality plugin

Herbie
In reply to this post by John Minter
Good day to everybody dealing with this topic!

Please have a look a the directly related thread on the IJ-Forum:
<https://forum.image.sc/t/finding-focused-slices/27741/2>

Best regards

Herbie

:::::::::::::::::::::::::::::::::::::::::
Am 06.05.20 um 21:34 schrieb John Minter:

> Jeff. are you behind a firewall? I managed to get the Microscope Image
> Focus Quality plug-in to install on both Win1o and Mac. You are correct
> that it downloads a lot of data from the google-apis site and it takes a
> while to do so. I was able to run both the test images and my own. Note: it
> requires 16 bit images...
>
> Best regards,
> John Minter
>
> On Wed, May 6, 2020 at 12:54 PM Jeff C Hanson <
> [hidden email]> wrote:
>
>>          I just tried the microscope image focus quality plugin, too... and
>> hit the same wall - no trained model available.  Looking through the github
>> site, the model should be available here -
>> https://storage.googleapis.com/microscope-image-quality/static/model/model.ckpt-1000042.
>> But, I get a security violation when I try to access it.
>>
>> Thanks,
>> Jeff
>>
>> -----Original Message-----
>> From: Straatman, Kees (Dr.) <[hidden email]>
>> Sent: Monday, April 27, 2020 9:49 AM
>> To: [hidden email]
>> Subject: [EXTERNAL] Microscope Image Focus Quality plugin
>>
>> EXTERNAL EMAIL: Use caution before replying, clicking links, and opening
>> attachments.
>>
>> Dear list and Curtis
>>
>> I tried the Microscope Image Focus Quality plugin (
>> https://imagej.net/Microscope_Focus_Quality) in Fiji but got the below
>> error message
>>
>> [ERROR] org.tensorflow.TensorFlowException: Could not find SavedModel .pb
>> or .pbtxt at supplied export directory path:
>> C:\Users\Home\DOCUME~1\IM6357~1\FIJI-W~1\Fiji.app\models\microscope-image-quality
>> at org.tensorflow.SavedModelBundle.load(Native Method) at
>> org.tensorflow.SavedModelBundle.access$000(SavedModelBundle.java:27)
>> at org.tensorflow.SavedModelBundle$Loader.load(SavedModelBundle.java:32)
>> at org.tensorflow.SavedModelBundle.load(SavedModelBundle.java:95)
>> at
>> net.imagej.tensorflow.DefaultTensorFlowService.loadModel(DefaultTensorFlowService.java:113)
>> at
>> sc.fiji.imageFocus.MicroscopeImageFocusQualityClassifier.run(MicroscopeImageFocusQualityClassifier.java:182)
>> at org.scijava.command.CommandModule.run(CommandModule.java:199)
>> at org.scijava.module.ModuleRunner.run(ModuleRunner.java:168)
>> at org.scijava.module.ModuleRunner.call(ModuleRunner.java:127)
>> at org.scijava.module.ModuleRunner.call(ModuleRunner.java:66)
>> at
>> org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:228)
>> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>> at
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>> at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>> at java.lang.Thread.run(Thread.java:748)
>>
>> and when I checked the folder models\microscope-image-quality is empty.
>> Where would I find the model files?
>>
>> Best wishes
>>
>> Kees
>>
>>
>> Dr Ir K.R. Straatman
>> Senior Experimental Officer
>>
>> Advanced Imaging Facility
>>
>> Centre for Core Biotechnology Services
>> University of Leicester
>> www.le.ac.uk/advanced-imaging-facility<
>> http://www.le.ac.uk/advanced-imaging-facility>
>>
>>
>> --
>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>
>> --
>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Microscope Image Focus Quality plugin

Krs5
Thanks for the link Herbie.
My Idea was to see if I can setup an analysis pipeline for 2D images and one of the checks could/would be to see if the image is in focus. On several microscope systems we get occasionally images that are out of focus and as far as I can see the Microscope Image Focus Quality plugin would work on 2D images. However, I understand from the link provided that it is slow.

The Focus_LP plugin requires 3D stacks, so is not an option.

Best wishes

Kees

________________________________
From: Herbie <[hidden email]>
Sent: 07 May 2020 10:20
Subject: Re: Microscope Image Focus Quality plugin

Good day to everybody dealing with this topic!

Please have a look a the directly related thread on the IJ-Forum:
<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fforum.image.sc%2Ft%2Ffinding-focused-slices%2F27741%2F2&amp;data=02%7C01%7Ckrs5%40leicester.ac.uk%7Ce7d832c548df43d7222e08d7f2680ae5%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C0%7C637244400983800809&amp;sdata=IfdNTHA3e7gJvlzJ5IF52Zz7k0JVGfdNiyol9wy2dSA%3D&amp;reserved=0>

Best regards

Herbie

:::::::::::::::::::::::::::::::::::::::::
Am 06.05.20 um 21:34 schrieb John Minter:

> Jeff. are you behind a firewall? I managed to get the Microscope Image
> Focus Quality plug-in to install on both Win1o and Mac. You are correct
> that it downloads a lot of data from the google-apis site and it takes a
> while to do so. I was able to run both the test images and my own. Note: it
> requires 16 bit images...
>
> Best regards,
> John Minter
>
> On Wed, May 6, 2020 at 12:54 PM Jeff C Hanson <
> [hidden email]> wrote:
>
>>          I just tried the microscope image focus quality plugin, too... and
>> hit the same wall - no trained model available.  Looking through the github
>> site, the model should be available here -
>> https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstorage.googleapis.com%2Fmicroscope-image-quality%2Fstatic%2Fmodel%2Fmodel.ckpt-1000042&amp;data=02%7C01%7Ckrs5%40leicester.ac.uk%7Ce7d832c548df43d7222e08d7f2680ae5%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C0%7C637244400983800809&amp;sdata=CXrlPEjnUD6nOIDP8JpcuoaGnwGgIH%2FTmRIUODq1%2Fmg%3D&amp;reserved=0.
>> But, I get a security violation when I try to access it.
>>
>> Thanks,
>> Jeff
>>
>> -----Original Message-----
>> From: Straatman, Kees (Dr.) <[hidden email]>
>> Sent: Monday, April 27, 2020 9:49 AM
>> To: [hidden email]
>> Subject: [EXTERNAL] Microscope Image Focus Quality plugin
>>
>> EXTERNAL EMAIL: Use caution before replying, clicking links, and opening
>> attachments.
>>
>> Dear list and Curtis
>>
>> I tried the Microscope Image Focus Quality plugin (
>> https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fimagej.net%2FMicroscope_Focus_Quality&amp;data=02%7C01%7Ckrs5%40leicester.ac.uk%7Ce7d832c548df43d7222e08d7f2680ae5%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C0%7C637244400983800809&amp;sdata=yZAlPoWiHg9YKUtReDGAnd124BsAdfAVvTengeVcQ4I%3D&amp;reserved=0) in Fiji but got the below
>> error message
>>
>> [ERROR] org.tensorflow.TensorFlowException: Could not find SavedModel .pb
>> or .pbtxt at supplied export directory path:
>> C:\Users\Home\DOCUME~1\IM6357~1\FIJI-W~1\Fiji.app\models\microscope-image-quality
>> at org.tensorflow.SavedModelBundle.load(Native Method) at
>> org.tensorflow.SavedModelBundle.access$000(SavedModelBundle.java:27)
>> at org.tensorflow.SavedModelBundle$Loader.load(SavedModelBundle.java:32)
>> at org.tensorflow.SavedModelBundle.load(SavedModelBundle.java:95)
>> at
>> net.imagej.tensorflow.DefaultTensorFlowService.loadModel(DefaultTensorFlowService.java:113)
>> at
>> sc.fiji.imageFocus.MicroscopeImageFocusQualityClassifier.run(MicroscopeImageFocusQualityClassifier.java:182)
>> at org.scijava.command.CommandModule.run(CommandModule.java:199)
>> at org.scijava.module.ModuleRunner.run(ModuleRunner.java:168)
>> at org.scijava.module.ModuleRunner.call(ModuleRunner.java:127)
>> at org.scijava.module.ModuleRunner.call(ModuleRunner.java:66)
>> at
>> org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:228)
>> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>> at
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>> at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>> at java.lang.Thread.run(Thread.java:748)
>>
>> and when I checked the folder models\microscope-image-quality is empty.
>> Where would I find the model files?
>>
>> Best wishes
>>
>> Kees
>>
>>
>> Dr Ir K.R. Straatman
>> Senior Experimental Officer
>>
>> Advanced Imaging Facility
>>
>> Centre for Core Biotechnology Services
>> University of Leicester
>> https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.le.ac.uk%2Fadvanced-imaging-facility&amp;data=02%7C01%7Ckrs5%40leicester.ac.uk%7Ce7d832c548df43d7222e08d7f2680ae5%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C0%7C637244400983800809&amp;sdata=1TsVa0VM1AD3%2FujT7Y48HCKo%2BDD4J9tPk88CaGGNCeg%3D&amp;reserved=0<
>> https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.le.ac.uk%2Fadvanced-imaging-facility&amp;data=02%7C01%7Ckrs5%40leicester.ac.uk%7Ce7d832c548df43d7222e08d7f2680ae5%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C0%7C637244400983800809&amp;sdata=1TsVa0VM1AD3%2FujT7Y48HCKo%2BDD4J9tPk88CaGGNCeg%3D&amp;reserved=0>
>>
>>
>> --
>> ImageJ mailing list: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fimagej.nih.gov%2Fij%2Flist.html&amp;data=02%7C01%7Ckrs5%40leicester.ac.uk%7Ce7d832c548df43d7222e08d7f2680ae5%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C0%7C637244400983810804&amp;sdata=uCNXSEiZr7RlwuZrSAUna9Vc1os46uQssVX3%2BrMeBAQ%3D&amp;reserved=0
>>
>> --
>> ImageJ mailing list: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fimagej.nih.gov%2Fij%2Flist.html&amp;data=02%7C01%7Ckrs5%40leicester.ac.uk%7Ce7d832c548df43d7222e08d7f2680ae5%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C0%7C637244400983810804&amp;sdata=uCNXSEiZr7RlwuZrSAUna9Vc1os46uQssVX3%2BrMeBAQ%3D&amp;reserved=0
>>
>
> --
> ImageJ mailing list: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fimagej.nih.gov%2Fij%2Flist.html&amp;data=02%7C01%7Ckrs5%40leicester.ac.uk%7Ce7d832c548df43d7222e08d7f2680ae5%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C0%7C637244400983810804&amp;sdata=uCNXSEiZr7RlwuZrSAUna9Vc1os46uQssVX3%2BrMeBAQ%3D&amp;reserved=0
>

--
ImageJ mailing list: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fimagej.nih.gov%2Fij%2Flist.html&amp;data=02%7C01%7Ckrs5%40leicester.ac.uk%7Ce7d832c548df43d7222e08d7f2680ae5%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C0%7C637244400983810804&amp;sdata=uCNXSEiZr7RlwuZrSAUna9Vc1os46uQssVX3%2BrMeBAQ%3D&amp;reserved=0

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Microscope Image Focus Quality plugin

Herbie
Thanks for your kind reply Kees!

Yes and no:
As far as I remember, the Image Focus Quality plugin evaluates the focus
quality in image patches. I didn't test how good the absolute focus
measure is, i.e. if the determined quality of the best patch also means
an absolute measure of quality, or if it must be interpreted with regard
to the other patches. In case relative quality with respect to image
patches is concerned, there are good plugins available that are much
faster. (More recently I've written such a plugin that is in beta-state.)

I'm very much interested in what you find out with your experiments!

All the very best

Herbie

:::::::::::::::::::::::::::::::::::::::::::::::::::
Am 07.05.20 um 13:27 schrieb Straatman, Kees (Dr.):

> Thanks for the link Herbie.
> My Idea was to see if I can setup an analysis pipeline for 2D images and
> one of the checks could/would be to see if the image is in focus. On
> several microscope systems we get occasionally images that are out of
> focus and as far as I can see the Microscope Image Focus Quality plugin
> would work on 2D images. However, I understand from the link provided
> that it is slow.
>
> The Focus_LP plugin requires 3D stacks, so is not an option.
>
> Best wishes
>
> Kees
>
> ------------------------------------------------------------------------
> *From:* Herbie <[hidden email]>
> *Sent:* 07 May 2020 10:20
> *Subject:* Re: Microscope Image Focus Quality plugin
> Good day to everybody dealing with this topic!
>
> Please have a look a the directly related thread on the IJ-Forum:
> <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fforum.image.sc%2Ft%2Ffinding-focused-slices%2F27741%2F2&amp;data=02%7C01%7Ckrs5%40leicester.ac.uk%7Ce7d832c548df43d7222e08d7f2680ae5%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C0%7C637244400983800809&amp;sdata=IfdNTHA3e7gJvlzJ5IF52Zz7k0JVGfdNiyol9wy2dSA%3D&amp;reserved=0>
>
> Best regards
>
> Herbie
>
> :::::::::::::::::::::::::::::::::::::::::
> Am 06.05.20 um 21:34 schrieb John Minter:
>> Jeff. are you behind a firewall? I managed to get the Microscope Image
>> Focus Quality plug-in to install on both Win1o and Mac. You are correct
>> that it downloads a lot of data from the google-apis site and it takes a
>> while to do so. I was able to run both the test images and my own. Note: it
>> requires 16 bit images...
>>
>> Best regards,
>> John Minter
>>
>> On Wed, May 6, 2020 at 12:54 PM Jeff C Hanson <
>> [hidden email]> wrote:
>>
>>>          I just tried the microscope image focus quality plugin, too... and
>>> hit the same wall - no trained model available.  Looking through the github
>>> site, the model should be available here -
>>> https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstorage.googleapis.com%2Fmicroscope-image-quality%2Fstatic%2Fmodel%2Fmodel.ckpt-1000042&amp;data=02%7C01%7Ckrs5%40leicester.ac.uk%7Ce7d832c548df43d7222e08d7f2680ae5%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C0%7C637244400983800809&amp;sdata=CXrlPEjnUD6nOIDP8JpcuoaGnwGgIH%2FTmRIUODq1%2Fmg%3D&amp;reserved=0.
>>> But, I get a security violation when I try to access it.
>>>
>>> Thanks,
>>> Jeff
>>>
>>> -----Original Message-----
>>> From: Straatman, Kees (Dr.) <[hidden email]>
>>> Sent: Monday, April 27, 2020 9:49 AM
>>> To: [hidden email]
>>> Subject: [EXTERNAL] Microscope Image Focus Quality plugin
>>>
>>> EXTERNAL EMAIL: Use caution before replying, clicking links, and opening
>>> attachments.
>>>
>>> Dear list and Curtis
>>>
>>> I tried the Microscope Image Focus Quality plugin (
>>> https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fimagej.net%2FMicroscope_Focus_Quality&amp;data=02%7C01%7Ckrs5%40leicester.ac.uk%7Ce7d832c548df43d7222e08d7f2680ae5%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C0%7C637244400983800809&amp;sdata=yZAlPoWiHg9YKUtReDGAnd124BsAdfAVvTengeVcQ4I%3D&amp;reserved=0)
> in Fiji but got the below
>>> error message
>>>
>>> [ERROR] org.tensorflow.TensorFlowException: Could not find SavedModel .pb
>>> or .pbtxt at supplied export directory path:
>>> C:\Users\Home\DOCUME~1\IM6357~1\FIJI-W~1\Fiji.app\models\microscope-image-quality
>>> at org.tensorflow.SavedModelBundle.load(Native Method) at
>>> org.tensorflow.SavedModelBundle.access$000(SavedModelBundle.java:27)
>>> at org.tensorflow.SavedModelBundle$Loader.load(SavedModelBundle.java:32)
>>> at org.tensorflow.SavedModelBundle.load(SavedModelBundle.java:95)
>>> at
>>> net.imagej.tensorflow.DefaultTensorFlowService.loadModel(DefaultTensorFlowService.java:113)
>>> at
>>> sc.fiji.imageFocus.MicroscopeImageFocusQualityClassifier.run(MicroscopeImageFocusQualityClassifier.java:182)
>>> at org.scijava.command.CommandModule.run(CommandModule.java:199)
>>> at org.scijava.module.ModuleRunner.run(ModuleRunner.java:168)
>>> at org.scijava.module.ModuleRunner.call(ModuleRunner.java:127)
>>> at org.scijava.module.ModuleRunner.call(ModuleRunner.java:66)
>>> at
>>> org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:228)
>>> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>>> at
>>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>>> at
>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>>> at java.lang.Thread.run(Thread.java:748)
>>>
>>> and when I checked the folder models\microscope-image-quality is empty.
>>> Where would I find the model files?
>>>
>>> Best wishes
>>>
>>> Kees
>>>
>>>
>>> Dr Ir K.R. Straatman
>>> Senior Experimental Officer
>>>
>>> Advanced Imaging Facility
>>>
>>> Centre for Core Biotechnology Services
>>> University of Leicester
>>> https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.le.ac.uk%2Fadvanced-imaging-facility&amp;data=02%7C01%7Ckrs5%40leicester.ac.uk%7Ce7d832c548df43d7222e08d7f2680ae5%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C0%7C637244400983800809&amp;sdata=1TsVa0VM1AD3%2FujT7Y48HCKo%2BDD4J9tPk88CaGGNCeg%3D&amp;reserved=0<
>>> https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.le.ac.uk%2Fadvanced-imaging-facility&amp;data=02%7C01%7Ckrs5%40leicester.ac.uk%7Ce7d832c548df43d7222e08d7f2680ae5%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C0%7C637244400983800809&amp;sdata=1TsVa0VM1AD3%2FujT7Y48HCKo%2BDD4J9tPk88CaGGNCeg%3D&amp;reserved=0>
>>>
>>>
>>> --
>>> ImageJ mailing list: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fimagej.nih.gov%2Fij%2Flist.html&amp;data=02%7C01%7Ckrs5%40leicester.ac.uk%7Ce7d832c548df43d7222e08d7f2680ae5%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C0%7C637244400983810804&amp;sdata=uCNXSEiZr7RlwuZrSAUna9Vc1os46uQssVX3%2BrMeBAQ%3D&amp;reserved=0
>>>
>>> --
>>> ImageJ mailing list: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fimagej.nih.gov%2Fij%2Flist.html&amp;data=02%7C01%7Ckrs5%40leicester.ac.uk%7Ce7d832c548df43d7222e08d7f2680ae5%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C0%7C637244400983810804&amp;sdata=uCNXSEiZr7RlwuZrSAUna9Vc1os46uQssVX3%2BrMeBAQ%3D&amp;reserved=0
>>>
>>
>> --
>> ImageJ mailing list: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fimagej.nih.gov%2Fij%2Flist.html&amp;data=02%7C01%7Ckrs5%40leicester.ac.uk%7Ce7d832c548df43d7222e08d7f2680ae5%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C0%7C637244400983810804&amp;sdata=uCNXSEiZr7RlwuZrSAUna9Vc1os46uQssVX3%2BrMeBAQ%3D&amp;reserved=0
>>
>
> --
> ImageJ mailing list:
> https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fimagej.nih.gov%2Fij%2Flist.html&amp;data=02%7C01%7Ckrs5%40leicester.ac.uk%7Ce7d832c548df43d7222e08d7f2680ae5%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C0%7C637244400983810804&amp;sdata=uCNXSEiZr7RlwuZrSAUna9Vc1os46uQssVX3%2BrMeBAQ%3D&amp;reserved=0

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html