Coder Social home page Coder Social logo

od's Introduction

Object detection

A local http server that accepts POST request at /api/v1/users. On receiving the request, the server:

  1. Send a request to StackExchange to fetch top 10 users' profiles on StackOverflow, ordered by highest reputation
  2. For each of the top 10 users, read its profile image, fetch the image, and use a object detection model to get a list of bounding boxes
  3. The request includes an object type, eg. 'person', then search bounding boxes, to find bounding boxes with the same lable as the object type specified in the request
  4. Return the list of users, with their information, and detection results as JSON payload.

To run the server, and test it with curl:

pip3 install -r requirements.txt
python3 od.py
curl -X POST http://127.0.0.1:5000/api/v1/users \
    -H "Content-Type: application/json" \
    -d '{"query": {"object":"person"}}'

To run the unit tests:

python3 -m unittest od_test.py

NOTE: I have python3, and do not use python alias, you may need to change to use python.

TODO

  1. Enable streaming: for each stackoverflow users user, once finished streaming back the results to client.
  2. Enable specifying arbitrary number of users. Client can specify to fetch n users. And server needs to use pagination when fetching user profiles, in order to ensure smooth processing.

Notes

This has been done in the span of one day. The actual working time is about 3 hours.

od's People

Contributors

yxzhao6 avatar

Watchers

Yaxiong Zhao avatar Kostas Georgiou 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.