-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1109 refactor augmentations/transformations (#1111)
* moved transformations to cv.py; added colorspace transforms * add parts for crop and trapeze transformations * Update training to use new transformations - image_transformations.py use cv.py parts for transforms - augmentations2.py remove old transformations - training.py updated to allow for transformations both before and after training augmentation. - cfg_complete.py added new tranformation config and a lot of documentation comments. * Port albumentations augmentations from Dirk's branch - replace imgaug with albumentations - update install to include albumentations * transforms from gray to color, cvcam resizes - conversions from grey to BGR and RGB - fixed CvCam so it will resize the image if the camera does not produce the desired size. * Update deep learning to show inference image - Now we can show the image used for inference when in autopilot mode. set `SHOW_PILOT_IMAGE` to True. * augmentations use albumentations library - ported from Dirk's branch - remove transformations from ImageAugmentation class in favor of new transformations in ImageTransformations class * Can now add a custom image transformation to pipeline - name the label starting with "CUSTOM", like "CUSTOM_CROP" - include config to use to get the module and class names. these being with the custom label and end with "_MODULE" and "_CLASS" respectively, like "CUSTOM_CROP_MODULE" and "CUSTOM_CROP_CLASS" - The custom transformer class must take a Config instance in the constructor and must have a run method that takes and image and returns an image. * Change custom transformation loader to use file path - the prior design did not work for both driving from the mycar folder and training (which uses the donkey module) - the new design dynamically loads the module given it's file path and caches it. As long as the file path is either an absolute path then this will work when driving or training without changing myconfig.py. - this design allows more then on custom transformer class per file. * Change imgaug -> albumentations in the UI. Update yaml files to remove opencv-headless which clashes w/ opencv. Unfreeze numpy version. * Peg numpy to 1.19 in order to be aligned w/ tf 2.2.0 and replace remaining instances of MULTIPLY with BRIGHTNESS. * Align interface of ImageTransformations with ImageAugmentations to take a config and a string, representing the key of transformations in the config file, and another optional string of post transformations. Update ui to support pre and post transformations. * version='4.4.dev7' --------- Co-authored-by: DocGarbanzo <[email protected]>
- Loading branch information
1 parent
41b326d
commit 5e234c3
Showing
16 changed files
with
1,153 additions
and
203 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.