Comments (8)
This is not so much an incorrect classification as it is the fact that we're trying to squeeze four fields (name, admin1Name, admin2Name, country) into three (city, state, country). The "name" part is inconsistent: sometimes it's a city, sometimes it's a neighborhood. admin2Name is also similarly sometimes a county and sometimes a city.
Concatenating admin1Name and admin2Name as the "state" is what we've gone with for now, but it isn't perfect, as you've noticed. Maybe concatenating the name and admin2Name fields would make more sense since they're more "city-like"; admin1Name is generally consistent in being a state/province.
from immich.
To give an example, admin1Name
is New York (the state), admin2Name
is Kings County, and then there are a bunch of neighborhoods like Brooklyn Heights for the name
. So let's say we change it to show admin2Name
, admin1Name
and the country to get Kings County, New York, US. Now if you search for the city "Marseille", you'll get no results because it's listed as a name
and admin2Name
in this case is a department.
from immich.
I wasn't sure how Immich is doing the reverse geocoding (and I'm still not 100% sure), but I see you have downloaded the txt files from https://download.geonames.org/export/dump/readme.txt. Is name
coming from the file cities500.txt
?
First off, I only have context on how this work in the US and Mexico, so I don't know if this is how other countries geographical areas are organized.
Reading the geoNames docs, it seems like admin1Name is considered the first level division of a country, so, at least in the US and Mexico, that's always a state:
grep "US\..*" admin1CodesASCII.txt
US.AR Arkansas Arkansas 4099753
...
US.VA Virginia Virginia 6254928
As for admin2, again, in Mexico and the US, second level divisions are counties or municipalities which are not cities, while they are sometimes interchangeable and/or have the same name, using NY as an example:
grep "US\.NY\..*" admin2Codes.txt
US.NY.001 Albany County Albany County 5106841
...
US.NY.047 Kings County Kings County 6941775
What's more, all end in "County". So this doesn't seem useful for Immich, at least not within the 3 location subdivisions that Immich uses.
In cities500.txt
it seems there are any other sub-divisions, including neighborhoods, residential areas, etc.
In my examples "Brooklyn Heights" has the P tag "PPLX"
which according to geonames docs it's a "Section of a populated place". In the case of NYC, NYC has the PPL
tag, and each of the boroughs has the PPLA2
tag. (i.e.: Brooklyn, Bronx, etc.).
As for the Mexico example, "Paseos del Valle [Fraccionamiento]" is listed with "PPL"
. Then "Tlajomulco de Zuñiga" (which immic got from admin2
according to what you described) is the municipality, not the city, which would be again wrong, if it had a different name to the city. There's a "Tlajomulco de Zuñiga" entry in countries500.txt
with the tag "PPLA2"
which refers to the actual city :)
from immich.
TL;DR; For "City" it seems to me it'd be good to always exclude PPLX places, as they seem to refer to not cities, prefer to use any tags more specific than PPL, and fallback to PPL otherwise. For State admin1CodesASCII.txt
looks to be perfect. But I wonder if this would be a good generalization for other countries as well. I might be interested in contributing to improve this functionality if possible
from immich.
That's a great idea! We don't even ingest these tags into the database, much less use them. For reference, we ingest the geodata here and do the reverse geocoding here.
from immich.
cc @zackpollard, you had ideas about improving the geocoder detail level right?
from immich.
cc @zackpollard, you had ideas about improving the geocoder detail level right?
Yea, we do have a lot more detailed data available to us, however it needs a lot of sanitisation to be usable for what we want. It should offer some quite significant improvements to accuracy, especially when in built up areas though.
from immich.
As for the comments above, yea I have also noticed this behaviour previously, if there is a quick improvement we can make here with that date then I think it would be good to do it, but also yes let's check a few other countries to see if it's the same for them too.
from immich.
Related Issues (20)
- Does not start immich_server after “down and remove orhpans” HOT 1
- Using Apple M2 chip to run Remote Machine Learning natively
- Seems like immich does not handle http 500 requests coming from machine learning container properly HOT 3
- Crop feature: The extension used in the filename does not match the image metadata
- Explore is empty. HOT 10
- It takes a long time to open a shared album in the mobile app
- Replace with upload does not clear detected faces
- Does not support Cyrillic domain HOT 4
- "I cannot log into the Immich web page on Safari, Edge, or Chrome browsers on my iPhone." HOT 1
- Can't connect to server Web UI both locally and publically, even on fresh install
- Immich on ios download remote image has different checksum HOT 3
- Android/Ios app cannot play video only saved on server HOT 2
- Error when setting database password using environment variable
- xdg-permission-store process consumes additional 600 MB of memory with each upload
- Error uploading images - `ERROR: record "new" has no field "updated_at"` HOT 1
- BUG: same person more than once in a single photo
- Hardware accelerated video transcoding with multiple worker nodes with dissimilar GPUs/APIs/vendors does not work
- deleting assets that have one duplicate via REST API will not remove them from duplicate review tool HOT 1
- Getting error in ASGI failed to allocate memory HOT 5
- immich has randomized temporal parsing of a series of photos with similar timestamps to an external library. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from immich.