title: Using SVG image files to train a model
body: <p>I am trying to use SVG image files to train a model in Python. When I run the below code in Jupyter notebook, I am getting below error. Also <code>Image.open()</code> does not work here. Is there a way to get this code working for <code>.svg</code> image files?</p>
  <pre><code>from PIL import Image
  drawing = svg2rlg(&quot;/content/America_Online_logo.svg&quot;)
  base_url = &quot;https://upload.wikimedia.org/wikipedia/commons/0/09/America_Online_logo.svg&quot;
  base_image_path = tf.keras.utils.get_file(fname = &quot;America_Online_logo.svg&quot;, origin = 
  base_url,)
  Image.open(base_image_path)
  a = plt.imread(base_image_path)
  from keras.optimizers import gradient_descent_v2 
  width, height = keras.preprocessing.image.load_img(base_image_path).size
  </code></pre>
  <p>Getting following error:</p>
  <pre><code>UnidentifiedImageError Traceback (most recent call last)
  `&lt;ipython-input-39-a31080608fad&gt; in &lt;module&gt;()`
  
      from keras.optimizers import gradient_descent_v2
      width, height = keras.preprocessing.image.load_img(base_image_path).size
      img_nrows = 400
      img_ncols = int(width * img_nrows / height)
  
  2 frames
  /usr/local/lib/python3.7/dist-packages/PIL/Image.py in open(fp, mode)
      warnings.warn(message)
      raise UnidentifiedImageError( &quot;cannot identify image file %r&quot; % (filename if filename else 
      fp))
  </code></pre>