# -*- coding: utf-8 -*-
"""Graph Neural Network.ipynb

Automatically generated by Colaboratory.

Original file is located at
    https://colab.research.google.com/drive/1T5NfJUpIHtSTjTPsJJPiUyogy00NQ7I7
"""

import os
import pandas as pd
import numpy as np
import networkx as nx
import matplotlib.pyplot as plt
import tensorflow as tf
from tensorflow import keras
from tensorflow.keras import layers

from zipfile import ZipFile
file_name = "data.zip"
with ZipFile(file_name,'r') as zip:
 zip.extractall()
print('Done')

data_dir = len(os.listdir('/content/dangerous_images'))
print(data_dir)

import cv2
import numpy as np
import matplotlib.pyplot as plt
plt.style.use('seaborn')

loaded_image = cv2.imread("/content/dangerous_images/Selfie42918.jpg")
loaded_image = cv2.cvtColor(loaded_image,cv2.COLOR_BGR2RGB)

gray_image = cv2.cvtColor(loaded_image,cv2.COLOR_BGR2GRAY)

edged_image = cv2.Canny(gray_image, threshold1=30, threshold2=100)

plt.figure(figsize=(20,20))
plt.subplot(1,3,1)
plt.imshow(loaded_image,cmap="gray")
plt.title("Original Image")
plt.axis("off")
plt.subplot(1,3,2)
plt.imshow(gray_image,cmap="gray")
plt.axis("off")
plt.title("GrayScale Image")
plt.subplot(1,3,3)
plt.imshow(edged_image,cmap="gray")
plt.axis("off")
plt.title("Canny Edge Detected Image")
plt.show()
d2f51567bf51327273f06e86d1b8dcc531bc22ea
<mask token>

<mask token>
with ZipFile(file_name, 'r') as zip:
    zip.extractall()
print('Done')
<mask token>
print(data_dir)
<mask token>
plt.style.use('seaborn')
<mask token>
plt.figure(figsize=(20, 20))
plt.subplot(1, 3, 1)
plt.imshow(loaded_image, cmap='gray')
plt.title('Original Image')
plt.axis('off')
plt.subplot(1, 3, 2)
plt.imshow(gray_image, cmap='gray')
plt.axis('off')
plt.title('GrayScale Image')
plt.subplot(1, 3, 3)
plt.imshow(edged_image, cmap='gray')
plt.axis('off')
plt.title('Canny Edge Detected Image')
plt.show()

<mask token>
file_name = 'data.zip'
with ZipFile(file_name, 'r') as zip:
    zip.extractall()
print('Done')
data_dir = len(os.listdir('/content/dangerous_images'))
print(data_dir)
<mask token>
plt.style.use('seaborn')
loaded_image = cv2.imread('/content/dangerous_images/Selfie42918.jpg')
loaded_image = cv2.cvtColor(loaded_image, cv2.COLOR_BGR2RGB)
gray_image = cv2.cvtColor(loaded_image, cv2.COLOR_BGR2GRAY)
edged_image = cv2.Canny(gray_image, threshold1=30, threshold2=100)
plt.figure(figsize=(20, 20))
plt.subplot(1, 3, 1)
plt.imshow(loaded_image, cmap='gray')
plt.title('Original Image')
plt.axis('off')
plt.subplot(1, 3, 2)
plt.imshow(gray_image, cmap='gray')
plt.axis('off')
plt.title('GrayScale Image')
plt.subplot(1, 3, 3)
plt.imshow(edged_image, cmap='gray')
plt.axis('off')
plt.title('Canny Edge Detected Image')
plt.show()

<mask token>
import os
import pandas as pd
import numpy as np
import networkx as nx
import matplotlib.pyplot as plt
import tensorflow as tf
from tensorflow import keras
from tensorflow.keras import layers
from zipfile import ZipFile
file_name = 'data.zip'
with ZipFile(file_name, 'r') as zip:
    zip.extractall()
print('Done')
data_dir = len(os.listdir('/content/dangerous_images'))
print(data_dir)
import cv2
import numpy as np
import matplotlib.pyplot as plt
plt.style.use('seaborn')
loaded_image = cv2.imread('/content/dangerous_images/Selfie42918.jpg')
loaded_image = cv2.cvtColor(loaded_image, cv2.COLOR_BGR2RGB)
gray_image = cv2.cvtColor(loaded_image, cv2.COLOR_BGR2GRAY)
edged_image = cv2.Canny(gray_image, threshold1=30, threshold2=100)
plt.figure(figsize=(20, 20))
plt.subplot(1, 3, 1)
plt.imshow(loaded_image, cmap='gray')
plt.title('Original Image')
plt.axis('off')
plt.subplot(1, 3, 2)
plt.imshow(gray_image, cmap='gray')
plt.axis('off')
plt.title('GrayScale Image')
plt.subplot(1, 3, 3)
plt.imshow(edged_image, cmap='gray')
plt.axis('off')
plt.title('Canny Edge Detected Image')
plt.show()

# -*- coding: utf-8 -*-
"""Graph Neural Network.ipynb

Automatically generated by Colaboratory.

Original file is located at
    https://colab.research.google.com/drive/1T5NfJUpIHtSTjTPsJJPiUyogy00NQ7I7
"""

import os
import pandas as pd
import numpy as np
import networkx as nx
import matplotlib.pyplot as plt
import tensorflow as tf
from tensorflow import keras
from tensorflow.keras import layers

from zipfile import ZipFile
file_name = "data.zip"
with ZipFile(file_name,'r') as zip:
 zip.extractall()
print('Done')

data_dir = len(os.listdir('/content/dangerous_images'))
print(data_dir)

import cv2
import numpy as np
import matplotlib.pyplot as plt
plt.style.use('seaborn')

loaded_image = cv2.imread("/content/dangerous_images/Selfie42918.jpg")
loaded_image = cv2.cvtColor(loaded_image,cv2.COLOR_BGR2RGB)

gray_image = cv2.cvtColor(loaded_image,cv2.COLOR_BGR2GRAY)

edged_image = cv2.Canny(gray_image, threshold1=30, threshold2=100)

plt.figure(figsize=(20,20))
plt.subplot(1,3,1)
plt.imshow(loaded_image,cmap="gray")
plt.title("Original Image")
plt.axis("off")
plt.subplot(1,3,2)
plt.imshow(gray_image,cmap="gray")
plt.axis("off")
plt.title("GrayScale Image")
plt.subplot(1,3,3)
plt.imshow(edged_image,cmap="gray")
plt.axis("off")
plt.title("Canny Edge Detected Image")
plt.show()