forked from almazan/watts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.m
31 lines (22 loc) · 739 Bytes
/
main.m
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
%% Word Spotting and Recognition with Embedded Attributes
% Authors: Jon Almazan and Albert Gordo
% Contact: almazan@cvc.uab.es
%% Prepare options and read dataset
opts = prepare_opts();
data = load_dataset(opts);
%% Prepare images
prepare_images(opts,data);
%% Embed text labels with PHOC
data.phocs = embed_labels_PHOC(opts,data);
%% Extract features from images
extract_features(opts);
%% Split data into sets
data = prepare_data_learning(opts,data);
%% Learn PHOC attributes
data.att_models = learn_attributes(opts,data);
%% Learn common subspaces and/or calibrations
[embedding,mAPsval] = learn_common_subspace(opts,data);
%% Evaluate
mAPstest = evaluate(opts,data,embedding);
%% Save model
% save_model(opts,data,embedding);