Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
色恒常性仮説に基づく色補正ライブラリcolorcorrect / 2015-01-31-kan...
Search
shunsukeaihara
January 30, 2015
Technology
3
2.2k
色恒常性仮説に基づく色補正ライブラリcolorcorrect / 2015-01-31-kantocv27
@関東CV勉強会 2015/01/31
shunsukeaihara
January 30, 2015
Tweet
Share
More Decks by shunsukeaihara
See All by shunsukeaihara
BONXを支える技術:発話区間検出(VAD)の話/Akerun & BONX Tech Talk
shunsukeaihara
4
7.5k
Goのnet.TCPConnの話/shibuya.go01
shunsukeaihara
2
740
Norikra in Gunosy Network Ads@Norikra meetup #2
shunsukeaihara
1
5.9k
LevelDB on S3 As A KVS
shunsukeaihara
1
2.7k
Sparkによる分散処理 / 2015-01-16 PyData.Tokyo#3
shunsukeaihara
11
3.4k
ゼロから始めた Gunosyアドサーバ開発運用記 / 2014-12-16-dots
shunsukeaihara
6
1.1k
Gunosy.Go#5 index/io/log
shunsukeaihara
0
150
Gunosy.go#2 package/compress
shunsukeaihara
0
95
Other Decks in Technology
See All in Technology
Why App Signing Matters for Your Android Apps - Android Bangkok Conference 2024
akexorcist
0
130
AI前提のサービス運用ってなんだろう?
ryuichi1208
8
1.4k
BLADE: An Attempt to Automate Penetration Testing Using Autonomous AI Agents
bbrbbq
0
320
OCI Network Firewall 概要
oracle4engineer
PRO
0
4.2k
Lambdaと地方とコミュニティ
miu_crescent
2
370
Incident Response Practices: Waroom's Features and Future Challenges
rrreeeyyy
0
160
AIチャットボット開発への生成AI活用
ryomrt
0
170
Application Development WG Intro at AppDeveloperCon
salaboy
0
200
SRE×AIOpsを始めよう!GuardDutyによるお手軽脅威検出
amixedcolor
0
190
インフラとバックエンドとフロントエンドをくまなく調べて遅いアプリを早くした件
tubone24
1
430
Exadata Database Service on Dedicated Infrastructure(ExaDB-D) UI スクリーン・キャプチャ集
oracle4engineer
PRO
2
3.2k
AGIについてChatGPTに聞いてみた
blueb
0
130
Featured
See All Featured
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
4
370
Visualization
eitanlees
145
15k
It's Worth the Effort
3n
183
27k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
720
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2.1k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
6.9k
Documentation Writing (for coders)
carmenintech
65
4.4k
Faster Mobile Websites
deanohume
305
30k
The Art of Programming - Codeland 2020
erikaheidi
52
13k
Adopting Sorbet at Scale
ufuk
73
9.1k
Transcript
colorcorrect ৭߃ৗੑԾઆʹجͮ͘৭ิਖ਼ϥΠϒϥϦ Gunosy inc Shunsuke Aihara
ࣗݾհ • ҄൧ݪढ़հ (http://argmax.jp) @shunsukeaihara • GunosyͷϚωʔδϟʔ • ࠂ৴γεςϜͷ։ൃશମͱR&DܥΛ୲ •
ઐ: ܭࢉݴޠֶ • PythonͱඇಉظࢄγεςϜΛΉ • DNN࣭มͱ͔झຯͰͬͯΔ • ը૾ॲཧɾԻ৴߸ॲཧͰ͍Ζ͍ΖϥΠϒϥϦ࡞ͬͯΔ • https://bitbucket.org/aihara
͜Εը૾ೝࣝͷͨΊͷ ຯͳલॲཧͷͰ͢
colorcorrect
৭߃ৗੑ/໌Δ͞߃ৗੑͷԾઆʹج͖ͮ ม৭ɾwhite baranceͷζϨΛࣗಈิਖ਼
ը૾ͷޫݯ৭ͱϗϫΠτόϥϯε ࣮σʔλͰόϥόϥ • ৭Λ༻͍ͨମೝࣝΛߦ͓͏ͱ͢Δͱɺֶशσʔληοτͱ৭͕ͣΕ͍ͯΔͱఆਫ਼ མͪΔ • ৭ใΛ༻͍ͨBag-Of-Keypointܥͷख๏Ͱ݁ߏ৭ิਖ਼͕ޮ͍ͯ͘Δ • ྨࣅը૾ݕࡧ /
ܠ؍ը૾͔Βͷମݕग़ͱ͔࡞ͬͨ࣌ʹ૬ϋϚͬͨ • Deep Learningͱ͔͍Ζ͍Ζظͯ͠Δ͚Ͳɺ࣮ࡍʹࣄͰֶशσʔληοτूΊΔͱ ͳΔͱ͍ΖΜͳࡱӨ݅ͷը૾ूΊΔͷ݁ߏେม • ෳর໌݅ʹର͢ΔData AugmentationΑ͘Θ͔Βͳ͍ • ͋ͱɺը૾ͷݟͨΩϨΠʹ͍ͨ͠ͱ͔͍Ζ͍Ζ͋Δ • ͳΜͱָ͔͔ͨͬͨ͠ͷͰิਖ਼ख๏ͷจͱ͔͍Ζ͍Ζௐͨ
༻్ • ม৭ͨࣸ͠ਅͷิਖ਼ • ઃఆϛεͬͯࡱͬͨࣸਅͷमਖ਼ • ίϯσδͰઃఆؒҧ͑ͯࡱͬͨࣸਅͱ͔ • ମೝࣝͷલॲཧ •
దʹެ։͓͍ͯͨ͠ΒCVPR2013ͷจͰ࣮ ࡍʹΘΕͨʂ
͋ͱ᧙৭ը૾Λ͔ͨͬͨ͠ ͜Ε৭ͷใ͕ࣦΘΕ͍ͯΔͷͰͲ͏ͬͯϜϦ
pip install colorcorrect
৭߃ৗੑ (Color Constancy) ໌Δ͞߃ৗੑ (lightness constancy)
• র໌ޫͷεϖΫτϧ͕มԽͯ͠ɺମ৭ͷ ೝେ͖͘มԽ͠ͳ͍(ݩͷ৭͕ೝࣝͰ͖Δ) ৭߃ৗੑ
νΣοΧʔγϟυʔࡨࢹ ໌Δ͞ͱਓ͕ؒೝͨ͠ͷͱҟͳΔ ྡ෦ҐͷίϯτϥετʹӨڹΛड͚ͯҟͳΔೝ 'SPN8JLJNFEJB$PNNPOT
৭ͷ֮ͷ؆୯ͳϞσϧ • ʹೖࣹ͢ΔޫޫݯޫͱରͷޫࣹͰܾ· Δ • ৭߃ৗੑೖࣹޫ͔ΒޫݯޫΛਪఆͯ͠ɺޫࣹ Λਪఆ͢Δͱఆٛग़དྷΔ S( ) =
I( ) · R( ) • S(λ) ೖࣹޫ • I(λ) ޫݯޫ • R(λ) ମͷޫࣹ
৭߃ৗੑԾઆͷ؆୯ͳ • փ৭Ծઆ • ന৭ޫݯԼͷ߹ɺࢹ֮ͷ৭ͷฏۉΛऔΔͱփ৭ (127,127,127)ʹͳΔͣͳͷͰͦͷζϨΛิਖ਼͢Δ • ً - ৭૬ؔ
• ࢹ֮ͷ৭ʹภΓ͕͋Δ߹փ৭ԾઆͰ߃ৗੑΛ୲อग़ དྷͳ͍ͷͰɺًͱ৭ͷ૬͔ؔΒ৭ͷภΓ͕ޫݯʹΑΔ͔ݩ ͷମ৭ʹΑΔ͔ਪఆͯ͠ิਖ਼ • ͜ΕΒΛϕʔεʹ༷ʑͳΞϧΰϦζϜ͕ఏҊ͞Ε͍ͯΔ
Algorithms
࣮ͨ͠৭߃ৗੑΞϧΰϦζϜ • gray world • max white • stretch •
retinex, retinex with adjust • weighted grey world • standard deviation weighted grey world • luminance weighted gray world • standard deviation and luminance weighted gray world • automatic color equalization • ->ώϡʔϦεςΟΫε͚ͩͲิਖ਼ྗ͕͍͢͝
Implementation
࣮ • PythonʹΑΔ࣮(2ܥ) • PIL • Numpy • ͕ඞཁͳ෦C++ͷϥΠϒϥϦΛ numpy.ctypesͰϥοϓ
• pip install colorcorrectͰར༻Մೳ
DEMO http://colorcorrect.argmax.jp/
·ͱΊ • खܰʹը૾ͷ৭ิਖ਼͕ग़དྷͯศརͳͷͰͬͯΈ ͍ͯͩ͘͞ • Python3ܥ + PillowରԠͦΖͦΖ͠·͢ • ԻͷલॲཧϥΠϒϥϦͱ͔ެ։ͯ͠·͢
• https://bitbucket.org/aihara/pyssp • Gunosyʹମೝࣝɾը૾clipͷࣄ͋Γ·͢