#!/usr/bin/env python # coding: utf-8 # In[1]: get_ipython().run_line_magic('reload_ext', 'autoreload') get_ipython().run_line_magic('autoreload', '2') # In[2]: from ktrain.vision.object_detection import ObjectDetector from ktrain import vision # In[3]: od = ObjectDetector() # In[4]: get_ipython().system('wget https://free-images.com/md/b17a/blue_summer_woman_mom.jpg -O /tmp/mom.jpg -q') get_ipython().system('wget https://free-images.com/md/1855/new_york_skyline_usa.jpg -O /tmp/new_york.jpg -q') get_ipython().system('wget https://free-images.com/md/86a4/aroma_aromatic_beverage_bio.jpg -O /tmp/coffee.jpg -q') get_ipython().system('wget https://free-images.com/md/176d/squirrel_tail_bushy_tail.jpg -O /tmp/squirrel.jpg -q') # In[6]: vision.show_image('/tmp/mom.jpg') od.detect('/tmp/mom.jpg') # In[7]: vision.show_image('/tmp/new_york.jpg') od.detect('/tmp/new_york.jpg') # In[8]: vision.show_image('/tmp/coffee.jpg') od.detect('/tmp/coffee.jpg') # In[9]: vision.show_image('/tmp/squirrel.jpg') od.detect('/tmp/squirrel.jpg') # I guess it is a bench to the squirrel. # In[ ]: # In[ ]: