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

Model returns no predictions #27

Open
antz22 opened this issue Nov 7, 2021 · 2 comments
Open

Model returns no predictions #27

antz22 opened this issue Nov 7, 2021 · 2 comments

Comments

@antz22
Copy link

antz22 commented Nov 7, 2021

I'm not sure if this is a result of null safety issues or from outdated flutter code, but after I tried upgrading this repo myself to sound null safety, when I run the camera preview, there are no predictions outputted by the model.

I have followed everything in the article / blog but when I have the camera open on the HomeView, I don't see any bounding boxes when I go near any objects, and I just see a camera preview.

Is anyone else experiencing this issue? I have not attached any logs because the issue is that I can't see anything outputted.

@antz22
Copy link
Author

antz22 commented Nov 7, 2021

I think I was just able to solve this issue by adding this to my code:

Not really sure why this works but it helped me.

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  // new
  SystemChrome.setPreferredOrientations([
    DeviceOrientation.portraitUp,
    DeviceOrientation.portraitDown,
  ]);
  // end here
  runApp(const MyApp());
}

@antz22 antz22 closed this as completed Nov 7, 2021
@antz22 antz22 reopened this Nov 7, 2021
@antz22
Copy link
Author

antz22 commented Nov 7, 2021

Unfortunately after I refreshed the app it stopped working... I will leave this issue open here.

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

No branches or pull requests

1 participant