[PYTHON] Image segment using Oxford_iiit_pet on Google Colab

I'm studying image segmentation using tensorflow.

This time I tried using the oxford dataset.

Execution environment

macos Google Colab

Where it gets stuck

I finished writing the code once with vscode, but I still have the problem that the processing is slow because I can not use the GPU.

Therefore, I decided to use Google Colab published by Google teacher. You can use the GPU for free here.

First, I pasted my code, but it says that the Oxford dataset has not been downloaded. That's strange. I was able to do it normally with VScode, but when I looked it up, I found out. ["Image segmentation by u-net"](https://data-analysis-stats.jp/%E6%B7%B1%E5%B1%9E%E5%AD%A6%E7%BF%92/u- net% E3% 81% AB% E3% 82% 88% E3% 82% 8B% E7% 94% BB% E5% 83% 8F% E3% 82% BB% E3% 82% B0% E3% 83% A1% E3% 83% B3% E3% 83% 86% E3% 83% BC% E3% 82% B7% E3% 83% A7% E3% 83% B3image-segmentation% E3% 81% AE% E8% A7% A3% E8% AA% AC /) I found this article, so I used it as a reference.

!pip install -q git+https://github.com/tensorflow/examples.git
!pip install -q -U tfds-nightly

It seemed like I had to write these code first.

Summary

Apparently, even if you downloaded it once on the terminal of the pc, when you use it with google colab, it seems that you need to download it again on colab.

And after all, GPU was able to process faster than CPU!

Recommended Posts

Image segment using Oxford_iiit_pet on Google Colab
Play with Turtle on Google Colab
Image collection using Google Custom Search API
I tried running YOLO v3 on Google Colab
Output to "7-segment LED" using python on Raspberry Pi 3!
Google Colab Tips Organize
Scraping google search (image)
Image segmentation using U-net
Notes on using Alembic
Code snippets often used when using BigQuery with Google Colab
Access google spreadsheet using python on raspberry pi (for myself)
[Introduction] Artificial satellite data analysis using Python (Google Colab environment)
Display the address entered using Rails gem'geocoder' on Google Map
An error that stumbled upon learning YOLO on Google Colab
Image Optimize on the server side using TinyPNG's Web API
Deep Learning with Shogi AI on Mac and Google Colab