Get altitude for user location; Add Geo model (#2492)

* Also collect altitude from geolocation calls

* Update geomodel plugin

* Prop user location down into ai camera

* Add geo model file to be linked into xcode project

* Update env.example

* Update env.example

* Add geo model to cv model info file

* Update Developer.js

* Use user location for geo model while frame processing

useGeoModel boolean signals the frame processing plugin to use the geo model as well. It is turned on when we have a location.

* Update README.md

* Geo model is optional

* Adding a dummy neural network called geomodel.placeholder

This model doesn't do anything just returns the input. This is a overhead we could justify in my view as not to spend some more time figuring out how to make a model optional in an Xcode project.

* Geo model files are optional

* Update README.md

* Fix wrong model usage

* Update README.md

* This comment is no longer true

* feat: use full-text index on new _searchableName field (#2487)

Supports searches across non-contiguous tokens, e.g. finding "Mount Diablo
fairy lantern" with a query like "diablo lantern"

Related to #2348

* feat: add pull to refresh on notifications (#2489)

Closes #2349

* feat: show notifications from others (#2491)

* split notifications into tabs
* lots of TypeScript conversion
* feat: resize Heading5 and add Heading6 (closes #2480)
* fix: mark remote observations as viewed from ObsDetails
* feat: show indicator in Notifications tabs if unviewed notifications

Closes #2451

* feat: add option to save all observations from batch obs edit (#2493)

* fix: bring KebabMenu in line with designs

Closes #2268

* Update testing instructions

* v0.55.2

* v0.55.2+129

* fix: show observation from external link when Explore filters open (#2453)

* Open observation in app when link is pressed even if modals are open

* Remove comments

* Add comment and reset obsid

* fix: show onboarding content when signed in user has 0 observations (#2510)

Closes #2508

* fix: load new Explore results when filters change (#2507)

URL params got removed from the query key as a part of pull-to-refresh, but
that's how changes to filters were triggering a new request. This restores
that behavior, adds a test to ensure changes to filters call the API again,
and fixes the prior test of pull to refresh which was not testing the
equivalent behavior when pulling to refresh (API on first load, so the mock
needed to be cleared).

* fix: restore observation fetch when focusing on myobs (#2511)

* fix: center number in photo count (#2512)

Closes #2506

* refactor: minor edits for clarity

* fix: specify CV model version in e2e test

Hoping this deflakes the e2e a bit. Not sure why the AICamera test ever worked
without this.

* v0.55.3

* v0.55.3+130

* New Crowdin translations by GitHub Action (#2481)

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>

* fix: get quality grade descs closer to designs; add Joanne to staff (#2517)

* fix: prevent BottomSheet title from overflowing over close button

* Update to Geomodel name

* Another name change

* Rename var and const names

* Rename const file references

* Also collect altitude from geolocation calls

* Update geomodel plugin

* Prop user location down into ai camera

* Add geo model file to be linked into xcode project

* Update env.example

* Update env.example

* Add geo model to cv model info file

* Update Developer.js

* Use user location for geo model while frame processing

useGeoModel boolean signals the frame processing plugin to use the geo model as well. It is turned on when we have a location.

* Update README.md

* Geo model is optional

* Adding a dummy neural network called geomodel.placeholder

This model doesn't do anything just returns the input. This is a overhead we could justify in my view as not to spend some more time figuring out how to make a model optional in an Xcode project.

* Geo model files are optional

* Update README.md

* Fix wrong model usage

* Update README.md

* This comment is no longer true

* refactor: minor edits for clarity

* Update to Geomodel name

* Another name change

* Rename var and const names

* Rename const file references

---------

Co-authored-by: Ken-ichi <kenichi.ueda@gmail.com>
Co-authored-by: Angie <angie@inaturalist.org>
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
This commit is contained in:
Johannes Klein
2024-12-05 17:14:28 +01:00
committed by GitHub
parent 69e5e45ce5
commit df4ff645c5
20 changed files with 108 additions and 27 deletions

View File

@@ -18,11 +18,16 @@ See [CONTRIBUTING](CONTRIBUTING.md) for guidelines on contributing to this proje
1. Run `npx pod-install` or `cd ios && pod install` from the root directory
1. `cp env.example .env.staging` for staging and `cp env.example .env` for production and fill in appropriate values. This is not part of the code repo (contains secrets, such as OAuth client ID).
1. To run on Android, do this `cp android/example-keystore.properties android/keystore.properties`. Fill in the relevant values. If you are a member of iNat staff, get them from another member of iNat Staff.
1. Add AI Camera model and taxonomy files. The computer vision model files are not part of the code repo, and have to be installed. The app itself will load the model file with the filename specified in a .env file. On Android, the current file names are specified in these env variables `ANDROID_MODEL_FILE_NAME` and `ANDROID_TAXONOMY_FILE_NAME`. On iOS, the current file names are specified in these env variables `IOS_MODEL_FILE_NAME` and `IOS_TAXONOMY_FILE_NAME`. Currently, after a fresh clone of the repo, and copy of the env.example file, see above, you have to add the files following these steps:
1. Add AI Camera model and taxonomy files. The computer vision model and Geomodel files are not part of the code repo, and have to be installed. The app itself will load the model file with the filename specified in a .env file. On Android, the current file names are specified in these env variables `ANDROID_MODEL_FILE_NAME`, `ANDROID_TAXONOMY_FILE_NAME`, and `ANDROID_GEOMODEL_FILE_NAME`. On iOS, the current file names are specified in these env variables `IOS_MODEL_FILE_NAME`, `IOS_TAXONOMY_FILE_NAME`, and `IOS_GEOMODEL_FILE_NAME`. After a fresh clone of the repo and copying the env.example file (see above), you have to add the files by following these steps:
1. Add the example model files by executing `npm run add-example-model`. If that does not work continue with the next step.
1. If the download script fails: The sample model files are available in this [`small_model.zip`](https://github.com/inaturalist/SeekReactNative/releases/tag/v2.9.1-138) file.
1. On Android, these files are named `small_inception_tf1.tflite` and `small_export_tax.csv`. Create a camera folder within Android assets (i.e. `android/app/src/debug/assets/camera`) and place the files there.
1. On iOS, these files are named `small_inception_tf1.mlmodel` and `small_export_tax.json` and should be added to the `ios` folder.
1. On iOS, in the `ios` folder, copy the Geomodel placeholder file `geomodel.placeholder` to `geomodel.mlmodel`. This file is just a placeholder to get the app to build. We'll release a functional Geomodel for development purposes soon.
1. Optional: Add Geomodel file. If you have access to the model file, you can add it by following these steps:
1. Uncomment and set the `ANDROID_GEOMODEL_FILE_NAME` and `IOS_GEOMODEL_FILE_NAME` variables in the `.env` and `.env.staging` files.
1. On Android, the file Geomodel should be placed in the `android/app/src/debug/assets/camera` folder.
1. On iOS, the Geomodel file should be placed in the `ios` folder.
### Set up pre-commit hooks