SlideShare ist ein Scribd-Unternehmen logo
1 von 13
Google Colab Workshop
By: Asim Hameed Khan
Teaching Assistant
CS867 Computer Vision (Fall 2020)
Machine Learning and Vision Lab 1
Introduction
• Google Research and its most Popular AI framework called TensorFlow.
• Along with TensorFlow, Collaboratory was developed, now know as Google Colab.
• Most Attractive feature of Google Colab, yes GPU and its totally free.
• Pre-requistes:
It is assumed you are already aware of:
• Jupyter notebook
• Github
• Basics of Python
• And some other programming language
• Basic Linux command line/Terminal operations.
Machine Learning and Vision Lab 2
WhatColabOffersyou?
• Write and execute code in Python
• Document your code that supports mathematical equations
• Create/ Upload/Share notebooks
• Import/Save notebooks from/to Google Drive
• Import/Publish notebooks from GitHub
• Import external datasets e.g. from Kaggle
• Integrate PyTorch, TensorFlow, Keras, OpenCV
• Free Cloud service with free GPU
Machine Learning and Vision Lab 3
NotebookCreation(andtheirdemo)
As Colab implicitly uses Google Drive for storing your notebooks, ensure that you are logged in to your Google Drive a
ccount before proceeding further.
• Open the following URL in your browser − https://colab.research.google.com Your browser would display the follo
wing screen
• Click on the NEW PYTHON 3 NOTEBOOK link at the bottom of the screen. A new notebook would open up.
• By default, the notebook uses the naming convention UntitledXX.ipynb. To rename the notebook, click on this na
me and type in the desired name.
• Entering and executing code in cell block.
• Documenting your code using Markdown.
• Some Python examples.
• Other Packages i.e. NumPy, Matplotlib examples.
Machine Learning and Vision Lab 4
InvokingSystemCommands
Colab’s Backend is All linux, So feel free to use any linux commands here.
(We will need to use ”!” symbol before these commands to execute on colab)
Jupyter includes shortcuts for many common system operations. Colab Code cell supports this feature.
• Echo messages
• Getting Remote Data (with wget)
• List files and folders
• Current working Directory
• Make directory, Copy and Move files
• magics
Machine Learning and Vision Lab 5
ExecutingExternalPythonFiles
• Upload or Create python scripts in colab
• Code editor
• Code execution
Machine Learning and Vision Lab 6
GraphicalOutputs
• OpenCV function cv2.imshow(image) doesn’t work in Colab or jupyter notebook. That’s why Colab instroducted
Cv2_imshow() function
• Or Use Matplotlib.
InstallingPackages/Libraries
• Colab supports most of machine learning libraries available.
• Colab already has most of the libraries pre-installed but you might need to upgrade or downgrade package based
on your requirements.
• You can install using:
!pip install xyz
Machine Learning and Vision Lab 7
MountingGoogleDrive
• There are two options to mount google drive:
• Mount using Mount Drive button in Files section.
• Or Use code
• You need to give permission to modify files in Google Drive.
• Best practices while working with datasets.
Machine Learning and Vision Lab 8
UsingGPU
Now you can develop deep learning applications with Google
Colaboratory -on the free Tesla K80 GPU , Tesla T4
using Keras, Tensorflow and PyTorch.
• Colab provides GPU and is totally free.
• Enabling / Disabling GPU
• To enable GPU in your notebook, select the following menu options − Runtime / Change runtime type
• Testing for GPU
• Listing Devices
• Checking RAM
Machine Learning and Vision Lab 9
UsinganotebookfromGithub
Demo:
https://github.com/visionatseecs/keras-starter/blob/main/keras_intro_cnn.ipynb
Machine Learning and Vision Lab 10
DownloadingKaggleDatasetinColab
Demo:
https://github.com/visionatseecs/keras-starter/blob/main/keras_intro_cnn.ipynb
Savingandsharing YourWork
• Download “*.ipynb” or “*.py” files.
• Save a Copy in Google Drive
• Save a copy as Gist.
• Save a Copy or commit into your Github Repositories.
• Share Just like you share your Google Drive files.
Machine Learning and Vision Lab 11
Machine Learning and Vision Lab 12
Questions?
References
1. https://colab.research.google.com/
2. ComputerVision@SEEECS (https://github.com/visionatseecs/)
Machine Learning and Vision Lab 13

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Basics of Object Oriented Programming in Python
Basics of Object Oriented Programming in PythonBasics of Object Oriented Programming in Python
Basics of Object Oriented Programming in Python
 
DATA VISUALIZATION USING MATPLOTLIB (PYTHON)
DATA VISUALIZATION USING MATPLOTLIB (PYTHON)DATA VISUALIZATION USING MATPLOTLIB (PYTHON)
DATA VISUALIZATION USING MATPLOTLIB (PYTHON)
 
pandas - Python Data Analysis
pandas - Python Data Analysispandas - Python Data Analysis
pandas - Python Data Analysis
 
PyTorch 2 Internals
PyTorch 2 InternalsPyTorch 2 Internals
PyTorch 2 Internals
 
Python idle introduction(3)
Python idle introduction(3)Python idle introduction(3)
Python idle introduction(3)
 
Unleashing the Power of OpenAI GPT-3 in FME Data Integration Workflows
Unleashing the Power of OpenAI GPT-3 in FME Data Integration WorkflowsUnleashing the Power of OpenAI GPT-3 in FME Data Integration Workflows
Unleashing the Power of OpenAI GPT-3 in FME Data Integration Workflows
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Chapter 07 inheritance
Chapter 07 inheritanceChapter 07 inheritance
Chapter 07 inheritance
 
A Comprehensive Review of Large Language Models for.pptx
A Comprehensive Review of Large Language Models for.pptxA Comprehensive Review of Large Language Models for.pptx
A Comprehensive Review of Large Language Models for.pptx
 
Introduction to matplotlib
Introduction to matplotlibIntroduction to matplotlib
Introduction to matplotlib
 
Python presentation by Monu Sharma
Python presentation by Monu SharmaPython presentation by Monu Sharma
Python presentation by Monu Sharma
 
Introduction to numpy
Introduction to numpyIntroduction to numpy
Introduction to numpy
 
Python Generators
Python GeneratorsPython Generators
Python Generators
 
PyTorch under the hood
PyTorch under the hoodPyTorch under the hood
PyTorch under the hood
 
"Using TensorFlow Lite to Deploy Deep Learning on Cortex-M Microcontrollers,"...
"Using TensorFlow Lite to Deploy Deep Learning on Cortex-M Microcontrollers,"..."Using TensorFlow Lite to Deploy Deep Learning on Cortex-M Microcontrollers,"...
"Using TensorFlow Lite to Deploy Deep Learning on Cortex-M Microcontrollers,"...
 
Jupyter, A Platform for Data Science at Scale
Jupyter, A Platform for Data Science at ScaleJupyter, A Platform for Data Science at Scale
Jupyter, A Platform for Data Science at Scale
 
Python Intro
Python IntroPython Intro
Python Intro
 
MatplotLib.pptx
MatplotLib.pptxMatplotLib.pptx
MatplotLib.pptx
 
A brief primer on OpenAI's GPT-3
A brief primer on OpenAI's GPT-3A brief primer on OpenAI's GPT-3
A brief primer on OpenAI's GPT-3
 
Python ppt
Python pptPython ppt
Python ppt
 

Ähnlich wie Colab workshop (for Computer vision Students)

August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchAugust Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
Howard Greenberg
 

Ähnlich wie Colab workshop (for Computer vision Students) (20)

Google colab introduction
Google colab   introductionGoogle colab   introduction
Google colab introduction
 
1_International_Google_CoLab_20220307.pptx
1_International_Google_CoLab_20220307.pptx1_International_Google_CoLab_20220307.pptx
1_International_Google_CoLab_20220307.pptx
 
Introduction to Google Colaboratory.pdf
Introduction to Google Colaboratory.pdfIntroduction to Google Colaboratory.pdf
Introduction to Google Colaboratory.pdf
 
PyCourse - Self driving python course
PyCourse - Self driving python coursePyCourse - Self driving python course
PyCourse - Self driving python course
 
Introduction to the intermediate Python - v1.1
Introduction to the intermediate Python - v1.1Introduction to the intermediate Python - v1.1
Introduction to the intermediate Python - v1.1
 
Intro - End to end ML with Kubeflow @ SignalConf 2018
Intro - End to end ML with Kubeflow @ SignalConf 2018Intro - End to end ML with Kubeflow @ SignalConf 2018
Intro - End to end ML with Kubeflow @ SignalConf 2018
 
Leveraging docker for hadoop build automation and big data stack provisioning
Leveraging docker for hadoop build automation and big data stack provisioningLeveraging docker for hadoop build automation and big data stack provisioning
Leveraging docker for hadoop build automation and big data stack provisioning
 
Leveraging Docker for Hadoop build automation and Big Data stack provisioning
Leveraging Docker for Hadoop build automation and Big Data stack provisioningLeveraging Docker for Hadoop build automation and Big Data stack provisioning
Leveraging Docker for Hadoop build automation and Big Data stack provisioning
 
Google CoLab (20230321)
Google CoLab (20230321)Google CoLab (20230321)
Google CoLab (20230321)
 
Programming Sessions KU Leuven - Session 01
Programming Sessions KU Leuven - Session 01Programming Sessions KU Leuven - Session 01
Programming Sessions KU Leuven - Session 01
 
Fluo CICD OpenStack Summit
Fluo CICD OpenStack SummitFluo CICD OpenStack Summit
Fluo CICD OpenStack Summit
 
presentationcloud-18123333331185718.pptx
presentationcloud-18123333331185718.pptxpresentationcloud-18123333331185718.pptx
presentationcloud-18123333331185718.pptx
 
Reproducibility in artificial intelligence
Reproducibility in artificial intelligenceReproducibility in artificial intelligence
Reproducibility in artificial intelligence
 
PyData Boston 2013
PyData Boston 2013PyData Boston 2013
PyData Boston 2013
 
Head first android apps dev tools
Head first android apps dev toolsHead first android apps dev tools
Head first android apps dev tools
 
State of Big Data on ARM64 / AArch64 - Apache Bigtop
State of Big Data on ARM64 / AArch64 - Apache BigtopState of Big Data on ARM64 / AArch64 - Apache Bigtop
State of Big Data on ARM64 / AArch64 - Apache Bigtop
 
The New Frontend Toolchain
The New Frontend ToolchainThe New Frontend Toolchain
The New Frontend Toolchain
 
Git for folk who like GUIs
Git for folk who like GUIsGit for folk who like GUIs
Git for folk who like GUIs
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
 
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchAugust Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
 

Kürzlich hochgeladen

%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 

Kürzlich hochgeladen (20)

VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 

Colab workshop (for Computer vision Students)

  • 1. Google Colab Workshop By: Asim Hameed Khan Teaching Assistant CS867 Computer Vision (Fall 2020) Machine Learning and Vision Lab 1
  • 2. Introduction • Google Research and its most Popular AI framework called TensorFlow. • Along with TensorFlow, Collaboratory was developed, now know as Google Colab. • Most Attractive feature of Google Colab, yes GPU and its totally free. • Pre-requistes: It is assumed you are already aware of: • Jupyter notebook • Github • Basics of Python • And some other programming language • Basic Linux command line/Terminal operations. Machine Learning and Vision Lab 2
  • 3. WhatColabOffersyou? • Write and execute code in Python • Document your code that supports mathematical equations • Create/ Upload/Share notebooks • Import/Save notebooks from/to Google Drive • Import/Publish notebooks from GitHub • Import external datasets e.g. from Kaggle • Integrate PyTorch, TensorFlow, Keras, OpenCV • Free Cloud service with free GPU Machine Learning and Vision Lab 3
  • 4. NotebookCreation(andtheirdemo) As Colab implicitly uses Google Drive for storing your notebooks, ensure that you are logged in to your Google Drive a ccount before proceeding further. • Open the following URL in your browser − https://colab.research.google.com Your browser would display the follo wing screen • Click on the NEW PYTHON 3 NOTEBOOK link at the bottom of the screen. A new notebook would open up. • By default, the notebook uses the naming convention UntitledXX.ipynb. To rename the notebook, click on this na me and type in the desired name. • Entering and executing code in cell block. • Documenting your code using Markdown. • Some Python examples. • Other Packages i.e. NumPy, Matplotlib examples. Machine Learning and Vision Lab 4
  • 5. InvokingSystemCommands Colab’s Backend is All linux, So feel free to use any linux commands here. (We will need to use ”!” symbol before these commands to execute on colab) Jupyter includes shortcuts for many common system operations. Colab Code cell supports this feature. • Echo messages • Getting Remote Data (with wget) • List files and folders • Current working Directory • Make directory, Copy and Move files • magics Machine Learning and Vision Lab 5
  • 6. ExecutingExternalPythonFiles • Upload or Create python scripts in colab • Code editor • Code execution Machine Learning and Vision Lab 6 GraphicalOutputs • OpenCV function cv2.imshow(image) doesn’t work in Colab or jupyter notebook. That’s why Colab instroducted Cv2_imshow() function • Or Use Matplotlib.
  • 7. InstallingPackages/Libraries • Colab supports most of machine learning libraries available. • Colab already has most of the libraries pre-installed but you might need to upgrade or downgrade package based on your requirements. • You can install using: !pip install xyz Machine Learning and Vision Lab 7
  • 8. MountingGoogleDrive • There are two options to mount google drive: • Mount using Mount Drive button in Files section. • Or Use code • You need to give permission to modify files in Google Drive. • Best practices while working with datasets. Machine Learning and Vision Lab 8
  • 9. UsingGPU Now you can develop deep learning applications with Google Colaboratory -on the free Tesla K80 GPU , Tesla T4 using Keras, Tensorflow and PyTorch. • Colab provides GPU and is totally free. • Enabling / Disabling GPU • To enable GPU in your notebook, select the following menu options − Runtime / Change runtime type • Testing for GPU • Listing Devices • Checking RAM Machine Learning and Vision Lab 9
  • 10. UsinganotebookfromGithub Demo: https://github.com/visionatseecs/keras-starter/blob/main/keras_intro_cnn.ipynb Machine Learning and Vision Lab 10 DownloadingKaggleDatasetinColab Demo: https://github.com/visionatseecs/keras-starter/blob/main/keras_intro_cnn.ipynb
  • 11. Savingandsharing YourWork • Download “*.ipynb” or “*.py” files. • Save a Copy in Google Drive • Save a copy as Gist. • Save a Copy or commit into your Github Repositories. • Share Just like you share your Google Drive files. Machine Learning and Vision Lab 11
  • 12. Machine Learning and Vision Lab 12 Questions?
  • 13. References 1. https://colab.research.google.com/ 2. ComputerVision@SEEECS (https://github.com/visionatseecs/) Machine Learning and Vision Lab 13

Hinweis der Redaktion

  1. - $3x_1 + 6x_2 + x_3 =< 28$