How can duplicate images be detected? (locally and federated)

I’ve tried to look at the source code, but couldn’t exactly find the current database schema (only the intitial one and the changes).
But I was curious about duplicate images. So I assume there’s some kind of hashing system to make sure that the same image isn’t uploaded to the same instance multiple times. And I also assume this hash is created BEFORE the blurring happens?
Am I correct on those assumptions?
Also: what about federated servers. If the same image gets uploaded to two instances, are there currently systems in place that will realize that or will it see both as different images?

There is no such mecanism for the moment to avoid duplicates.

The only duplicates that are avoided are with the CLI which is looking for almost same location/time before uploading a sequence.

Oh yeah, I guess location and time being an EXACT match is probably a pretty good system actually.

The fact that it happens in the CLI: so there’s no system in place if someone were to modify the CLI to ignore that and upload it anyway.
(I know, this inlikely. But it might be good if this check happens servers side as well?)

There a few mechanisms that are only in the CLI as now, in a similar fashion to the OSM API (thematic validators are client-side only, OSM API only checks data “consistency”). But in a near future, we may as well add some of those mechanisms in API, to ensure every client can access them. That would make clients simpler to implement (contrary to OSM API !).

1 Like