An inference notebook is available in the root directory of the repository. You can run it locally or through Google Colaboratory without any major modifications of the script.
At that time, you will at least need the following resources to run the inference notebook :
-
One or more weights file(s) (a weights file is a folder containing an
assets,variablesfolder and asaved_model.pbfile, they might be zipped so you need to unzip it) in the same folder as the different tools. Images should be put in a sub-directory namedimages\<Mode name>; -
An image to start an inference, it should be placed in a directory named
imagesin a subdirectory named as the inference mode you want to use with it (for example, a subdirectory namesmain).To get performance metrics for an image, you will also need an annotations file (see Supported formats) having the same name as the image in the same folder.
You will find specific requirements for Google Colaboratory in the Using the Inference Notebook with Google Colaboratory page.
You will need the Python environment installed (see Installation Guide [FR ver.]).
You will find the specific configuration explanation for Google Colaboratory in the Using the Inference Notebook with Google Colaboratory page.
Simply start Jupyter via the shortcut created during the Installation Guide [FR ver.] or by starting an Anaconda (or Miniconda) prompt, navigating to the repository folder using cd command, activating the environment via conda activate Skinet, and finally by starting Jupyter using jupyter notebook.
mode = 'chain'
displayMode = "All steps" #@param ["All steps", "Only statistics"]
forceFullSizeMasks = False #@param {type:"boolean"}
forceLowMemoryUsage = False #@param {type:"boolean"}
saveResults = True #@param {type:"boolean"}
saveDebugImages = False #@param {type:"boolean"}
moveAutoCleanedImageToNextMode = True #@param {type:"boolean"}These parameters will control which mode the Inference Tool will run and how much text will be displayed.
mode: The name of the inference mode to use. Note that 'chain' will use multiple modes.displayMode: Whether to display every step ("All steps") of an inference, or only statistics ("Only statistics").
Next parameters are booleans variables so they can take True or False as value:
-
forceFullSizeMasks: Whether to force usage of full-sized masks instead of mini-masks. -
forceLowMemoryUsage: Force low-memory mode to use the least RAM as possible. -
saveResults: Whether to save the results or not. -
saveDebugImages: Whether to save debug images between post-processing methods. -
moveAutoCleanedImageToNextMode: Whether to move automatically cleaned image image into next mode input folder.