Step 1.1 Create the retrain data:
Go to membrane prediction data (a). Create the binary version of the prediction data by using the ImageMagick command:
convert $input.png -threshold 50% $output.png
Step 1.2 Create the augmented data using CDeep3M
PreprocessTrainingData.py /images /labels /mem_augmented
Step 1.3 Feed the retrain data to the model (membranes_Aug05_40k) that I picked
runtraining.sh --additerations 5000 --retrain ~/W9CDEEP3M50772 ~/mem_augmented ~/mem_retrain_out
Step 2.1 Convert the Myelin prediction result (c) to the binary format:
convert $input.png -threshold 50% $output.png
Step 2.2 Create the augmented data using CDeep3M:https://github.com/slash-segmentation/Membrane_Myelin_Subtract/blob/main/getMembraneOnly.php
PreprocessTrainingData.py /myelin_images /myelin_labels /myelin_augmented
Con
Step 2.3 Create the training model:
runtraining.sh --numiterations 50000 /myelin_augmented /myelin_trainednet
Step 3.1 Run the CDeep3M on the membrane using the training model in step 1:
runprediction.sh --augspeed 10 --models 1fm ~/mem_retrain_out
~/em ~/membrane_predictions
Prediction:
Note that the prediction result contains the myelin layer.
Step 3.2 Run the CDeep3M on the Myelin data:
runprediction.sh --augspeed 10 --models 1fm ~/myelin_trainednet
~/em ~/myelin_predictions
Step 4 Subtract the myelin layer from the membrane prediction
Convert the membrane result to the binary format:
https://github.com/slash-segmentation/Membrane_Myelin_Subtract/blob/main/convert2Bin.php
Convert the myelin result to the binary format:
https://github.com/slash-segmentation/Membrane_Myelin_Subtract/blob/main/myelin2Bin.php
Invert the myelin binary result:
https://github.com/slash-segmentation/Membrane_Myelin_Subtract/blob/main/invertMyelin.php
Extract the membrane result without myelin:
https://github.com/slash-segmentation/Membrane_Myelin_Subtract/blob/main/getMembraneOnly.php
Create the membrane only overlay:
https://github.com/slash-segmentation/Membrane_Myelin_Subtract/blob/main/runOverlay.php