Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Modern Computer Vision with PyTorch

You're reading from  Modern Computer Vision with PyTorch

Product type Book
Published in Nov 2020
Publisher Packt
ISBN-13 9781839213472
Pages 824 pages
Edition 1st Edition
Languages
Authors (2):
V Kishore Ayyadevara V Kishore Ayyadevara
Profile icon V Kishore Ayyadevara
Yeshwanth Reddy Yeshwanth Reddy
Profile icon Yeshwanth Reddy
View More author details

Table of Contents (25) Chapters

Preface Section 1 - Fundamentals of Deep Learning for Computer Vision
Artificial Neural Network Fundamentals PyTorch Fundamentals Building a Deep Neural Network with PyTorch Section 2 - Object Classification and Detection
Introducing Convolutional Neural Networks Transfer Learning for Image Classification Practical Aspects of Image Classification Basics of Object Detection Advanced Object Detection Image Segmentation Applications of Object Detection and Segmentation Section 3 - Image Manipulation
Autoencoders and Image Manipulation Image Generation Using GANs Advanced GANs to Manipulate Images Section 4 - Combining Computer Vision with Other Techniques
Training with Minimal Data Points Combining Computer Vision and NLP Techniques Combining Computer Vision and Reinforcement Learning Moving a Model to Production Using OpenCV Utilities for Image Analysis Other Books You May Enjoy Appendix

Training Faster R-CNN on a custom dataset

In the following code, we will train the Faster R-CNN algorithm to detect the bounding boxes around objects present in images. For this, we will work on the same truck versus bus detection exercise that we worked on in the previous chapter:

The following code is available as Training_Faster_RCNN.ipynb in the Chapter08 folder of this book's GitHub repository - https://tinyurl.com/mcvp-packt.
  1. Download the dataset:
import os
if not os.path.exists('images'):
!pip install -qU torch_snippets
from google.colab import files
files.upload() # upload kaggle.json
!mkdir -p ~/.kaggle
!mv kaggle.json ~/.kaggle/
!ls ~/.kaggle
!chmod 600 /root/.kaggle/kaggle.json
!kaggle datasets download \
-d sixhky/open-images-bus-trucks/
!unzip -qq open-images-bus-trucks.zip
!rm open-images-bus-trucks.zip
  1. Read the DataFrame containing metadata of information about images and their bounding box, and classes:
from torch_snippets...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}