Test issue in semantic segmentation using DL4J

Hi everyone,
I have a trained semantic model based on U-net. I have 34 test images with the corresponding ground truth, i want to test image by image and finally calculate the mean and standard deviation of accuracy, f1 score, recall, and precision. When i put all 34 images in the test folder and evaluation image by image i get good results but when i put in the test folder just one image that i want to test, i get poor results i don’t know what is the source of this issue.

The following code is used test the model image by image: https://gist.github.com/AbdelmajidB/92f5fc3013c81b28c898b64118b6adb5

Hi, It’s hard to tell what is wrong without more code. How are you verifying they are different? How different are the results? The eval stats for the one image you are testing should be the same irrespective of the other images in the folder since you are doing a reset.

Hi eraly, thank you for your reply.

i have trained a U-net based model on DL4J on medical images. The code above is for testing the model. my objective is to test the model on 34 2d medical images separately and get the segmentation metrics (accuracy, recall…) for each image, so i tried two ways:
1- when i put all the 34 images in the test folder (“testI”) and i run the code above which will load all the images and test image by image i get good segmentation performance for all the images (even without reset() method),
2- but when i put just one image that i want to test from the 34 in test folder and i execute the code above i get bad results in term of accuracy, recall…), that means i get different segmentation results for the same images by using the two approaches.
This is my label generator code: MyPathLabelGenerator.java · GitHub

Can you file an issue with the model? Thanks

i didn’t understand your question, if you talk about the DL model, i use U-net version available in DL4j, which works will, i have just an issue in test phase that i can’t understand.

Hi, If it’s just the u-net version available in DL4J that’s fine. The earlier post says “model based on U-net”.

Can you still file an issue anyway? Since this sounds like a bug.

yes i used the standard version available in DL4J with some changes in the hyper-parameters. Yes i can file an issue but where? is here: Issues · eclipse/deeplearning4j · GitHub

i opened an issue here: Test issue in semantic segmentation using DL4J · Issue #8644 · eclipse/deeplearning4j · GitHub