SlideShare ist ein Scribd-Unternehmen logo
1 von 35
Downloaden Sie, um offline zu lesen
Putting Together 
World's Best Data Processing Research 
with Python 
Copyright 2014 Shiroyagi Corporation. All rights reserved. 
Akira Shibata, PhD 
Shiroyagi Corporation
Who am I 
Akira Shibata, PhD. 
TW: @punkphysicist 
CEO, Shiroyagi Corporation (shiroyagi.co.jp) 
Kamelio: Personalised News Curation 
Kamect: Contents Discovery Platform 
2004 - 2010: 
Data Scientist @ NYU 
Statistical data modelling @ LHC, CERN 
2010 - 2013 
Boston Consulting Group 
Copyright 2014 Shiroyagi Corporation. All rights reserved. 2
Copyright 2014 Shiroyagi Corporation. All rights reserved. 3
Statistical modelling of Physics data 
Confirmatory: 
Highly theory driven model building 
Copyright 2014 Shiroyagi Corporation. All rights reserved. 4
Telling discovery from noise 
The model tells you the expected uncertainty 
Copyright 2014 Shiroyagi Corporation. All rights reserved. 5
Copyright 2014 Shiroyagi Corporation. All rights reserved. 6
Copyright 2014 Shiroyagi Corporation. All rights reserved. 7
Copyright 2014 Shiroyagi Corporation. All rights reserved. 8
Copyright 2014 Shiroyagi Corporation. All rights reserved. 9
Copyright 2014 Shiroyagi Corporation. All rights reserved. 10
Kamelio 
“Deep Learning” 
“Internet of 
Things” 
“Medical IT” 
“Global Strategy” 
Collects news through >3M 
topics to chose from 
Copyright 2014 Shiroyagi Corporation. All rights reserved. 11
3 
“Cats” 
“Anime” 
“Cats reaction to sighting 
dogs for the first time” 
Copyright 2014 Shiroyagi Corporation. All rights reserved. 12
Python puts all our tools together 
Image in Detect 
regions 
Object 
recog. Scoring Cropping 
0 1 2 3 4 
Matlab 
+Scipy 
C++ 
+Libraries 
Numpy PIL 
IPython and Python script 
Copyright 2014 Shiroyagi Corporation. All rights reserved. 13
Our approach is 
heavily influenced by 
Berkeley Vision and 
Learning Center 
Acknowledgement 
Copyright 2014 Shiroyagi Corporation. All rights reserved. 14
Detect 
regions 
0 1 2 3 4 
Copyright 2014 Shiroyagi Corporation. All rights reserved. 15
Region detection: Telling where to look at 
How do we find regions to feed into object recognition? 
Default strategy was to look at the center 
1 
Copyright 2014 Shiroyagi Corporation. All rights reserved. 16
Exhaustive windows -> segmentation 
Search over position, 
scale, aspect ratio 
Grouping parts of 
image at different scales 
Exhaustive search far too time inefficient 
for use with Deep Learning 
1 
Copyright 2014 Shiroyagi Corporation. All rights reserved. 17
1 Region detection: in practice 
Install Malab and Selective Search algorithm 
from author 
Run matlab as subprocess 
pid = subprocess.Popen(shlex.split(mc), stdout=open('/dev/null', 
'w'), cwd=script_dirname) 
matlab -nojvm -r "try; selective_search({‘image_file.jpg’}, 
‘output.mat'); catch; exit; end; exit” 
1 
2 
3 
Import output using scipy.io 
all_boxes = list(scipy.io.loadmat(‘output.mat')['all_boxes'][0]) 
subtractor = np.array((1, 1, 0, 0))[np.newaxis, :] 
all_boxes = [boxes - subtractor for boxes in all_boxes] 
Copyright 2014 Shiroyagi Corporation. All rights reserved. 18
1 Region detection: proposals generated 
~200 proposals generated per image 
Copyright 2014 Shiroyagi Corporation. All rights reserved. 19
Object 
recog. 
0 1 2 3 4 
Copyright 2014 Shiroyagi Corporation. All rights reserved. 20
Object recognition 
Deep blue beat Kasparov at chess in 1997… 
2 
Copyright 2014 Shiroyagi Corporation. All rights reserved. 21
2 Deep Learning: Damn good at it 
Copyright 2014 Shiroyagi Corporation. All rights reserved. 22
2 Convoluted Neural Network 
… 
Copyright 2014 Shiroyagi Corporation. All rights reserved. 23
Caffe: open R-CNN framework under rapid dev. 
C++/CUDA with Python wrapper 
2 
Copyright 2014 Shiroyagi Corporation. All rights reserved. 24
Pre-trained models published 
We used 200-category object recog. model 
developed for 2013 ImageNet Challenge 
2 
Copyright 2014 Shiroyagi Corporation. All rights reserved. 25
2 Object recognition: in practice 
Install a bunch of libraries and Caffe 
CUDA, Boost, OpenCV, BLAS… 
Import wrapper and configure 
MODEL_FILE=‘models/bvlc_…_ilsvrc13/deploy.prototxt’ 
PRETRAINED_FILE = ‘models/…/bvlc_…_ilsvrc13.caffemodel’ 
MEAN_FILE = 'caffe/imagenet/ilsvrc_2012_mean.npy' 
detector = caffe.Detector(MODEL_FILE, PRETRAINED_FILE, 
mean=np.load(MEAN_FILE), raw_scale=255, channel_swap=[2,1,0]) 
1 
2 
3 
Pass found regions for object detection 
self.detect_windows(zip(image_fnames, windows_list)) 
Copyright 2014 Shiroyagi Corporation. All rights reserved. 26
2 Object recognition: Result 
Obj Score 
0 domestic cat 1.03649377823 
1 domestic cat 0.0617411136627 
2 domestic cat -0.097744345665 
3 domestic cat -0.738470971584 
4 chair -0.988844156265 
5 skunk -0.999914288521 
6 tv or monitor -1.00460898876 
7 rubber eraser -1.01068615913 
8 chair -1.04896986485 
9 rubber eraser -1.09035253525 
10 band aid -1.09691572189 
Takes minutes to detect all windows 
Copyright 2014 Shiroyagi Corporation. All rights reserved. 27
2 Object recognition: Result 
Obj Score 
0 person 0.126184225082 
1 person 0.0311727523804 
2 person -0.0777613520622 
3 neck brace -0.39757412672 
4 person -0.415030777454 
5 drum -0.421649754047 
6 neck brace -0.481261610985 
7 tie -0.649109125137 
8 neck brace -0.719438135624 
9 face powder -0.789100408554 
10 face powder -0.838757038116 
Copyright 2014 Shiroyagi Corporation. All rights reserved. 28
Scoring 
0 1 2 3 4 
Copyright 2014 Shiroyagi Corporation. All rights reserved. 29
3 Scoring 
1 For every pixel, sum up score from all detections 
for 
i 
in 
xrange(len(detec0ons)): 
arr[ymin:ymax, 
xmin:xmax] 
+= 
math.exp(score) 
Copyright 2014 Shiroyagi Corporation. All rights reserved. 30
Score heatmap 
We used 200-cat object recognition model 
developed for 2013 ImageNet Challenge 
3 
Copyright 2014 Shiroyagi Corporation. All rights reserved. 31
Cropping 
0 1 2 3 4 
Copyright 2014 Shiroyagi Corporation. All rights reserved. 32
4 Cropping 
Generate all possible crop areas 
while 
y+hws 
<= 
h: 
while 
x+hws 
<= 
w: 
window_locs 
= 
np.vstack((window_locs, 
[x, 
y, 
x+hws, 
y+hws])) 
Find the crop that encloses the highest point of 
interest in the centre 
for 
i, 
window_loc 
in 
enumerate(window_locs): 
x1, 
y1, 
x2, 
y2 
= 
window_loc 
if 
max_val 
!= 
np.max(arr_con[y1:y2, 
x1:x2]): 
scores[i]=np.nan 
else: 
scores[i] 
= 
((x1+x2)/2.-­‐xp)**2+ 
((y1+y2)/2.-­‐yp)**2 
1 
2 
3 
Crop and save! 
img_pil 
= 
Image.open(fn) 
crop_area=map(lambda 
x: 
int(x), 
window_locs[scores.argmax()]) 
img_crop 
= 
img_pil.crop(crop_area) 
Copyright 2014 Shiroyagi Corporation. All rights reserved. 33
4 Finally 
Copyright 2014 Shiroyagi Corporation. All rights reserved. 34
Future improvements 
Fast face/human 
detection 
Aspect detection: 
square or rectangle? 
Object weighting 
Magnification 
Unseen object 
Copyright 2014 Shiroyagi Corporation. All rights reserved. 35

Weitere ähnliche Inhalte

Was ist angesagt?

Real Time Human Posture Detection with Multiple Depth Sensors
Real Time Human Posture Detection with Multiple Depth SensorsReal Time Human Posture Detection with Multiple Depth Sensors
Real Time Human Posture Detection with Multiple Depth Sensors
Wassim Filali
 
20110220 computer vision_eruhimov_lecture02
20110220 computer vision_eruhimov_lecture0220110220 computer vision_eruhimov_lecture02
20110220 computer vision_eruhimov_lecture02
Computer Science Club
 

Was ist angesagt? (20)

CVPR2016を自分なりにまとめてみた
CVPR2016を自分なりにまとめてみたCVPR2016を自分なりにまとめてみた
CVPR2016を自分なりにまとめてみた
 
Action Recognitionの歴史と最新動向
Action Recognitionの歴史と最新動向Action Recognitionの歴史と最新動向
Action Recognitionの歴史と最新動向
 
[AI07] Revolutionizing Image Processing with Cognitive Toolkit
[AI07] Revolutionizing Image Processing with Cognitive Toolkit[AI07] Revolutionizing Image Processing with Cognitive Toolkit
[AI07] Revolutionizing Image Processing with Cognitive Toolkit
 
FPT17: An object detector based on multiscale sliding window search using a f...
FPT17: An object detector based on multiscale sliding window search using a f...FPT17: An object detector based on multiscale sliding window search using a f...
FPT17: An object detector based on multiscale sliding window search using a f...
 
【DL輪読会】ViT + Self Supervised Learningまとめ
【DL輪読会】ViT + Self Supervised Learningまとめ【DL輪読会】ViT + Self Supervised Learningまとめ
【DL輪読会】ViT + Self Supervised Learningまとめ
 
モデルアーキテクチャ観点からの高速化2019
モデルアーキテクチャ観点からの高速化2019モデルアーキテクチャ観点からの高速化2019
モデルアーキテクチャ観点からの高速化2019
 
Real Time Human Posture Detection with Multiple Depth Sensors
Real Time Human Posture Detection with Multiple Depth SensorsReal Time Human Posture Detection with Multiple Depth Sensors
Real Time Human Posture Detection with Multiple Depth Sensors
 
用 Python 玩 LHC 公開數據
用 Python 玩 LHC 公開數據用 Python 玩 LHC 公開數據
用 Python 玩 LHC 公開數據
 
Adaptive object detection using adjacency and zoom prediction
Adaptive object detection using adjacency and zoom predictionAdaptive object detection using adjacency and zoom prediction
Adaptive object detection using adjacency and zoom prediction
 
【CVPR 2020 メタサーベイ】Video Analysis and Understanding
【CVPR 2020 メタサーベイ】Video Analysis and Understanding【CVPR 2020 メタサーベイ】Video Analysis and Understanding
【CVPR 2020 メタサーベイ】Video Analysis and Understanding
 
Ice: lightweight, efficient rendering for remote sensing images
Ice: lightweight, efficient rendering for remote sensing imagesIce: lightweight, efficient rendering for remote sensing images
Ice: lightweight, efficient rendering for remote sensing images
 
Deep Learning Cases: Text and Image Processing
Deep Learning Cases: Text and Image ProcessingDeep Learning Cases: Text and Image Processing
Deep Learning Cases: Text and Image Processing
 
Orfeo ToolBox workshop at FOSS4G Europe 2015
Orfeo ToolBox workshop at FOSS4G Europe 2015Orfeo ToolBox workshop at FOSS4G Europe 2015
Orfeo ToolBox workshop at FOSS4G Europe 2015
 
Extended Co-occurrence HOG with Dense Trajectories for Fine-grained Activity ...
Extended Co-occurrence HOG with Dense Trajectories for Fine-grained Activity ...Extended Co-occurrence HOG with Dense Trajectories for Fine-grained Activity ...
Extended Co-occurrence HOG with Dense Trajectories for Fine-grained Activity ...
 
kaggle NFL 1st and Future - Impact Detection
kaggle NFL 1st and Future - Impact Detectionkaggle NFL 1st and Future - Impact Detection
kaggle NFL 1st and Future - Impact Detection
 
Александр Заричковый "Faster than real-time face detection"
Александр Заричковый "Faster than real-time face detection"Александр Заричковый "Faster than real-time face detection"
Александр Заричковый "Faster than real-time face detection"
 
Deep Learning in the Wild with Arno Candel
Deep Learning in the Wild with Arno CandelDeep Learning in the Wild with Arno Candel
Deep Learning in the Wild with Arno Candel
 
Pragmatic Remote Sensing - IGARSS 2010
Pragmatic Remote Sensing - IGARSS 2010Pragmatic Remote Sensing - IGARSS 2010
Pragmatic Remote Sensing - IGARSS 2010
 
20110220 computer vision_eruhimov_lecture02
20110220 computer vision_eruhimov_lecture0220110220 computer vision_eruhimov_lecture02
20110220 computer vision_eruhimov_lecture02
 
Machine learning quality for production
Machine learning quality for productionMachine learning quality for production
Machine learning quality for production
 

Ähnlich wie PyData NYC by Akira Shibata

502021435-12345678Minor-Project-Ppt.pptx
502021435-12345678Minor-Project-Ppt.pptx502021435-12345678Minor-Project-Ppt.pptx
502021435-12345678Minor-Project-Ppt.pptx
shrey4922
 
Content-Centric Embedded ~Treasure Hunting Robot~ for LinuxCon Japan 2012
Content-Centric Embedded ~Treasure Hunting Robot~ for LinuxCon Japan 2012Content-Centric Embedded ~Treasure Hunting Robot~ for LinuxCon Japan 2012
Content-Centric Embedded ~Treasure Hunting Robot~ for LinuxCon Japan 2012
Industrial Technology Research Institute (ITRI)(工業技術研究院, 工研院)
 
Vipul divyanshu documentation on Kinect and Motion Tracking
Vipul divyanshu documentation  on Kinect and Motion TrackingVipul divyanshu documentation  on Kinect and Motion Tracking
Vipul divyanshu documentation on Kinect and Motion Tracking
Vipul Divyanshu
 

Ähnlich wie PyData NYC by Akira Shibata (20)

Challenges of Deep Learning in Computer Vision Webinar - Tessellate Imaging
Challenges of Deep Learning in Computer Vision Webinar - Tessellate ImagingChallenges of Deep Learning in Computer Vision Webinar - Tessellate Imaging
Challenges of Deep Learning in Computer Vision Webinar - Tessellate Imaging
 
Introduction to Crab - Python Framework for Building Recommender Systems
Introduction to Crab - Python Framework for Building Recommender SystemsIntroduction to Crab - Python Framework for Building Recommender Systems
Introduction to Crab - Python Framework for Building Recommender Systems
 
502021435-12345678Minor-Project-Ppt.pptx
502021435-12345678Minor-Project-Ppt.pptx502021435-12345678Minor-Project-Ppt.pptx
502021435-12345678Minor-Project-Ppt.pptx
 
DS LAB MANUAL.pdf
DS LAB MANUAL.pdfDS LAB MANUAL.pdf
DS LAB MANUAL.pdf
 
20181212 Queensland AI Meetup
20181212 Queensland AI Meetup20181212 Queensland AI Meetup
20181212 Queensland AI Meetup
 
IRJET- Object Detection in an Image using Convolutional Neural Network
IRJET- Object Detection in an Image using Convolutional Neural NetworkIRJET- Object Detection in an Image using Convolutional Neural Network
IRJET- Object Detection in an Image using Convolutional Neural Network
 
Machine_learning_internship_report_facemaskdetection.pptx
Machine_learning_internship_report_facemaskdetection.pptxMachine_learning_internship_report_facemaskdetection.pptx
Machine_learning_internship_report_facemaskdetection.pptx
 
Using Deep Learning for Computer Vision Applications
Using Deep Learning for Computer Vision ApplicationsUsing Deep Learning for Computer Vision Applications
Using Deep Learning for Computer Vision Applications
 
Content-Centric Embedded ~Treasure Hunting Robot~ for LinuxCon Japan 2012
Content-Centric Embedded ~Treasure Hunting Robot~ for LinuxCon Japan 2012Content-Centric Embedded ~Treasure Hunting Robot~ for LinuxCon Japan 2012
Content-Centric Embedded ~Treasure Hunting Robot~ for LinuxCon Japan 2012
 
Content-Centric Embedded
Content-Centric EmbeddedContent-Centric Embedded
Content-Centric Embedded
 
PyTorch Python Tutorial | Deep Learning Using PyTorch | Image Classifier Usin...
PyTorch Python Tutorial | Deep Learning Using PyTorch | Image Classifier Usin...PyTorch Python Tutorial | Deep Learning Using PyTorch | Image Classifier Usin...
PyTorch Python Tutorial | Deep Learning Using PyTorch | Image Classifier Usin...
 
Obj report
Obj reportObj report
Obj report
 
Fernando Arnaboldi - Exposing Hidden Exploitable Behaviors Using Extended Dif...
Fernando Arnaboldi - Exposing Hidden Exploitable Behaviors Using Extended Dif...Fernando Arnaboldi - Exposing Hidden Exploitable Behaviors Using Extended Dif...
Fernando Arnaboldi - Exposing Hidden Exploitable Behaviors Using Extended Dif...
 
Pytorch kr devcon
Pytorch kr devconPytorch kr devcon
Pytorch kr devcon
 
Vipul divyanshu documentation on Kinect and Motion Tracking
Vipul divyanshu documentation  on Kinect and Motion TrackingVipul divyanshu documentation  on Kinect and Motion Tracking
Vipul divyanshu documentation on Kinect and Motion Tracking
 
Awalin viz sec
Awalin viz secAwalin viz sec
Awalin viz sec
 
Crab - A Python Framework for Building Recommendation Systems
Crab - A Python Framework for Building Recommendation SystemsCrab - A Python Framework for Building Recommendation Systems
Crab - A Python Framework for Building Recommendation Systems
 
SDOBenchmark - a machine learning image dataset for the prediction of solar f...
SDOBenchmark - a machine learning image dataset for the prediction of solar f...SDOBenchmark - a machine learning image dataset for the prediction of solar f...
SDOBenchmark - a machine learning image dataset for the prediction of solar f...
 
Updates from Project Hydrogen: Unifying State-of-the-Art AI and Big Data in A...
Updates from Project Hydrogen: Unifying State-of-the-Art AI and Big Data in A...Updates from Project Hydrogen: Unifying State-of-the-Art AI and Big Data in A...
Updates from Project Hydrogen: Unifying State-of-the-Art AI and Big Data in A...
 
深層学習フレームワーク概要とChainerの事例紹介
深層学習フレームワーク概要とChainerの事例紹介深層学習フレームワーク概要とChainerの事例紹介
深層学習フレームワーク概要とChainerの事例紹介
 

Mehr von Akira Shibata

The LHC Explained by CNN
The LHC Explained by CNNThe LHC Explained by CNN
The LHC Explained by CNN
Akira Shibata
 
Analysis Software Development
Analysis Software DevelopmentAnalysis Software Development
Analysis Software Development
Akira Shibata
 

Mehr von Akira Shibata (20)

大規模言語モデル開発を支える分散学習技術 - 東京工業大学横田理央研究室の藤井一喜さん
大規模言語モデル開発を支える分散学習技術 - 東京工業大学横田理央研究室の藤井一喜さん大規模言語モデル開発を支える分散学習技術 - 東京工業大学横田理央研究室の藤井一喜さん
大規模言語モデル開発を支える分散学習技術 - 東京工業大学横田理央研究室の藤井一喜さん
 
W&B monthly meetup#7 Intro.pdf
W&B monthly meetup#7 Intro.pdfW&B monthly meetup#7 Intro.pdf
W&B monthly meetup#7 Intro.pdf
 
20230705 - Optuna Integration (to share).pdf
20230705 - Optuna Integration (to share).pdf20230705 - Optuna Integration (to share).pdf
20230705 - Optuna Integration (to share).pdf
 
W&B Seminar #5(to share).pdf
W&B Seminar #5(to share).pdfW&B Seminar #5(to share).pdf
W&B Seminar #5(to share).pdf
 
makoto shing (stability ai) - image model fine-tuning - wandb_event_230525.pdf
makoto shing (stability ai) - image model fine-tuning - wandb_event_230525.pdfmakoto shing (stability ai) - image model fine-tuning - wandb_event_230525.pdf
makoto shing (stability ai) - image model fine-tuning - wandb_event_230525.pdf
 
LLM Webinar - シバタアキラ to share.pdf
LLM Webinar - シバタアキラ to share.pdfLLM Webinar - シバタアキラ to share.pdf
LLM Webinar - シバタアキラ to share.pdf
 
W&B Seminar #4.pdf
W&B Seminar #4.pdfW&B Seminar #4.pdf
W&B Seminar #4.pdf
 
Kaggle and data science
Kaggle and data scienceKaggle and data science
Kaggle and data science
 
Data x
Data xData x
Data x
 
Akira shibata at developer summit 2016
Akira shibata at developer summit 2016Akira shibata at developer summit 2016
Akira shibata at developer summit 2016
 
PyData.Tokyo Hackathon#2 TensorFlow
PyData.Tokyo Hackathon#2 TensorFlowPyData.Tokyo Hackathon#2 TensorFlow
PyData.Tokyo Hackathon#2 TensorFlow
 
20150421 日経ビッグデータカンファレンス
20150421 日経ビッグデータカンファレンス20150421 日経ビッグデータカンファレンス
20150421 日経ビッグデータカンファレンス
 
人工知能をビジネスに活かす
人工知能をビジネスに活かす人工知能をビジネスに活かす
人工知能をビジネスに活かす
 
LHCにおける素粒子ビッグデータの解析とROOTライブラリ(Big Data Analysis at LHC and ROOT)
LHCにおける素粒子ビッグデータの解析とROOTライブラリ(Big Data Analysis at LHC and ROOT)LHCにおける素粒子ビッグデータの解析とROOTライブラリ(Big Data Analysis at LHC and ROOT)
LHCにおける素粒子ビッグデータの解析とROOTライブラリ(Big Data Analysis at LHC and ROOT)
 
PyData Tokyo Tutorial & Hackathon #1
PyData Tokyo Tutorial & Hackathon #1PyData Tokyo Tutorial & Hackathon #1
PyData Tokyo Tutorial & Hackathon #1
 
20150128 cross2015
20150128 cross201520150128 cross2015
20150128 cross2015
 
20141127 py datatokyomeetup2
20141127 py datatokyomeetup220141127 py datatokyomeetup2
20141127 py datatokyomeetup2
 
The LHC Explained by CNN
The LHC Explained by CNNThe LHC Explained by CNN
The LHC Explained by CNN
 
LHC for Students
LHC for StudentsLHC for Students
LHC for Students
 
Analysis Software Development
Analysis Software DevelopmentAnalysis Software Development
Analysis Software Development
 

Kürzlich hochgeladen

Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 bAsymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Sérgio Sacani
 
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdfPests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
PirithiRaju
 
Pests of mustard_Identification_Management_Dr.UPR.pdf
Pests of mustard_Identification_Management_Dr.UPR.pdfPests of mustard_Identification_Management_Dr.UPR.pdf
Pests of mustard_Identification_Management_Dr.UPR.pdf
PirithiRaju
 
Bacterial Identification and Classifications
Bacterial Identification and ClassificationsBacterial Identification and Classifications
Bacterial Identification and Classifications
Areesha Ahmad
 
Seismic Method Estimate velocity from seismic data.pptx
Seismic Method Estimate velocity from seismic  data.pptxSeismic Method Estimate velocity from seismic  data.pptx
Seismic Method Estimate velocity from seismic data.pptx
AlMamun560346
 
Pests of cotton_Sucking_Pests_Dr.UPR.pdf
Pests of cotton_Sucking_Pests_Dr.UPR.pdfPests of cotton_Sucking_Pests_Dr.UPR.pdf
Pests of cotton_Sucking_Pests_Dr.UPR.pdf
PirithiRaju
 
Module for Grade 9 for Asynchronous/Distance learning
Module for Grade 9 for Asynchronous/Distance learningModule for Grade 9 for Asynchronous/Distance learning
Module for Grade 9 for Asynchronous/Distance learning
levieagacer
 

Kürzlich hochgeladen (20)

Call Girls Alandi Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Alandi Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Alandi Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Alandi Call Me 7737669865 Budget Friendly No Advance Booking
 
STS-UNIT 4 CLIMATE CHANGE POWERPOINT PRESENTATION
STS-UNIT 4 CLIMATE CHANGE POWERPOINT PRESENTATIONSTS-UNIT 4 CLIMATE CHANGE POWERPOINT PRESENTATION
STS-UNIT 4 CLIMATE CHANGE POWERPOINT PRESENTATION
 
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 bAsymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
 
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdfPests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
 
Pests of mustard_Identification_Management_Dr.UPR.pdf
Pests of mustard_Identification_Management_Dr.UPR.pdfPests of mustard_Identification_Management_Dr.UPR.pdf
Pests of mustard_Identification_Management_Dr.UPR.pdf
 
Site Acceptance Test .
Site Acceptance Test                    .Site Acceptance Test                    .
Site Acceptance Test .
 
Feature-aligned N-BEATS with Sinkhorn divergence (ICLR '24)
Feature-aligned N-BEATS with Sinkhorn divergence (ICLR '24)Feature-aligned N-BEATS with Sinkhorn divergence (ICLR '24)
Feature-aligned N-BEATS with Sinkhorn divergence (ICLR '24)
 
COST ESTIMATION FOR A RESEARCH PROJECT.pptx
COST ESTIMATION FOR A RESEARCH PROJECT.pptxCOST ESTIMATION FOR A RESEARCH PROJECT.pptx
COST ESTIMATION FOR A RESEARCH PROJECT.pptx
 
Bacterial Identification and Classifications
Bacterial Identification and ClassificationsBacterial Identification and Classifications
Bacterial Identification and Classifications
 
Zoology 5th semester notes( Sumit_yadav).pdf
Zoology 5th semester notes( Sumit_yadav).pdfZoology 5th semester notes( Sumit_yadav).pdf
Zoology 5th semester notes( Sumit_yadav).pdf
 
Proteomics: types, protein profiling steps etc.
Proteomics: types, protein profiling steps etc.Proteomics: types, protein profiling steps etc.
Proteomics: types, protein profiling steps etc.
 
Seismic Method Estimate velocity from seismic data.pptx
Seismic Method Estimate velocity from seismic  data.pptxSeismic Method Estimate velocity from seismic  data.pptx
Seismic Method Estimate velocity from seismic data.pptx
 
Factory Acceptance Test( FAT).pptx .
Factory Acceptance Test( FAT).pptx       .Factory Acceptance Test( FAT).pptx       .
Factory Acceptance Test( FAT).pptx .
 
Vip profile Call Girls In Lonavala 9748763073 For Genuine Sex Service At Just...
Vip profile Call Girls In Lonavala 9748763073 For Genuine Sex Service At Just...Vip profile Call Girls In Lonavala 9748763073 For Genuine Sex Service At Just...
Vip profile Call Girls In Lonavala 9748763073 For Genuine Sex Service At Just...
 
Pests of cotton_Sucking_Pests_Dr.UPR.pdf
Pests of cotton_Sucking_Pests_Dr.UPR.pdfPests of cotton_Sucking_Pests_Dr.UPR.pdf
Pests of cotton_Sucking_Pests_Dr.UPR.pdf
 
Unit5-Cloud.pptx for lpu course cse121 o
Unit5-Cloud.pptx for lpu course cse121 oUnit5-Cloud.pptx for lpu course cse121 o
Unit5-Cloud.pptx for lpu course cse121 o
 
GBSN - Microbiology (Unit 1)
GBSN - Microbiology (Unit 1)GBSN - Microbiology (Unit 1)
GBSN - Microbiology (Unit 1)
 
Kochi ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Kochi ESCORT SERVICE❤CALL GIRL
Kochi ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Kochi ESCORT SERVICE❤CALL GIRLKochi ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Kochi ESCORT SERVICE❤CALL GIRL
Kochi ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Kochi ESCORT SERVICE❤CALL GIRL
 
module for grade 9 for distance learning
module for grade 9 for distance learningmodule for grade 9 for distance learning
module for grade 9 for distance learning
 
Module for Grade 9 for Asynchronous/Distance learning
Module for Grade 9 for Asynchronous/Distance learningModule for Grade 9 for Asynchronous/Distance learning
Module for Grade 9 for Asynchronous/Distance learning
 

PyData NYC by Akira Shibata

  • 1. Putting Together World's Best Data Processing Research with Python Copyright 2014 Shiroyagi Corporation. All rights reserved. Akira Shibata, PhD Shiroyagi Corporation
  • 2. Who am I Akira Shibata, PhD. TW: @punkphysicist CEO, Shiroyagi Corporation (shiroyagi.co.jp) Kamelio: Personalised News Curation Kamect: Contents Discovery Platform 2004 - 2010: Data Scientist @ NYU Statistical data modelling @ LHC, CERN 2010 - 2013 Boston Consulting Group Copyright 2014 Shiroyagi Corporation. All rights reserved. 2
  • 3. Copyright 2014 Shiroyagi Corporation. All rights reserved. 3
  • 4. Statistical modelling of Physics data Confirmatory: Highly theory driven model building Copyright 2014 Shiroyagi Corporation. All rights reserved. 4
  • 5. Telling discovery from noise The model tells you the expected uncertainty Copyright 2014 Shiroyagi Corporation. All rights reserved. 5
  • 6. Copyright 2014 Shiroyagi Corporation. All rights reserved. 6
  • 7. Copyright 2014 Shiroyagi Corporation. All rights reserved. 7
  • 8. Copyright 2014 Shiroyagi Corporation. All rights reserved. 8
  • 9. Copyright 2014 Shiroyagi Corporation. All rights reserved. 9
  • 10. Copyright 2014 Shiroyagi Corporation. All rights reserved. 10
  • 11. Kamelio “Deep Learning” “Internet of Things” “Medical IT” “Global Strategy” Collects news through >3M topics to chose from Copyright 2014 Shiroyagi Corporation. All rights reserved. 11
  • 12. 3 “Cats” “Anime” “Cats reaction to sighting dogs for the first time” Copyright 2014 Shiroyagi Corporation. All rights reserved. 12
  • 13. Python puts all our tools together Image in Detect regions Object recog. Scoring Cropping 0 1 2 3 4 Matlab +Scipy C++ +Libraries Numpy PIL IPython and Python script Copyright 2014 Shiroyagi Corporation. All rights reserved. 13
  • 14. Our approach is heavily influenced by Berkeley Vision and Learning Center Acknowledgement Copyright 2014 Shiroyagi Corporation. All rights reserved. 14
  • 15. Detect regions 0 1 2 3 4 Copyright 2014 Shiroyagi Corporation. All rights reserved. 15
  • 16. Region detection: Telling where to look at How do we find regions to feed into object recognition? Default strategy was to look at the center 1 Copyright 2014 Shiroyagi Corporation. All rights reserved. 16
  • 17. Exhaustive windows -> segmentation Search over position, scale, aspect ratio Grouping parts of image at different scales Exhaustive search far too time inefficient for use with Deep Learning 1 Copyright 2014 Shiroyagi Corporation. All rights reserved. 17
  • 18. 1 Region detection: in practice Install Malab and Selective Search algorithm from author Run matlab as subprocess pid = subprocess.Popen(shlex.split(mc), stdout=open('/dev/null', 'w'), cwd=script_dirname) matlab -nojvm -r "try; selective_search({‘image_file.jpg’}, ‘output.mat'); catch; exit; end; exit” 1 2 3 Import output using scipy.io all_boxes = list(scipy.io.loadmat(‘output.mat')['all_boxes'][0]) subtractor = np.array((1, 1, 0, 0))[np.newaxis, :] all_boxes = [boxes - subtractor for boxes in all_boxes] Copyright 2014 Shiroyagi Corporation. All rights reserved. 18
  • 19. 1 Region detection: proposals generated ~200 proposals generated per image Copyright 2014 Shiroyagi Corporation. All rights reserved. 19
  • 20. Object recog. 0 1 2 3 4 Copyright 2014 Shiroyagi Corporation. All rights reserved. 20
  • 21. Object recognition Deep blue beat Kasparov at chess in 1997… 2 Copyright 2014 Shiroyagi Corporation. All rights reserved. 21
  • 22. 2 Deep Learning: Damn good at it Copyright 2014 Shiroyagi Corporation. All rights reserved. 22
  • 23. 2 Convoluted Neural Network … Copyright 2014 Shiroyagi Corporation. All rights reserved. 23
  • 24. Caffe: open R-CNN framework under rapid dev. C++/CUDA with Python wrapper 2 Copyright 2014 Shiroyagi Corporation. All rights reserved. 24
  • 25. Pre-trained models published We used 200-category object recog. model developed for 2013 ImageNet Challenge 2 Copyright 2014 Shiroyagi Corporation. All rights reserved. 25
  • 26. 2 Object recognition: in practice Install a bunch of libraries and Caffe CUDA, Boost, OpenCV, BLAS… Import wrapper and configure MODEL_FILE=‘models/bvlc_…_ilsvrc13/deploy.prototxt’ PRETRAINED_FILE = ‘models/…/bvlc_…_ilsvrc13.caffemodel’ MEAN_FILE = 'caffe/imagenet/ilsvrc_2012_mean.npy' detector = caffe.Detector(MODEL_FILE, PRETRAINED_FILE, mean=np.load(MEAN_FILE), raw_scale=255, channel_swap=[2,1,0]) 1 2 3 Pass found regions for object detection self.detect_windows(zip(image_fnames, windows_list)) Copyright 2014 Shiroyagi Corporation. All rights reserved. 26
  • 27. 2 Object recognition: Result Obj Score 0 domestic cat 1.03649377823 1 domestic cat 0.0617411136627 2 domestic cat -0.097744345665 3 domestic cat -0.738470971584 4 chair -0.988844156265 5 skunk -0.999914288521 6 tv or monitor -1.00460898876 7 rubber eraser -1.01068615913 8 chair -1.04896986485 9 rubber eraser -1.09035253525 10 band aid -1.09691572189 Takes minutes to detect all windows Copyright 2014 Shiroyagi Corporation. All rights reserved. 27
  • 28. 2 Object recognition: Result Obj Score 0 person 0.126184225082 1 person 0.0311727523804 2 person -0.0777613520622 3 neck brace -0.39757412672 4 person -0.415030777454 5 drum -0.421649754047 6 neck brace -0.481261610985 7 tie -0.649109125137 8 neck brace -0.719438135624 9 face powder -0.789100408554 10 face powder -0.838757038116 Copyright 2014 Shiroyagi Corporation. All rights reserved. 28
  • 29. Scoring 0 1 2 3 4 Copyright 2014 Shiroyagi Corporation. All rights reserved. 29
  • 30. 3 Scoring 1 For every pixel, sum up score from all detections for i in xrange(len(detec0ons)): arr[ymin:ymax, xmin:xmax] += math.exp(score) Copyright 2014 Shiroyagi Corporation. All rights reserved. 30
  • 31. Score heatmap We used 200-cat object recognition model developed for 2013 ImageNet Challenge 3 Copyright 2014 Shiroyagi Corporation. All rights reserved. 31
  • 32. Cropping 0 1 2 3 4 Copyright 2014 Shiroyagi Corporation. All rights reserved. 32
  • 33. 4 Cropping Generate all possible crop areas while y+hws <= h: while x+hws <= w: window_locs = np.vstack((window_locs, [x, y, x+hws, y+hws])) Find the crop that encloses the highest point of interest in the centre for i, window_loc in enumerate(window_locs): x1, y1, x2, y2 = window_loc if max_val != np.max(arr_con[y1:y2, x1:x2]): scores[i]=np.nan else: scores[i] = ((x1+x2)/2.-­‐xp)**2+ ((y1+y2)/2.-­‐yp)**2 1 2 3 Crop and save! img_pil = Image.open(fn) crop_area=map(lambda x: int(x), window_locs[scores.argmax()]) img_crop = img_pil.crop(crop_area) Copyright 2014 Shiroyagi Corporation. All rights reserved. 33
  • 34. 4 Finally Copyright 2014 Shiroyagi Corporation. All rights reserved. 34
  • 35. Future improvements Fast face/human detection Aspect detection: square or rectangle? Object weighting Magnification Unseen object Copyright 2014 Shiroyagi Corporation. All rights reserved. 35