[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Swift Tests for iOS Image Searcher and include ImageSearcher API in TFLiteTaskVision pod #893

Merged

Conversation

priankakariatyml
Copy link
Contributor
  1. Added Swift Tests
  2. Included image searcher in iOS vision framework for coocoapods

@priankakariatyml
Copy link
Contributor Author

@khanhlvg @schmidt-sebastian Raised a PR for Swift Tests

@khanhlvg khanhlvg changed the title Added Swift Tests for iOS Image Searcher Added Swift Tests for iOS Image Searcher and include ImageSearcher API in TFLiteTaskVision pod Oct 20, 2022
@@ -213,6 +229,7 @@ ios_static_framework(
":TFLAudioRecord.h",
":TFLAudioTensor.h",
":TFLBaseOptions.h",
":TFLExternalFile.h",
Copy link
Member

Choose a reason for hiding this comment

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

Why do you need to add TFLExternalFile to the Audio framework?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

TFLBaseOptions also needs TFLExternalFile for defining the model file. Before the image searcher APIs were added TFLExternalFile was defined in TFLBaseOptions.h.
But searcher needed TFLExternalFile in TFLSearchOptions as well for defining the index file. Hence the class definition was moved to a separate file. So all frameworks that use TFLBaseOptions needs to include TFLExternalFile.h as well.

Copy link
Member
@khanhlvg khanhlvg Oct 21, 2022

Choose a reason for hiding this comment

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

I see. Thanks for the clarification.

Copy link
Member
@khanhlvg khanhlvg left a comment

Choose a reason for hiding this comment

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

Thanks Prianka. Just one minor issue that I'll fix myself.

do {
let imageSearcher = try ImageSearcher.searcher(
options: options)
XCTAssertNil(imageSearcher)
Copy link
Member

Choose a reason for hiding this comment

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

An error is already thrown when you create the imageSearcher so this assert will not get called. You'll need to do the assert outside of the do-catch statement.

I'll fix it when I import the PR.

@copybara-service copybara-service bot merged commit 1407175 into tensorflow:master Oct 21, 2022
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.

None yet

2 participants