luoyetx / deep-landmark

Predict facial landmarks with Deep CNNs powered by Caffe.
BSD 3-Clause "New" or "Revised" License
282 stars 156 forks source link

How to set the host value when testing? #15

Closed XiaXuehai closed 8 years ago

XiaXuehai commented 8 years ago

I am new about python, and I want to use app to test the image. In app.py

headers = {
    'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
    'Accept-Encoding': 'gzip, deflate, sdch',
    'Host': 'image.baidu.com',
    'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.65 Safari/537.36',
}

I don't know what's that mean. How to set the host value when testing?I use Chrome. THX.

luoyetx commented 8 years ago

@XiaXuehai The head here is used for python-requests to fetch the image from a URL. It doesn't matter if you want to test the image. Actually, it's weird to set the Host to image.baidu.com. I use this just for testing the image from baidu's URL.

You can directly upload an image for testing.

XiaXuehai commented 8 years ago

THX!