deepimagej / models

4 stars 5 forks source link

add singleton b and c dims #24

Closed FynnBe closed 3 years ago

FynnBe commented 3 years ago

added missing batch and channel dimensions to https://github.com/deepimagej/models/blob/master/fru-net_sev_segmentation/resultImage.npy axes of outputs[0] are described as "byxc"

>>> import numpy
>>> a = numpy.load("resultImage.npy")
>>> a.shape
(1264, 1264)
>>> numpy.save("resultImage.npy", a[None, ..., None])
FynnBe commented 3 years ago

No idea if the model actually excepts the input that I modified in the same manner in https://github.com/deepimagej/models/pull/22 and actually produces this 4d output, so you might want to look into that, too.

This will hopefully fix the failing tests in https://github.com/bioimage-io/spec-bioimage-io/blob/master/tests/test_build_spec.py

esgomezm commented 3 years ago

Thank you @FynnBe ! I just noticed it today trying Constantin's model. We need to change this in deepImageJ as it saves the example image without considering the batch dimension :(

esgomezm commented 3 years ago

A wait! could this one depend on the pre-processing?

FynnBe commented 3 years ago

this particular change is influenced by the post-processing I suppose... test_input -> pre-processing -> nn model -> post-processing -> test_output

But I did change the exampleInput.npy in #22

we really need the dynamic tests, so test_inputs/outputs are actually validated!