Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Why 1 on Kaggle?
Search
Alex
June 13, 2019
Programming
310
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Why 1 on Kaggle?
Fast.ai Lesson 3.
Alex
June 13, 2019
Other Decks in Programming
See All in Programming
アクセシビリティから考える情報設計
high_g_engineer
0
380
変化を抱擁するドキュメントの作り方 - ビジネスルール駆動開発がもたらす、コードとの新しい関係
ioki
2
200
「新人AI禁止のその先へ ― 参加と協働のステップアップ」Vibe TOKYO, AI & CRAFT / 2026年8月21日
kentarowada
0
100
モバイル交通系ICへのチャージ実例から考える、クロスプラットフォーム開発におけるiOS実機テスト設計とCI運用
yusuga
1
470
『寄り添うラジオ』をAIで作る 体験価値から逆算した、会話しないUXと品質設計
theoriatec2024
3
180
AIは賢い。でも実行環境は? CLIおじさんがAI時代に伝えたいこと ~ CLIおじさんがAI時代に伝えたいこと ~
curekoshimizu
1
240
AWS DevOps Agentで インシデント対応をAIに任せたい
honmarkhunt
7
2.9k
AGENTS.md Is Not Enough:Build Skills, Don't Download Them
lx_t
0
120
JPUG勉強会 OSSデータベースの内部構造を理解しよう(第2回)
oga5
0
220
Building an Out-of-Order CPU
latte72
1
780
そのリトライ、死んだコネクションを使い回していませんか ── GoのHTTPクライアントとHTTP/2を実プロダクト障害から学び直す
myus4a
0
140
Webの地図
yosuke_furukawa
PRO
6
4.5k
Featured
See All Featured
The SEO identity crisis: Don't let AI make you average
varn
0
560
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.6k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.4k
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
840
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
280
Amusing Abliteration
ianozsvald
1
300
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
690
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
240
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
1
610
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
590
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
250
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
4.8k
Transcript
Why 1.0 on Kaggle? Kaggleで1.0になった理由は?
These slides are at Connpass. So you can check them
out. スライドはConnpassにアップされています。 是⾮みてください。
My username on Connpass is "globophobe". Connpassのユーザ名は 「globophobe」です。
A little while ago, I finished Fast.ai lesson 3. 少し前、Fast.aiレッスン3を終えました。
Fast.ai is a free deep learning curriculum. 無料機械学習カリキュラムです。
The teacher was Kaggle #1, and its president. 先⽣はKaggleの1位、そして Kaggleの組織の会⻑でした。
Lesson 1 and 2 briefly explain how to create a
CNN with ResNet for transfer learning. レッスン1と2は、簡単に転送学習⽤のResNetを使⽤してCNNを作成 ⽅法を説明します。
Lesson 3 explains in more detail how to use the
Fast.ai library. レッスン3では、Fast.aiライブラリの使⽤⽅法についてさらに詳しく 説明します。
The teacher starts with a Kaggle contest. 先⽣はKaggleコンテストから始まります。
Planet: Understanding the Amazon from Space 地球:宇宙からはアマゾンを理解する
Data is multilabel satellite images. データはマルチラベル衛星画像で す。
How to use the Fast.ai data block API to create
a CNN is explained. Fast.aiデータブロックAPIを使⽤してCNNを作成する⽅法について説 明されています。
Where is the data? データはどこ? src src = = (
(ImageFileList ImageFileList. .from_folder from_folder( (path path) ) . .label_from_csv label_from_csv( ( 'train_v2.csv' 'train_v2.csv', , sep sep= =' ' ' ', , folder folder= ='train-jpg' 'train-jpg', ,suffix suffix= ='.jpg' '.jpg' ) ) . .random_split_by_pct random_split_by_pct( () )) )
How to augment? データ増強⽅法? tfms tfms = = get_transforms get_transforms(
( flip_vert flip_vert= =True True, , max_lighting max_lighting= =0.1 0.1, , max_zoom max_zoom= =1.05 1.05, , max_warp max_warp= =0 0. . ) )
Create Fast.ai DataBunch instance. Fast.ai DataBunchのインスタンスを作成します。 data data = =
( ( src src. .datasets datasets( () ) . .transform transform( (tfms tfms, , size size= =128 128) ) . .databunch databunch( () ). .normalize normalize( (imagenet_stats imagenet_stats) ) ) )
DataBunch is train, validation, and optionally test PyTorch DataLoaders. DataBunchはPyTorch
DataLoaderの束です。トレーニング、検 証、そしてオプションでテストデータです。
After 5 epochs, about top 50 on Kaggle. トップ 50位ぐらいでした。
learn learn. .fit_one_cycle fit_one_cycle( (5 5, , slice slice( (0.01 0.01) )) ) Total time Total time: : 04 04: :17 17 epoch train_loss valid_loss accuracy_t fbeta epoch train_loss valid_loss accuracy_t fbeta 1 1 0.115247 0.115247 0.103319 0.103319 0.950703 0.950703 0.910291 0.910291 . .. .. . . .. .. . . .. .. . . .. .. . . .. .. . 5 5 0.091275 0.091275 0.085441 0.085441 0.958006 0.958006 0.926234 0.926234
Interesting point, Planet data is 256x256, but he resized to
128x128. 興味深い点は、データは256 x 256ですけれど、128 x 128にサイズ が変更されました。
Then, he made a new dataset at 256x256, and continued
training with his pretrained model. そして、256 x 256の新しいデータセットを作って、そのデータで 128 x 128訓練されたモデルの訓練を続けました。
In the end, about top 25 on Kaggle. 最終に、先⽣はトップ25位ぐらいでした。 Total
time Total time: : 18 18: :23 23 epoch train_loss valid_loss accuracy_t fbeta epoch train_loss valid_loss accuracy_t fbeta 1 1 0.083591 0.083591 0.082895 0.082895 0.968310 0.968310 0.928210 0.928210 . .. .. . . .. .. . . .. .. . . .. .. . . .. .. . 5 5 0.074927 0.074927 0.080691 0.080691 0.968819 0.968819 0.931414 0.931414
I wanted to practice, so I thought I would try
a Kaggle contest for the first time. 練習したかったので、Kaggleコンテストを初めてしようと思いまし た。
Aerial Cactus Identification 空中サボテンの同定
However, the Fast.ai fam was already there. しかし、Fast.aiの⽣徒はすでに集まっていました。
From the forum, "Why are people using Fast.ai getting 1.0
score?" フォーラムで、Fast.aiを使⽤している⼈はなぜ1.0スコアを得ている のですか。
One comment, "Because of the transforms, including warping." 1つのコメントは「ワープを含むデータ増強⽅法のデフォルトは良いか ら。」
Another comment, "Perhaps it's not such a prickly problem." もう⼀つのコメントは「おそらく空中サボテンの同定の問題はあまり
難しくない。」
In any case, I added my name to the leaderboard.
リーダーボードに⾃分の名前を追加しました。
Unexpectedly, the 1.0 scores had the same data augmentation parameters.
意外と、1.0のスコアのデータ増強のパラメータは同じでした。
1.0 public kernel augmentation: 1.0の公開カーネルはこれをデータ増強のため: transformations transformations = = get_transforms
get_transforms( ( do_flip do_flip= =True True, , flip_vert flip_vert= =True True, , max_rotate max_rotate= =10.0 10.0, , max_zoom max_zoom= =1.1 1.1, , max_lighting max_lighting= =0.2 0.2, , max_warp max_warp= =0.2 0.2, , p_affine p_affine= =0.75 0.75, , p_lighting p_lighting= =0.75 0.75 ) )
Except for one parameter, those are all default parameters. 1つを除いて、すべてのパラメータはFast.aiのデフォルトのパラメー
タです。
This is all you need. これだけで⼗分です。 transformations transformations = =
get_transforms get_transforms( (flip_vert flip_vert= =True True) )
flip_vert defaults to False, because not all images are location
invariant. すべての画像は逆さになるのは可能ではないので、flip_vertのデフォ ルトはFalseです。
That was enough for a 0.9999 score. それは0.9999のスコアのためは⼗分でした。
For 1.0, correct imbalanced classes. 1.0の解決策、不均衡なクラスを修 正する事でした。
I'm interested to see what happens on the private leaderboard
when the contest ends. Kaggleコンテスト終わってから、プライベートリーダーボードはどう なるかなを楽しみに。
I think it was a good first experience with Kaggle.
最初のKaggleの経験は良かったと思います。
Thatʼs all. Thanks for listening. 以上です。ご清聴ありがとうございます。