Skip to content

Conversation

@jdp8
Copy link
Contributor

@jdp8 jdp8 commented Dec 30, 2023

Description

The changes include adding the Pose Estimation & Semantic Segmentation Annotator models along with the pre-processing functions required to get the ControlNet input image which is done using OpenCV.js.

Specific Changes

  • Add examples/react/src/annotator_helper_functions.ts file which contains necessary functions to run both models.
  • Add Annotator model and Annotator config upload elements in examples/react/src/App.tsx.
  • Modify uploadImage() function in examples/react/src/App.tsx to account for Pose Estimation & Semantic Segmentation.

Notes

  • Pose Estimation was taken from here.
  • Semantic Segmentation was taken from here.
  • The Pose Estimation and Semantic Segmentation models can be downloaded from here.
  • Getting the annotated image takes ~17s with Semantic Segmentation and 17-24s with Pose Estimation (depends on the selected model) on an M2 Max.
  • The annotator files must be uploaded before uploading the ControlNet image.
  • I'll submit an issue asking if it's possible to convert all the Annotator models to ONNX which would give us access to every ControlNet model in JavaScript.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant