mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-08-30 16:58:03 +08:00
Fix bugs
This commit is contained in:
@@ -473,7 +473,7 @@ def get_image_metric(attributes):
|
||||
"mae": lambda im1, im2: numpy.abs(im1 - im2).mean(),
|
||||
"mse": lambda im1, im2: numpy.square((im1 - im2).astype(float)).mean(),
|
||||
"rms": lambda im1, im2: math.sqrt(numpy.square((im1 - im2).astype(float)).mean()),
|
||||
"fro": lambda im1, im2: numpy.linalg.norm(im1 - im2, "fro"),
|
||||
"fro": lambda im1, im2: numpy.linalg.norm((im1 - im2).reshape(1, -1), "fro"),
|
||||
"iou": lambda im1, im2: 1 - intersection_over_union(im1, im2),
|
||||
}
|
||||
try:
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 82 B |
Binary file not shown.
@@ -9,6 +9,7 @@
|
||||
<data name="out" format="data"/>
|
||||
</outputs>
|
||||
<tests>
|
||||
<!-- test pair of equal images (but different formats) -->
|
||||
<test>
|
||||
<param name="in" value="im1_uint8.png" />
|
||||
<output name="out" value="im1_uint8.png" compare="image_diff" metric="mae" />
|
||||
@@ -21,9 +22,15 @@
|
||||
<param name="in" value="im1_uint8.png" />
|
||||
<output name="out" value="im1_uint8.png" compare="image_diff" metric="rms" eps="0" />
|
||||
</test>
|
||||
<!-- test pair of different images -->
|
||||
<test>
|
||||
<param name="in" value="im2_a.png" />
|
||||
<output name="out" value="im2_b.png" compare="image_diff" metric="mae" eps="0.25" />
|
||||
</test>
|
||||
<!-- test RGB data -->
|
||||
<test>
|
||||
<param name="in" value="im3_a.png" />
|
||||
<output name="out" value="im3_b.tif" compare="image_diff" metric="fro" eps="256" />
|
||||
</test>
|
||||
</tests>
|
||||
</tool>
|
||||
|
||||
Reference in New Issue
Block a user