Giter Club home page Giter Club logo

img2location's Introduction

img2location

find where an image is taken

how it works

this is a toy project, which uses resnet (mostly) to compare your input image with selected range of street view images, effectively get a possible address of the input image.

basically:

  • input image looks like ./query/query-class/query.jpg
  • street views downloaded from -q query_string -r region is put under database/search
  • check the log file for details

FAQ

  • Q: why do you need to "query" for street views from baidu map? A: yeah it doesnt make sense, if you already knew what to query, why bother using this tool?. well first, i dont have a beast-like machine for resnet computing, if i downloaded thousands of images and comparing them with my input, im afraid its not possible. second, if there are some store fronts in your picture, you can use them to narrow down query range, which in turn reduces the time cost. anyways, consider this a demo

  • Q: baidu map doesnt have much resources to locate my pic A: Google's place photos api might be a good choice too

how to make it more useful

yeah it can be pretty useful, for private detectives, or cops, or, stalkers

if you want better performance, consider the following:

  • a huge street view resource, better without downloading, my toy has taken care of image caching, in case you dont know
  • a GPU server maybe
  • distributed searching is also worth a shot

demo

$ .venv/bin/python img2location.py -q *** -r 北京 -v
[*] Requesting images from baidu map...
[*] CBIR working...

[+] query: query/query-demo/***.jpg

database/search/***---北京市东城区长安街.jpg:        0.0,    Class search
database/search/外金水桥---北京市东城区东长安街***内.jpg:    0.12019465118646622,    Class search
database/search/青云片兰室---***地区管理委员会附近.jpg:      0.23571714758872986,    Class search
database/search/***服务部---广场东侧路44号附近.jpg:  0.2933036684989929,     Class search
database/search/***-华表---北京市东城区东长安街***内.jpg: 0.31151291728019714,    Class search

Matching address:
0.0: 北京市东城区长安街

Matching address:
0.12019465118646622: 北京市东城区东长安街***内

Matching address:
0.23571714758872986: ***地区管理委员会附近

Matching address:
0.2933036684989929: 广场东侧路44号附近

Matching address:
0.31151291728019714: 北京市东城区东长安街***内

acknowledgement

img2location's People

Contributors

jm33-m0 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.