sharing small pieces of rocks or jewels I find on the way

Archive for May, 2015

Using left right keys to control video in chrome/chromecast

We use chromecast to see video from my laptop to TV. While pressing space would pause or play the video, there is no control for moving forward or moving backward. So I wrote a little javascript code

document.onkeydown = function(ev){if(ev.keyCode==37){document.body.firstChild.currentTime = document.body.firstChild.currentTime – 15} else if(ev.keyCode==39){document.body.firstChild.currentTime = document.body.firstChild.currentTime + 15}}

I run this code in console (pressing F12 and then selecting console and pressing enter after pasting) and then I can have keyboard control. Now if I press right arrow it goes 15 seconds ahead and pressing left goes back 15 seconds. If you don’t like 15, feel free to change the code to 10 and hit enter, it will be applicable instantly.

I haven’t been programming for very long time and have no idea how to make chrome extension. Should checkout, but don’t get enough time, too many things to read. So, wish to get it done by doing smallest possible 🙂

How does how-old.net work?

Answer on @Quora by @yushunwang of How does how-old.net work?

Answer by Eason Wang:

I directly worked on this project. The backend code is built by my team in Bing in collaboration with Microsoft Research. To be honest, it's a big surprise to me that this tiny web app went viral. I did some post analysis on why it went viral and wrote a blog post on Medium.

Back to the main topic, I want to answer this question in two parts. First part I will talk about how to quickly implement the exact same capabilities in any app. In the second part, I will go a bit deeper to describe the technology itself.

In Bing Image Search we have built the best in industry image understanding capabilities in the past few years. It was used in Bing and quickly expanding to other Microsoft products. Now it is open to all developers: Microsoft Project Oxford Home. In order to implement the same capability in an app, you can simply call the web API and get all the necessary information back in JSON format. You can give it a try by uploading an image here: Page on www.projectoxford.ai. It gives the data back in seconds. The face coordinates, gender, age information are all included. Face API is just one of the many features that we have made open in Project Oxford. There are many other core capabilities in the API to empower innovative scenarios. I am very excited to see this Microsoft internal API open to all developers and I know this will have profound impact to the developer world because the previous impossible scenarios are now just one simple web API call. #HowOldRobot was just one tiny demo to show off these capabilities. It was put together by one developer from Azure ML team just in one day.


  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
JSON:
[
  {
    "faceId": "5af35e84-ec20-4897-9795-8b3d4512a1f9",
    "faceRectangle": {
      "width": 60,
      "height": 60,
      "left": 276,
      "top": 43
    },
    "faceLandmarks": {
      "pupilLeft": {
        "x": "295.1",
        "y": "56.8"
      },
      "pupilRight": {
        "x": "317.9",
        "y": "59.6"
      },
      "noseTip": {
        "x": "311.6",
        "y": "74.7"
      },
      "mouthLeft": {
        "x": "291.0",
        "y": "86.3"
      },
      "mouthRight": {
        "x": "311.6",
        "y": "88.6"
      },
      "eyebrowLeftOuter": {
        "x": "281.6",
        "y": "50.1"
      },
      "eyebrowLeftInner": {
        "x": "304.2",
        "y": "51.6"
      },
      "eyeLeftOuter": {
        "x": "289.1",
        "y": "57.1"
      },
      "eyeLeftTop": {
        "x": "294.0",
        "y": "54.5"
      },
      "eyeLeftBottom": {
        "x": "293.0",
        "y": "61.0"
      },
      "eyeLeftInner": {
        "x": "297.8",
        "y": "58.7"
      },
      "eyebrowRightInner": {
        "x": "316.0",
        "y": "54.2"
      },
      "eyebrowRightOuter": {
        "x": "324.7",
        "y": "54.2"
      },
      "eyeRightInner": {
        "x": "312.9",
        "y": "60.9"
      },
      "eyeRightTop": {
        "x": "317.8",
        "y": "57.7"
      },
      "eyeRightBottom": {
        "x": "317.9",
        "y": "63.7"
      },
      "eyeRightOuter": {
        "x": "322.8",
        "y": "60.8"
      },
      "noseRootLeft": {
        "x": "304.0",
        "y": "60.2"
      },
      "noseRootRight": {
        "x": "312.2",
        "y": "61.2"
      },
      "noseLeftAlarTop": {
        "x": "302.6",
        "y": "70.2"
      },
      "noseRightAlarTop": {
        "x": "313.0",
        "y": "70.0"
      },
      "noseLeftAlarOutTip": {
        "x": "298.8",
        "y": "76.2"
      },
      "noseRightAlarOutTip": {
        "x": "315.2",
        "y": "76.6"
      },
      "upperLipTop": {
        "x": "307.3",
        "y": "84.0"
      },
      "upperLipBottom": {
        "x": "306.6",
        "y": "86.4"
      },
      "underLipTop": {
        "x": "305.5",
        "y": "89.6"
      },
      "underLipBottom": {
        "x": "304.1",
        "y": "94.0"
      }
    },
    "attributes": {
      "age": 24,
      "gender": "female",
      "headPose": {
        "roll": "4.0",
        "yaw": "31.3",
        "pitch": "0.0"
      }
    }
  }
]


How Old Do I Look? mainly relies on 3 key technologies  (i.e. face detection, gender classification and age detection). Face detection is the foundation for the other two. For age detection and gender detection, they are just classic regression and classification problems in machine learning. It involves facial feature representation, collecting training data, building regression/classification models and model optimization. There are plenty of publications in this area. Let me know if you have enough interest to go deeper.

On the other hand, deep learning and large scale data understanding have led to a new breakthrough of image understanding. This opens a door to more intelligent systems and APIs. You can check out my latest blog to understand how the Image Graph works to power advanced scenarios. http://blogs.bing.com/search-qua…

Please leave your comments for me to improve the answer. Thanks!

How does how-old.net work?