Skip to content

Commit

Permalink
GUI startup : Add GafferML nodes to NodeMenu
Browse files Browse the repository at this point in the history
And advertise them in Changes.md.
  • Loading branch information
johnhaddon committed Nov 15, 2024
1 parent 6114370 commit 154c7be
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Changes.md
Original file line number Diff line number Diff line change
@@ -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
------------

Expand Down
12 changes: 12 additions & 0 deletions startup/gui/menus.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down

0 comments on commit 154c7be

Please sign in to comment.