diff --git a/Changes.md b/Changes.md index b836392d358..a4533a20050 100644 --- a/Changes.md +++ b/Changes.md @@ -1,6 +1,15 @@ 1.5.x.x (relative to 1.5.0.1) ======= +Features +-------- + +- GafferML : Added a new module with the following nodes for running maching learning models via ONNX Runtime : + - DataToTensor : Converts Gaffer data to tensors. + - Inference : Loads ONNX models and performance inference using an array of input tensors. + - ImageToTensor : Converts images to tensors for use with the Inference node. + - TensorToImage : Converts tensors back to images following inference. + Improvements ------------ diff --git a/startup/gui/menus.py b/startup/gui/menus.py index 3d11f018454..260e976bb2c 100644 --- a/startup/gui/menus.py +++ b/startup/gui/menus.py @@ -555,6 +555,18 @@ def __usdLightCreator( lightType ) : nodeMenu.append( "/Dispatch/Frame Mask", GafferDispatch.FrameMask, searchText = "FrameMask" ) nodeMenu.append( "/Dispatch/Local Dispatcher", GafferDispatch.LocalDispatcher, searchText = "LocalDispatcher" ) +# ML nodes + +if os.environ.get( "ONNX_ROOT" ) and moduleSearchPath.find( "GafferML" ) : + + import GafferML + import GafferMLUI + + nodeMenu.append( "/ML/Data To Tensor", GafferML.DataToTensor, searchText = "DataToTensor" ) + nodeMenu.append( "/ML/Image To Tensor", GafferML.ImageToTensor, searchText = "ImageToTensor" ) + nodeMenu.append( "/ML/Tensor To Image", GafferML.TensorToImage, searchText = "TensorToImage" ) + nodeMenu.append( "/ML/Inference", GafferML.Inference, searchText = "Inference" ) + # Utility nodes nodeMenu.append( "/Utility/Expression", Gaffer.Expression )