sansan_rd
November 01, 2016
720

# Sansanデータ分析コンテスト参加者 marugari様

『人工知能は名刺をどこまで解読できるのか』
2016年8月8日～9月30日まで行われた、データ分析コンテスト

http://jp.corp-sansan.com/lp/data-sientist-c.html

#### sansan_rd

November 01, 2016

## Transcript

3. ### Ξϓϩʔν • Private Score: 0.00234 • Deep LearningʢCVͳ͠ͷ1ຊʣ • ResNetϕʔεͷωοτϫʔΫ

࠷ޙͷίϯϘϦϡʔγϣϯͷϑΟϧλ਺͸128 • ը૾ͷલॲཧ  ը૾αΠζ͸ (32, 160)  पԑ෦ͷ৭ͷೱ͞ͰωΨϙδ൓స • Softmaxग़ྗΛ9ͭฒ΂ͨϚϧνλεΫֶश • ༧ଌͷௐ੔͸ΫϥεؒɺϑΝΠϧ಺ͲͪΒ΋͍ͯ͠ͳ͍ 3
4. ### ڙཆҰ Max-Pooling • ෳ਺ͷϥϕϧ͕෇͍͍ͯΔ΋ͷ͸Max-Poolingͷํ͕ྑ͞ ͦ͏ ➡ Avg-PoolingͱMax-PoolingΛConcat ➡ ਫ਼౓վળͤͣ ➡

Avg-PoolingΛγϣʔτΧοτͱͯ͠ɺม׵Λ͔͚ͨMax- Poolingͱ࿨ΛͱΔ ➡ ਫ਼౓վળͤͣ • ւ֎ͷ಄ͷྑ͍ਓ͕ߟ͑ͨ͜ͱͳͷͰɺ࣌ؒΛ࢖ͬͯݕ౼ ͢Δ͜ͱ͸ͳ͔ͬͨ 4
5. ### Out[3]: data Pooling avg, 8x8/1 Flatten Pooling max, 8x8/1 Flatten

Activation relu _Plus SoftmaxOutput In [1]: import mxnet as mx In [2]: data = mx.sym.Variable('data') net = data pavg = mx.sym.Pooling(net, pool_type='avg', kernel=(8,8)) pmax = mx.sym.Pooling(net, pool_type='max', kernel=(8,8)) pavg = mx.sym.Flatten(pavg) pmax = mx.sym.Flatten(pmax) pmax = mx.sym.Activation(pmax, act_type='relu') net = pavg + pmax out = mx.sym.SoftmaxOutput(net)
6. ### ڙཆೋ Ϋϥεؒͷ֬཰ௐ੔ • ImageNetͱൺ΂ͯϥϕϧͷछྨ͕গͳ͍ͷͰɺ࠷௿1ͭͷ ϥϕϧ͕෇༩͞ΕΔΑ͏ʹ૊ΜͰΈΑ͏ ➡ i ൪໨ͷSoftmaxग़ྗʹ i-1 ൪໨·Ͱͷର਺Φοζൺͷ૯࿨

Λ࢖͏ ➡ ਫ਼౓վળͤͣ • Ϋϥεؒͷ֬཰ௐ੔͘Β͍͸Deep Learningʹ·͔ͤͯྑ ͍ • ޻෉Λ͢ΔͳΒɺಉҰϑΝΠϧ಺Ͱͷௐ੔ͷํͩͬͨ 6
7. ### Out[5]: data FullyConnected 1 FullyConnected 1 Concat SoftmaxOutput Concat FullyConnected

1 FullyConnected 1 Concat SoftmaxOutput _Plus Concat FullyConnected 1 FullyConnected 1 Concat SoftmaxOutput In [4]: data = mx.sym.Variable('data') net = data fco = [] smo = [] cum = None for ii in range(3): if ii > 0: if cum is None: cum = pos else: cum = cum + pos net = mx.sym.Concat(*[net, cum]) neg = mx.sym.FullyConnected(net, num_hidden=1) pos = mx.sym.FullyConnected(net, num_hidden=1) fco.append(mx.sym.Concat(*[neg, pos])) smo.append(mx.sym.SoftmaxOutput(fco[ii])) out = mx.sym.Group(smo)
8. ### ڙཆࡾ ϨΠΞ΢τ৘ใ • ྖҬͷେ͖͞ΛݟΕ͹෼͔Δ΋ͷΛޡೝ͍ࣝͯ͠Δ ➡ ྖҬͷେ͖͞ɺॎԣൺΛωοτϫʔΫʹྲྀ͠ࠐΉ ➡ ਫ਼౓վળͤͣ • ϨΠΞ΢τ৘ใͷΈͷDeep

LearningͰ͸MAE: 0.08ఔ౓  XGBoostͷ0.06ʹൺ΂ͯྼΔ • Deep LearningʹΑΔ༧ଌ஋ͱϨΠΞ΢τ৘ใͰStacking ͨ͠΋ͷ͸աֶश͕ࠅ͔ͬͨ • ཧ۶͔Β͢Ε͹্ख͍͘͘͸ͣͳͷͰௐࠪܧଓ 8