This repository has been archived by the owner on Apr 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 120
Training the multiclass segmentation NN
Vikram Tholakapalli edited this page Oct 1, 2020
·
1 revision
-
Convert images to npy (Skip if already using npy files) Use:
ConvertImages.ipynb
located inShared Drives > RoboNav > Previous Year Resources > 2019-2020 Season > Software > Collab Notebooks > ConvertImages.ipynb
- Upload your images and masks to your google drive (Get masks and images from http://cloud.robojackets.org)
- Get the google drive path to the folder containing your images and masks
- Replace: images_path and masks_path with the folders containing your images and masks
- The resulting npy files will be placed in the same drive location
-
Use the UNetWithEfficientNet.ipynb located in
Shared Drives > RoboNav > Previous Year Resources > 2019-2020 Season > Software > Collab Notebooks > UNetWithEfficientNet.ipynb
- Replace the train_images, train_masks, test_images, and test_masks with the npy files you want to train the neural net on
- Click run all
- Use python3.7 and download the dependencies in requirements.txt manually or using
pip install -r requirements.txt
. - Obtain a dataset containing the images (PNGs) and masks (JSONs). Skip steps #2 and #3 if using .npy files.
- Run
python make_dataset.py -images /path_to_images(png) -masks /path_to_masks(json)
to generate .npy files. Example:python make_dataset.py -images 'annotations/**/*.png' -masks 'annotations/**/*.json'
- Establish train_images.npy, train_masks.npy, test_images.npy, and test_masks.npy files with
python split_data.py -images '/path_to_images.npy' -masks '/path_to_masks.npy'
- Run
python train.py -train_images '/path_to_train_images' -train_masks '/path_to_train_masks' -test_images '/path_to_test_images' -test_masks '/path_to_test_masks'
to train and test the neural network.