train_unet
About
multi-class semantic segmentation using Unet
Train UNet model for semantic segmentation.
🚀 Use with Ikomia API
1. Install Ikomia API
We strongly recommend using a virtual environment. If you're not sure where to start, we offer a tutorial here.
pip install ikomia
2. Create your workflow
from ikomia.dataprocess.workflow import Workflow# Init your workflowwf = Workflow()# Add dataset loadercoco = wf.add_task(name="dataset_coco")coco.set_parameters({"json_file": "path/to/json/annotation/file","image_folder": "path/to/image/folder","task": "semantic_segmentation",})# Add training algorithmtrain = wf.add_task(name="train_unet", auto_connect=True)# Launch your training on your datawf.run()
☀️ Use with Ikomia Studio
Ikomia Studio offers a friendly UI with the same features as the API.
-
If you haven't started using Ikomia Studio yet, download and install it from this page.
-
For additional guidance on getting started with Ikomia Studio, check out this blog post.
📝 Set algorithm parameters
- input_size (int) - default '128': Size of the input image.
- epochs (int) - default '50': Number of complete passes through the training dataset.
- batch_size (int) - default '1': Number of samples processed before the model is updated.
- learning_rate (float) - default '0.001': Step size at which the model's parameters are updated during training.
- val_percent (int) – default '10': Divide the dataset into train and evaluation sets.
- num_channels (int) - default '3': Number of input chanel
- output_folder (str, optional): path to where the model will be saved.
Parameters should be in strings format when added to the dictionary.
from ikomia.dataprocess.workflow import Workflow# Init your workflowwf = Workflow()# Add dataset loadercoco = wf.add_task(name="dataset_coco")coco.set_parameters({"json_file": "path/to/json/annotation/file","image_folder": "path/to/image/folder","task": "semantic_segmentation",})# Add training algorithmtrain = wf.add_task(name="train_unet", auto_connect=True)train.set_parameters({"batch_size": "1","epochs": "50","input_size": "128","val_percent": "10","learning_rate": "0.01","num_channels": "3"})# Launch your training on your datawf.run()
Developer
Ikomia
License
GNU General Public License v3.0
Permissions of this strong copyleft license are conditioned on making available complete source code of licensed works and modifications, which include larger works using a licensed work, under the same license. Copyright and license notices must be preserved. Contributors provide an express grant of patent rights.
Permissions | Conditions | Limitations |
---|---|---|
Commercial use | License and copyright notice | Liability |
Modification | State changes | Warranty |
Distribution | Disclose source | |
Patent use | Same license | |
Private use |
This is not legal advice: this description is for informational purposes only and does not constitute the license itself. Provided by choosealicense.com.