text_plain_output_1.png image_output_2.png image_output_1.png
import json

import matplotlib.pylab as plt

import rasterio

image = '/kaggle/input/hubmap-organ-segmentation/train_images/15329.tiff'
tiff = rasterio.open(image)
img = tiff.read()

boundry = '/kaggle/input/hubmap-organ-segmentation/train_annotations/15329.json'
with open(boundry) as json_file:
    data = json.load(json_file)

rasterio.plot.show(tiff, title='15329')
ig, ax = plt.subplots()
ax.imshow(img[2, :, :])
for cord in data[0]:
    plt.scatter(cord[0], cord[1], color='red', alpha=0.05)
plt.show()
print('look at a sample image and mark it with the annotation to find the area of interest marked in red')