SlideShare a Scribd company logo
1 of 14
Download to read offline
Python入門者の集い #6
Ryo KAJI
2018-01-16
公開にあたって加筆修正しました。
デモのJupyter NotebookはAppendixとしました。
自己紹介
● 家治 亮 / Ryo KAJI
● 画像処理が得意
● 所属/活動:
○ 某社 (~2017)
○ PyCon JP 2017, 2015 スタッフ
■ 2018 もよろしくお願いします。
画像処理? 画像認識?
● “コンピューターを用いて,画像を目的に応じて加工・処理すること。例えば
,画像の変形・変換,ノイズ除去,コントラスト強調など。”
○ 「画像処理」. 松村明.『大辞林』第三版, 三省堂, 2006.
● “画像処理の技術を用いて画像を理解・認識すること。例えば,手書き文字
を入力し文字の判定を行う文字認識など。”
○ 「画像認識」. 松村明.『大辞林』第三版, 三省堂, 2006.
今日の内容
1. Python のお話
2. 簡単な画像処理のデモ
突然ですが……
あなたは Python について、
● どんな期待をしていますか?
● どのような目的で使いますか?
Python を利用する目的
具体例:
● Web 開発
● Deep Learning
● Data Science / 統計分析
● 自然言語処理
● OpenCV
○ etc.
Python は唯一の選択肢か
そんなことはない
● Web 開発 → Ruby, PHP
● Deep Learning → C++ (TensorFlow)
● Data Science / 統計分析 → R, MATLAB
● 自然言語処理 → C++, C#, Java, Perl (MeCab)
● OpenCV → C++, Java
※一例です。
おそらく、ここで挙げた目的のために Pytthonを始めた人が多
いかと思います。
しかし、どれもがPythonが必須なものではありません。
具体的なライブラリ名を挙げていますが、
ご容赦ください。
具体的なライブラリ名を挙げていますが、
ご容赦ください。
プログラミング言語を選ぶ理由
1. 目的についての事例・知見が多いから
● 有用なライブラリがたくさんある
● プログラミング環境(ライブラリ, ツール, etc) が整備されている
2. コストが低いから
● 利用コスト (お金)
● 学習コスト (時間)
● 開発コスト (時間)
プログラミング言語を含めた特定の技術について、この
二つの理由は持続的に利用する動機として大きいと認識して
います。
c.f. 「キラーアプリケーション」
プログラミング言語を選ぶ理由 (Pythonの場合)
1. 目的についての事例・知見が多いから
● 有用なライブラリがたくさんある→ TensorFlow, pandas, etc.
● プログラミング環境(ライブラリ, ツール, etc) が整備されている
2. コストが低いから
● 利用コスト (お金) → 商用利用で制限されているわけではない
● 学習コスト (時間)
● 開発コスト (時間) → PyPI / Github を探せばだいたいある
私がPythonを選ぶ理由
「画像処理」というタスクを処理するにあたって、
● すぐ動いて、すぐ試せるから
● プログラムのインターフェイスにある程度の一貫性を感じるから
● 自分に必要なツールが一通り揃っているから
画像処理プログラムの一例
● やりたいこと:
○ 印刷された書類をOCRに掛けて、テキストを文字に起こしたい
● 必要なこと:
○ 画像から書類の輪郭をとる
○ 長方形になるように補正する
○ OCR処理する
OCR処理は少し難しいのですが、それ以外は OpenCVなどの
ライブラリを利用すれば比較的簡単に実現できます。
とはいえ文字だけではなかなかイメージしにくいため、
Jupyter Notebookのデモをお見せしました。 (後述)
Appendix
● イベント当日に紹介したデモについて
デモについて
● イベント当日では、Jupyter Notebookを使ってデモを実施しました。
お手元で再現できるようGithubに公開しました。
● 当日お見せしたものとの差分は、
○ 元画像が著作権的にNGだったので、自前で用意したものに差し替え
○ 不具合の修正、コードの整理
○ 途中経過を都度可視化して表示
END

More Related Content

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Python入門者の集い #6 講演