Skip to content

Conversation

husthyc
Copy link
Contributor

@husthyc husthyc commented Apr 1, 2021

Stack from ghstack:

How to build & run the test app via Xcode

  • cd to ios/VisionTestApp
  • run ./setup.sh (this step requires your wget is pre-installed and make sure your Python torch and Python vision are up to date so that the model is able to be generated)
  • open VisionTestApp.xcodeproj using Xcode
  • build & run (supports both simulators and real devices)
  • check if the benchmark results can be displayed on the view
  • if you want to check in some code, make sure you run ./clean.sh before commit so that the model file and static libs will not be committed

husthyc added a commit that referenced this pull request Apr 1, 2021
ghstack-source-id: 05cd348
Pull Request resolved: #3629
husthyc added a commit that referenced this pull request Apr 1, 2021
ghstack-source-id: 3c39987
Pull Request resolved: #3629
@husthyc husthyc requested a review from fmassa April 1, 2021 20:11
husthyc added a commit that referenced this pull request Apr 1, 2021
ghstack-source-id: d45f785
Pull Request resolved: #3629
@fmassa
Copy link
Member

fmassa commented Apr 8, 2021

Hi @husthyc

Is the PR ready for review? Could you extend the description in the PR with instructions on how to get the app running?
Also, can it be run on an emulator?

husthyc added a commit that referenced this pull request Apr 9, 2021
ghstack-source-id: ba4620e
Pull Request resolved: #3629
@husthyc
Copy link
Contributor Author

husthyc commented Apr 9, 2021

Hi @husthyc

Is the PR ready for review? Could you extend the description in the PR with instructions on how to get the app running?
Also, can it be run on an emulator?

  • Yes, I think its now ready for review. Instructions updated.
  • Yes, it can be run on a simulator.

### How to build & run the test app via Xcode
- `cd` to `ios/VisionTestApp`
- run `./setup.sh`
- open `VisionTestApp.xcodeproj` using Xcode
- build & run (supports both simulators and real devices)
- check if the benchmark result can be displayed on the view
- if you want to check in some code, make sure you run `./clean.sh` before commit so that the model file and static libs will not be committed

[ghstack-poisoned]
husthyc added a commit that referenced this pull request Apr 9, 2021
ghstack-source-id: 0b1e18f
Pull Request resolved: #3629
@NicolasHug
Copy link
Member

@husthyc I gave this a go and getting the app to run was very simple, thanks!

I noticed that currently a dummy image is used, leading to zero detections. Would it be possible to show the forward pass on a real image in order to have a more robust coverage of the pipeline? Thanks!

@husthyc
Copy link
Contributor Author

husthyc commented Apr 20, 2021

@husthyc I gave this a go and getting the app to run was very simple, thanks!

I noticed that currently a dummy image is used, leading to zero detections. Would it be possible to show the forward pass on a real image in order to have a more robust coverage of the pipeline? Thanks!

Sure, will update accordingly.

@husthyc husthyc requested a review from NicolasHug April 20, 2021 17:40
@NicolasHug
Copy link
Member

NicolasHug commented May 5, 2021

Hi @husthyc , just checking in: I see you have requested a review from me but I don't think the PR has been updated since my last comment: #3629 (comment)

Did you get a chance to implement the forward pass on a real image? Thanks!

@NicolasHug NicolasHug merged commit 09231d4 into gh/husthyc/3/base May 10, 2021
@NicolasHug
Copy link
Member

Thanks for your work so far @husthyc !
I just merged it since the feature freeze is approaching fast and it seems like it's properly working already.

A follow-up PR using real input would be very welcome :)

CC @fmassa

@fmassa
Copy link
Member

fmassa commented May 10, 2021

@NicolasHug note that the PR that you merged (which was sent with ghstack) was not merged in master but in a ghstack branch. You'll need to cherry-pick this commit into a commit that needs to be sent to master

NicolasHug pushed a commit to NicolasHug/vision that referenced this pull request May 10, 2021
@fmassa fmassa deleted the gh/husthyc/3/head branch May 10, 2021 18:21
NicolasHug added a commit that referenced this pull request May 11, 2021
facebook-github-bot pushed a commit that referenced this pull request May 17, 2021
…3806)

Summary: Co-authored-by: Yuchen Huang <hyc@fb.com>

Reviewed By: datumbox

Differential Revision: D28473333

fbshipit-source-id: 576f936968046ac7fdfe63a6fead46d6aeaef369
@devbooleans
Copy link

@husthyc I am unable to build the VisionTestApp. The libraries fails to build with the below error. Is there any additional build settings to be made to run the source.

Undefined symbols for architecture arm64: "torch::jit::Object::find_method(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const", referenced from: torch::jit::Object::get_method(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const in ModelRunner.o "torch::jit::Method::operator()(std::__1::vector<c10::IValue, std::__1::allocator<c10::IValue> >, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, c10::IValue, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, c10::IValue> > > const&)", referenced from: torch::jit::Module::forward(std::__1::vector<c10::IValue, std::__1::allocator<c10::IValue> >) in ModelRunner.o "torch::jit::Module::train(bool)", referenced from: torch::jit::Module::eval() in ModelRunner.o "torch::jit::load(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, c10::optional<c10::Device>)", referenced from: +[ModelRunner run] in ModelRunner.o ld: symbol(s) not found for architecture arm64

Xcode version: 12.5
Deployment Target : 14.1 (iPhone device)

@MaddyThakker
Copy link

MaddyThakker commented Jul 10, 2022

@husthyc I am unable to build the VisionTestApp. The libraries fails to build with the below error. Is there any additional build settings to be made to run the source.

@devbooleans any updates? I am also facing the same issue. Thanks a lot!

@Sabit-Ahmed
Copy link

@husthyc I am unable to build the VisionTestApp. The libraries fails to build with the below error. Is there any additional build settings to be made to run the source.

Undefined symbols for architecture arm64: "torch::jit::Object::find_method(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const", referenced from: torch::jit::Object::get_method(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const in ModelRunner.o "torch::jit::Method::operator()(std::__1::vector<c10::IValue, std::__1::allocator<c10::IValue> >, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, c10::IValue, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, c10::IValue> > > const&)", referenced from: torch::jit::Module::forward(std::__1::vector<c10::IValue, std::__1::allocator<c10::IValue> >) in ModelRunner.o "torch::jit::Module::train(bool)", referenced from: torch::jit::Module::eval() in ModelRunner.o "torch::jit::load(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, c10::optional<c10::Device>)", referenced from: +[ModelRunner run] in ModelRunner.o ld: symbol(s) not found for architecture arm64

Xcode version: 12.5 Deployment Target : 14.1 (iPhone device)

facing the same issue

@bruno1308
Copy link

For those with problems, go to the Build Phases on XCode and add all the content of the lib folder that was generated on the setup.sh step. It should be next to your project's folder.

It should look like this in the end:
image

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants