using Collaborative Filtering Kazuaki Nakamura, Eiji Miyazaki, - - PowerPoint PPT Presentation

using collaborative filtering
SMART_READER_LITE
LIVE PREVIEW

using Collaborative Filtering Kazuaki Nakamura, Eiji Miyazaki, - - PowerPoint PPT Presentation

Generating Handwritten Character Clones from an Incomplete Seed Character Set using Collaborative Filtering Kazuaki Nakamura, Eiji Miyazaki, Naoko Nitta, and Noboru Babaguchi Osaka University, Japan on 6th Aug. 2018, at ICFHR2018 Research


slide-1
SLIDE 1

Generating Handwritten Character Clones from an Incomplete Seed Character Set using Collaborative Filtering

Kazuaki Nakamura, Eiji Miyazaki, Naoko Nitta, and Noboru Babaguchi Osaka University, Japan

  • n 6th Aug. 2018, at ICFHR2018
slide-2
SLIDE 2

Research Background

  • Handwriting generation
  • generate synthetic (or clone) images of handwritten characters

resembling a target user’s actual handwriting.

Target user Training dataset

  • handwriting character images
  • pen stroke (sequence of 2D pen-tip locations)

Generator

(e.g. auto-encoders, GANs)

fed into handwritten character clones; HCCs generate Automatically generated HCCs

  • are applicable to communication tools (especially for hand-impaired people).
  • serve a large scale dataset for handwriting recognition, faked signature detection, etc.
slide-3
SLIDE 3

Requirements in Practice

  • Incomplete seed character set
  • Seed characters: characters whose image(s) is in the training dataset
  • Seed characters are usually limited

because it is difficult to collect a lot of images from the target user.

  • It is not rare that at most one or zero image is available per character,

especially in the case of Asian languages

  • Within-person variety
  • Images of humans’ actual handwriting differ from each other

even if the same writer writes the same character.

All of them have the similar characteristics but are slightly different from each other this is a pen. i am japanese. i like baseball. a, b, e, h, i, j, k, l, m, n, p, s, t c, d, f, g, o, q, r, u, v, w, x, y, z Training dataset seed non-seed

slide-4
SLIDE 4

Goal

  • Goal: To propose a HCC generation method
  • that can achieve the within-person variety
  • based on the incomplete seed character set
  • Novelty:
  • How to estimate the HCC distribution for each character

from at most one or zero instance

Not a single HCC but its distribution should be created. At most one or zero image is available per character as a training data.

slide-5
SLIDE 5
  • (Conventional) HCC generation [1, 2]
  • Font generation [3, 4, 5]

Related Work

a a ⋯ b b ⋯ z z ⋯ ⋮ INPUT A lot of images for each character OUTPUT HCC distribution for each character

𝑞 HCC "a" 𝑞 HCC "b" 𝑞 HCC "z"

⋮ INPUT A few images of several seed characters written in a certain style a c n y OUTPUT Images of the other characters that seems to be written in the same style b d e x z ⋱ ☒Incomplete seed character set ☑within-person variety ☑Incomplete seed character set ☒within-person variety

[1] T. S. Haines et al.: “My Text in Your Handwriting,” ACM Trans. on Graphics, Vol.35, No.3, 2016. [2] A. Graves: “Generating Sequences With Recurrent Neural Networks,” arXiv preprint, arXiv:1308.0850, 2013. [3] D. G. Balreira et al.: “Handwriting Synthesis from Public Fonts,” in Proc. of 30th SIBGRAPI Conf. on Graphics, Patterns and Images (SIBGRAPI), pp.246--253, 2017. [4] J. W. Lin et al.: “Complete Font Generation of Chinese Characters in Personal Handwriting Style,” in Proc. of 34th IEEE Int'l Performance Computing and Communications Conf. (IPCCC), pp.1--5, 2015. [5] Z. Lian et al.: “Automatic Generation of Large-Scale Handwriting Fonts via Style Learning,” in Proc. of SIGGRAPH ASIA 2016 Technical Briefs, 2016.

slide-6
SLIDE 6

Side dataset

Overview

  • collected from many
  • ther writers 𝑥1, ⋯ , 𝑥𝐾
  • Each writer offers
  • nly a few images

(e.g. an image per character)

𝑥1 𝑥2 𝑥3 𝑥4 Training dataset 𝑣

  • offered by

the target user 𝑣

  • incomplete seed

character set

Encoder

feature extractor

  • Character-wise HCC generation
  • Offline (using only images)

feature set 𝑔

𝑥

feature set 𝑔

𝑣

𝜄1 𝜄3 𝜄2 𝜄4 ⋱ 𝜄𝐿 𝜄5 Parameter pool Parameter selection 𝑞 𝑔 መ 𝜄

select the parameter that is best-fit to 𝑔

𝑣

𝑔 feature distribution

for each character Sample a new feature 𝑔 ~𝑞 𝑔 ෠ 𝜄

Decoder

a

HCC

slide-7
SLIDE 7

Parameter Pool Construction

Side dataset Encoder

feature extractor

  • 1. Extract a feature for each handwriting image in the side dataset
  • 2. Cluster a set of the extracted features
  • 3. Compute the mean 𝑢𝑙

𝑑 and the covariance Σ𝑙 𝑑 for each cluster 𝑙

𝜄𝑙 = 𝑢𝑙

𝑑, Σ𝑙 𝑑

𝑢1

𝑑, Σ1 𝑑

𝑢2

𝑑, Σ2 𝑑

𝑢3

𝑑, Σ3 𝑑

  • It is not rare that the shapes of two writer’s handwriting are very similar for some characters.

IOW, there are a lot of writer-pairs whose handwriting shapes are similar for some characters. Not only the average shape but also the shape distribution of their handwriting would be similar.

Hypothesis Separately perform the following procedure for each character 𝒅:

slide-8
SLIDE 8

Parameter Selection for Seeds

Side dataset Encoder

feature extractor

For a seed character 𝑑,

  • use the target user’s actual handwriting image 𝐽𝑣

𝑑 .

  • select the parameter that is best-fit to 𝐽𝑣

𝑑 .

𝑢1

𝑑, Σ1 𝑑

𝑢2

𝑑, Σ2 𝑑

𝑢3

𝑑, Σ3 𝑑

Training dataset 𝑣

𝐽𝑣

𝑑

𝑔

𝑣 𝑑

෡ 𝜾𝒅 = 𝜾𝟒

𝒅

BestFit strategy

slide-9
SLIDE 9

Parameter Selection for Non-seeds

Side dataset Encoder

feature extractor

For a non-seed character 𝑑′,

  • there are no images of the target user’s actual handwriting.
  • BestFit strategy cannot be used.

𝑢1

𝑑, Σ1 𝑑

𝑢2

𝑑, Σ2 𝑑

𝑢3

𝑑, Σ3 𝑑

Training dataset 𝑣

𝐽𝑣

𝑑

𝑔

𝑣 𝑑

෡ 𝜾𝒅 = 𝜾𝟒

𝒅

BestFit strategy

slide-10
SLIDE 10
  • For a non-seed character 𝒅′, employ collaborative filtering (CF).
  • To perform CF, first construct a writer-character matrix Φ.
  • Estimate the best-fit parameters for not only the target user but also the other writers.
  • 𝜚𝑘𝑛 ∈ 1,2, ⋯ , 𝐿 : ID of the best-fit parameter of 𝑘-th writer’s feature distribution

for 𝑛-th character writer-character matrix

Φ =

Seed characters non-seed character

  • ther writers

target user 𝒅𝟐 𝒅𝟑 ⋯ 𝒅𝒏 ⋯ 𝒅𝑵 𝒙𝟐 𝜚11 𝜚12 ⋯ 𝜚1𝑛 ⋯ 𝜚1𝑁 𝒙𝟑 𝜚21 𝜚22 ⋯ 𝜚2𝑛 ⋯ 𝜚2𝑁 ⋮ ⋮ ⋮ ⋱ ⋮ ⋱ ⋮ 𝒙𝑲 𝜚𝐾1 𝜚𝐾2 ⋯ 𝜚𝐾𝑛 ⋯ 𝜚𝐾𝑁 𝒗 𝜚𝑣,1 𝜚𝑣,2 ⋯ ? ⋯ 𝜚𝑣,𝑁

𝜚𝑣,1, 𝜚𝑣,2, 𝜚𝑣,𝑁: known (estimated by Best-Fit strategy) 𝜚𝑣,𝑛: unknown try to estimate it by collaborative filtering!

Parameter Selection for Non-seeds

slide-11
SLIDE 11

Collaborative Filtering

  • User-based collaborative Filtering (UserCF)

If the feature distributions of two writers are similar with each other for some characters, their distributions for another character also tend to be similar. Hypothesis 𝑑1 𝑑2 𝑑3 𝑑4 𝑥1 𝜚11 𝜚12 𝜚13 𝜚14 𝑥2 𝜚21 𝜚22 𝜚23 𝜚24 𝑥3 𝜚31 𝜚32 𝜚33 𝜚34 𝑣 𝜚𝑣,1 𝜚𝑣,2 ? 𝜚𝑣,4 𝑣

  • ther writers

target user 𝑥1 𝑥2 𝑥3 similarity Choose top-𝑂 similar writers similar writers

Based on the feature vectors of all the seed characters

𝑥

𝑘

[Majority voting] For each 𝑥

𝑘,

vote the similarity score sim 𝑣, 𝑥

𝑘

for 𝜚𝑘3-th parameter

similar writers 𝑙 𝑙 𝑙

slide-12
SLIDE 12

Experiment

  • Dataset
  • ETL4: a set of Japanese Hiragana Characters
  • 48 characters, 120 writers, 48*120=5760 images
  • ETL5: a set of Japanese Katakana Characters
  • 48 characters, 208 writers, 48*204=9984 images
  • Setting
  • Randomly select 3 writers as “target user”, i.e., 𝑣,

and regard the remaining writers as “other writers”, i.e., 𝑥

𝑘 .

  • Generate the following 5 characters, regarding the other 43 characters as seed.
  • Hiragana: あ (a), し (shi), た (ta), は (ha), れ (re)
  • Katakana: ア (a), シ (shi), タ (ta), ハ (ha), レ (re)
  • Encoder & Decoder: Variational Autoencoder
  • Compared methods
  • BestFit: using all of the 48 characters as seed (complete seed character set)
  • UserCF
  • ItemCF : item-based collaborative filtering
  • HybrCF: the method combining UserCF and ItemCF
  • Random: randomly selecting a parameter from the pool

ETL4 ETL5

slide-13
SLIDE 13

Result (Hiragana in ETL4, K=40)

BestFit can generate HCCs

quite similar with Original.

UserCF and HybrCF can also

generate good HCCs.  The performance of ItemCF is almost same with that of Random.

  • Co-occurrence probability 𝑀

becomes statistically unreliable with large K. Average distance between feature of original image and that of generated HCCs K: num. of clusters (size of parameter pool)

slide-14
SLIDE 14

Result (Katakana in ETL5, K=40)

Average distance between feature of original image and that of generated HCCs K: num. of clusters (size of parameter pool)  Similar result was obtained.

  • HCCs generated by BestFit

are quite similar with Original.

  • UserCF and HybrCF also

generate good HCCs

  • ItemCF did not work well.

UserCF is more suitable to

the HCC generation task.

slide-15
SLIDE 15

Several Examples of HCC (ETL4)

Original BestFit UserCF

 HCCs generated by BestFit slightly differ from each other while keeping the similar shape with original.  This is also the case with UserCF. within-person variety

slide-16
SLIDE 16

Several Examples of HCC (ETL5)

 HCCs generated by BestFit slightly differ from each other while keeping the similar shape with original.  This is also the case with UserCF. within-person variety

Original BestFit UserCF

slide-17
SLIDE 17

Conclusion

  • Proposal: A method for generating HCCs from a limited size of

training data

  • The target writer only offers at most one or zero image per character,

i.e., an incomplete seed character set.

  • To achieve within-person variety, the feature distribution of

the target user’s handwriting is estimated for each character.

  • Idea:
  • For seed characters: BestFit strategy
  • For non-seed characters: Collaborative Filtering (UserCF)
  • Result:
  • Examined the proposed method with a dataset of Japanese characters
  • UserCF can generate good HCCs

with a certain level of within-person variety