Comments (4)
Hi @santo4ul
- Correct, this is using the OpenCV convention.
- Yes, you have to subtract 127 to center the values, image must be of size 64x64 pixels.
- Not sure what you mean by this, the images once loaded in tensorflow become tf.float32 tensors.
from deepgaze.
On 3. above, Originally the R, G and B channels are 8 bit signed values. We do mean subtraction and just pass it as is to the network. So the channels are still 8bit signed values.
On the Tensorflow side, at the input layer (Reshape), the 8bit signed values we pass is used as tf.float32.
For example,
Original Input: Signed 8 bit
B = 128
G = 129
R = 130
After mean subtraction:
B = 1
G = 2
R = 3
At Tensorflow input layer:
B = 1.0
G = 2.0
R = 3.0
What I mean is, there is no other pre-processing involved other than the mean subtraction of 127. Am I right?
from deepgaze.
Yes that is correct. You just have to normalize by subtracting 127.
The other thing you should do is to resize the image if it is larger that 64x64 pixels.
This is done using an inter area interpolation, in OpenCV you can do:
image_resized = cv2.resize(image, (64, 64), interpolation = cv2.INTER_AREA)
from deepgaze.
Thanks a lot @mpatacchiola for your prompt reply!
Yes, I'm resizing the input accordingly.
from deepgaze.
Related Issues (20)
- What is the range of angles for the head pose estimation? HOT 3
- difficulties installing HOT 3
- Check for OpenCV 2, 3 and 4 HOT 1
- contours, hierarchy = cv2.findContours(mask, 1, 2) ValueError: too many values to unpack (expected 2) HOT 2
- import cv doesn't work in both version HOT 6
- Unsupported image type, must be 8bit gray or RGB image. HOT 2
- A bit issue that i fixed for you use in opencv v3 HOT 1
- NameError: name 'x_center' is not defined HOT 3
- Freezing and optimizing the model HOT 6
- Accuracy of deepgaze HOT 8
- Problem with tensorflow version
- Different head pose angles HOT 2
- Notebooks HOT 3
- Improvements on skin detect HOT 3
- How could I load the head pose estimator pre-trained model by checkpoint? HOT 1
- cnn_head_pose estimation: module 'tensorflow' has no attribute 'placeholder' HOT 7
- cnn_head_pose_estimation problems HOT 1
- Can I achieve the 3D head translation vector HOT 1
- Face recognition
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deepgaze.