Skip to content

Conversation

@YUNQIUGUO
Copy link
Contributor

@YUNQIUGUO YUNQIUGUO commented Feb 17, 2023

  • Update SuperRes ios app to released version ort-ext pods and opset18 version model
  • Refine app UI to display the output image in one screen
  • Readme updates

@YUNQIUGUO
Copy link
Contributor Author

YUNQIUGUO commented Feb 17, 2023

I also tried to update the way to register custom ops using function name approach here , but got a symbol not found error, not sure if any extra set up is required:

if (RegisterCustomOps(session_options, OrtGetApiBase()) != nullptr) {
throw std::runtime_error("RegisterCustomOps failed");
}

using:
session_options.RegisterCustomOpsUsingFunction("RegisterCustomOps");
and latest ort-ext pod and onnxruntime-c pod

# Pre-release version pods
pod 'onnxruntime-extensions-c', '0.5.0-dev+261962.e3663fb'
# Release version pod for ort-ext
pod 'onnxruntime-extensions-c', '0.6.0'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just use the latest?

Suggested change
pod 'onnxruntime-extensions-c', '0.6.0'
pod 'onnxruntime-extensions-c'

Copy link
Contributor

@natke natke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of minor comments


- [Android Super Resolution](examples/super_resolution/android)
- [iOS Super Resolution](examples/speech_recognition/ios)
- [iOS Super Resolution](examples/super_resolution/ios)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good spot!

objects = {

/* Begin PBXBuildFile section */
510A53D6296DE390000DB268 /* pt_super_resolution_with_pre_post_processing_opset16.onnx in Resources */ = {isa = PBXBuildFile; fileRef = 510A53D5296DE390000DB268 /* pt_super_resolution_with_pre_post_processing_opset16.onnx */; };
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this file be under source control?

Copy link
Contributor Author

@YUNQIUGUO YUNQIUGUO Feb 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the older opset16 version model, do we still want to keep that model in the project?

also fyi .pbxproj file updates are auto-generated after updating the ios app.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer we only have the opset 18 model given that will have significantly better output.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also fyi .pbxproj file updates are auto-generated after updating the ios app.

That's why I wondered the pbxporj file should be under version control? If it gets re-generated. Not a biggie

5130D9C32968B93C009B4B88 /* Preview Assets.xcassets in Resources */,
5130D9C02968B93C009B4B88 /* Assets.xcassets in Resources */,
510A53E8296FE46F000DB268 /* cat_224x224.png in Resources */,
5197BE9E29A026B3004B83DE /* pytorch_superresolution_with_pre_post_processing_op18.onnx in Resources */,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: 'op18' is a bit obtuse vs 'opset18'.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True! I did confuse op16 with fp16 :-)

}

if performSuperRes {
Text("Output high resolution image: ").frame(width: 350, height: 40, alignment:.leading)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: would 'higher resolution image' lower user expectations of extra special magic happening?

objects = {

/* Begin PBXBuildFile section */
510A53D6296DE390000DB268 /* pt_super_resolution_with_pre_post_processing_opset16.onnx in Resources */ = {isa = PBXBuildFile; fileRef = 510A53D5296DE390000DB268 /* pt_super_resolution_with_pre_post_processing_opset16.onnx */; };
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer we only have the opset 18 model given that will have significantly better output.

5130D9C02968B93C009B4B88 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5130D9BF2968B93C009B4B88 /* Assets.xcassets */; };
5130D9C32968B93C009B4B88 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5130D9C22968B93C009B4B88 /* Preview Assets.xcassets */; };
5197BEA129A0492D004B83DE /* pytorch_superresolution_with_pre_post_processing_opset18.onnx in Resources */ = {isa = PBXBuildFile; fileRef = 5197BEA029A0492D004B83DE /* pytorch_superresolution_with_pre_post_processing_opset18.onnx */; };
5197BEA229A0492D004B83DE /* pytorch_superresolution_with_pre_post_processing_opset18.onnx in Resources */ = {isa = PBXBuildFile; fileRef = 5197BEA029A0492D004B83DE /* pytorch_superresolution_with_pre_post_processing_opset18.onnx */; };
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are there two entries here for pytorch_superresolution_with_pre_post_processing_opset18.onnx? was it added twice?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are there two entries here for pytorch_superresolution_with_pre_post_processing_opset18.onnx? was it added twice?

I think one is for ORTSuperResolution and one is for ORTSuperResolutionTest. I added the model to both targets.

@YUNQIUGUO YUNQIUGUO merged commit 7f6a172 into main Feb 22, 2023
@YUNQIUGUO YUNQIUGUO deleted the yguo/update-ios-superes-to-official-package branch February 22, 2023 16:40
Copy link
Contributor

@shahicasper shahicasper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

apply

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.

6 participants