5959176921
- face validator is a retrained CNN now - starting retiring CLM-Z from OpenFace
12 lines
372 B
Matlab
12 lines
372 B
Matlab
|
|
function [quantized] = quantizeContinuous(values, min_v, max_v, num_bins)
|
|
|
|
step_size = (max_v - min_v) / num_bins;
|
|
bin_centres = min_v + step_size/2 : step_size : max_v;
|
|
|
|
bin_centres = repmat(bin_centres, numel(values),1);
|
|
values = repmat(values, 1, num_bins);
|
|
|
|
[~,quantized] = min(abs(values - bin_centres)');
|
|
quantized = quantized';
|
|
end
|