LoginSignup
0
0

More than 1 year has passed since last update.

siim-covid19-detectionコンペの画像読込方法

Posted at

背景

kaggleのsiim-covid19-detectionコンペの画像読み込み方法がよくわからなかったので、調べたログです。環境はGoogle Colaboratoryを使用しています。
また、データをkaggle APIで取得する部分は以下の記事にまとめています。
記事名:kaggleコンペのデータ取得 (Google Colaboratory)

実施内容

#pydicomのインストール
!pip install pydicom
指定ファイルの読込
import pydicom
%cd /content/drive/My Drive/data/kaggle/siim-covid19-detection/
example_file = pydicom.dcmread("3fadf4b48db3.dcm")
example_image = example_file.pixel_array
データの表示
from matplotlib import pyplot as plt
plt.imshow(example_file.pixel_array)
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0