-
Notifications
You must be signed in to change notification settings - Fork 1
Adding networks
Volker edited this page Aug 12, 2020
·
5 revisions
- Fork the dl4mic-project.
- Clone the code of your forked repository.
- In the folder
dl4mic/networks
add a folder with the name of your network.
- You need two python-scripts in the newly created folder:
train.py
andpredict.py
. A third script evaluate.py can be provided to run an evaluation of the trained network.
- Add three yml-files
train.ylm
,predict.yml
andevaluate.yml
defining and describing the options of each script. These files will define the command-line options of the python scripts and they will be read by ImageJ. ImageJ will use them to create a parameter-dialog and pass the values to the python scripts.
-
In your scripts use
parser = ParserCreator.createArgumentParser("./evaluate.yml")
to create a parser from the corresponding yml-file and use the parser to parse the command line optionsargs = parser.parse_args(argv[1:])
-
Pass the option values on to your network and run the training, prediction or evaluation.
-
When finished the script must output a marker, so that ImageJ will know that it finished. Use
print("---training done---")
,print("---evaluation done---")
orprint("---prediction done---")
in the corresponding scripts. -
Put a html file named
info.html
about your network into the folder of the network. It can use an image namedpicture.png
from the same folder. This file will be displayed when the user presses the info-button in ImageJ.
- Test and when everything works, push everything to your forked git-hub repository and make a pull-request.