isk-daemon: busca visual de imagens para todos

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    Favorites, Groups & Events

    isk-daemon: busca visual de imagens para todos - Presentation Transcript

    1. BUSCA VISUAL DE IMAGENS PARA TODOS APRESENTAÇÃO DO SOFTWARE OPENSOURCE ISK-DAEMON E TECNOLOGIAS ENVOLVIDAS NA SUA CRIAÇÃO Ricardo Niederberger Cabral PyConBrasil 2008
    2. quem sou eu http://isnotworking.com/     python desde '97 logotipo ainda era assim: )  (o engenheiro da computação   '03  serpro  chemtech
    3. busca visual de imagens uma das técnicas: busca-através-de-exemplo     pode ser combinado com busca textual
    4. busca visual de imagens  usar: encontrar:  para
    5. : o que é biblioteca (1)     extensão C++   indexar   buscar   servidor (2)   expõe essa biblioteca para clientes remotos   arquitetura (3)   como resolver esse problema?   histórico:   app desktop: '03 (http://imgseek.net/)   servidor: '06
    6. como usar arquitetura  
    7. como usar: fluxo de dados
    8. como usar: passos (1/3) compilar a biblioteca para sua plataforma 1.  g++ 1.  python-dev 2.  libmagick++ 3.  pre-requisitos servidor 2.  twisted 1.  simplejson 2.  SOAPpy 3.  # python setup.py install 3.  escolher método para RPC 4.  xml-rpc 1.  soap 2.  json-rpc 3.  twisted PB 4. 
    9. como usar: passos (2/3) indexar coleção de imagens 5.  # isk-daemon imports from imgSeekLib.ImageDB import ImgDB import settings # initialize image database imgDB = ImgDB(settings) imgDB.loadalldbs(os.path.expanduser(settings.databasePath)) def saveall(): imgDB.savealldbs(os.path.expanduser(settings.databasePath)) def main(): imgdir = \"/Volumes/media2/prj/tecweb-data/img\" count = 0 p = re.compile(r\"(\\d+)\") for imgfile in os.listdir(imgdir): count += 1 if count > 1000: count = 0 saveall() m = p.search( imgfile ) nid = int(m.group()) if nid >= 2147483647: continue if not imgDB.isImageOnDB(1, nid): res = imgDB.addImage(1, os.path.join(imgdir,imgfile), nid) saveall() if __name__ == '__main__': main()
    10. como usar: passos (3/3) codificar cliente 7.  import web # simple isk-daemon test program from xmlrpclib import ServerProxy server = ServerProxy(\"http://localhost:31128/RPC\") urls = ('/(.*)', 'iskclient') imgdir = \"/Volumes/media2/img\" img_count = server.getDbImgCount(1) class iskclient: def GET(self, target_id): if not target_id: target_id = -1 target_id = int(target_id) print \"\"\"<html>Pesquisando em %d imagens as mais similares a <img src='/static/%s.jpg'/><hr>\"\"\" % (img_count, target_id) for res in server.queryImgID(1,target_id, 16)[1:]: print \"\"\"<a href='/%d'><img border='0' src='/static/%s.jpg'/> </a>\"\"\" % (res[0],res[0]) print \"</html>\" pronto! if __name__ == \"__main__\": web.run(urls, globals()) 8. 
    11. do que é feito twisted: biblioteca para comunicação   orientada a eventos   swig: gerador de wrappers de código nativo   GWT: compilador java -> javascript, usado na interface administrativa   json-rpc: protocolo para chamadas remotas   libMagick: biblioteca para manipulação de imagens

    + Ricardo CabralRicardo Cabral, 9 months ago

    custom

    467 views, 0 favs, 1 embeds more stats

    APRESENTAÇÃO DO SOFTWARE
    OPENSOURCE ISK-DAEMON E more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 467
      • 445 on SlideShare
      • 22 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 1
    Most viewed embeds
    • 22 views on http://blog.isnotworking.com

    more

    All embeds
    • 22 views on http://blog.isnotworking.com

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories