AI

My interest should have been greater, after all, that was exactly why I had chosen my combination of subjects (biology, psychology, mathematics/computer science). But the findings from psychology (mental disorders) and computer science (black box) left me pondering.

“I sickened as I read. ‘Hateful day when I received life!’ I exclaimed in agony. ‘Cursed creator! Why did you form a monster so hideous that even you turned from me in disgust? God in pity made man beautiful and alluring, after his own image; but my form is a filthy type of your’s, more horrid from its very resemblance.” M. Shelley


Segmentation

Based on The Oxford-IIIT Pet Dataset.
O. M. Parkhi, A. Vedaldi, A. Zisserman, C. V. Jawahar (2012) Cats and Dogs. IEEE Conference on Computer Vision and Pattern Recognition 2012.

Model 1 (H5)
Model 2 (H5)
Model 3 (H5)
flip
flip, crop
flip, brightness, saturation
~ 120 cpu hours
~ 340 cpu hours
~ 140 cpu hours
val_loss:0.33 val_accuracy:0.88
val_loss:0.38 val_accuracy:0.89
val_loss:0.31 val_accuracy:0.89

See for more information: Image segmentation | TensorFlow Core

#!python
import tensorflow as tf
import numpy as np
from PIL import Image
import os

model = tf.keras.models.load_model ("model.h5")

IMG_DIR = "Img"
IMG_SIZE = 128

def get_image(filename):
   img_data = Image.open(filename)
   img_data.thumbnail((IMG_SIZE, IMG_SIZE))
   img_data = np.array(img_data.convert("RGB"))
   img_data = tf.cast(img_data, tf.float32) / 255.0
   return img_data

i = 0
with os.scandir(IMG_DIR) as it:
   images = np.empty((len(list(it)), IMG_SIZE, IMG_SIZE, 3), dtype="float32")
with os.scandir(IMG_DIR) as it:
   for entry in it:
     if entry.name.endswith(".png") and entry.is_file():
       images[i,] = get_image(entry.path)
       i += 1

predictions = model.predict(images)

pred_mask = tf.math.argmax(predictions, axis=-1)
predictions = pred_mask[..., tf.newaxis]

i = 0
with os.scandir(IMG_DIR) as it:
   for entry in it:
     if entry.name.endswith(".png") and entry.is_file():
       img_data = tf.keras.utils.array_to_img(predictions[i,])
       img_data.save("Seg/"+entry.name, "PNG")
       i += 1


AI research groups

Google AI
DeepMind

Facebook (Meta AI)
PyTorch

Musk and Microsoft (OpenAI)

EleutherAI

Stable Diffusion (Stability AI)

Midjourney