Skip to content

Instantly share code, notes, and snippets.

View Alyssonmach's full-sized avatar
Que a felicidade vire rotina!

Alysson Machado Alyssonmach

Que a felicidade vire rotina!
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Alyssonmach
Alyssonmach / draw_visual_neural_networks.py
Last active October 28, 2021 15:33
'visualkeras' package to design Keras API Convolutional Neural Network architectures
#!pip install visualkeras
import visualkeras
import tensorflow as tf
conv_base = tf.keras.applications.VGG16(input_shape = (128, 128, 3), include_top = False, weights = 'imagenet')
layers_name = list()
for layer in conv_base.layers:
layers_name.append(layer.name)
@Alyssonmach
Alyssonmach / image_gen_braille.py
Last active October 12, 2021 14:41
Gerador de imagens em Braille
from PIL import Image
from matplotlib.pyplot as plt
import urllib.request as url
# baixando os códigos para geração das imagens em braille
path_1 = 'https://raw.githubusercontent.com/code-coffee-ufcg/braillingo-image-generator/main/caractere_generator.py'
path_2 = 'https://raw.githubusercontent.com/code-coffee-ufcg/braillingo-image-generator/main/image_generator.py'
url.urlretrieve(path_1, 'caractere_generator.py')
url.urlretrieve(path_2, 'image_generator.py')
@Alyssonmach
Alyssonmach / pet_segmentation_aux.py
Last active October 12, 2021 02:47
Funções Auxiliares para o modelo de segmentação de pets
import matplotlib.pyplot as plt
import numpy as np
import tensorflow as tf
class_names = ['animal', 'fundo', 'contorno']
def display_with_metrics(display_list, iou_list, dice_score_list):
'''displays a list of images/masks and overlays a list of IOU and Dice Scores'''
metrics_by_id = [(idx, iou, dice_score) for idx, (iou, dice_score) in enumerate(zip(iou_list, dice_score_list)) if iou > 0.0]
This file has been truncated, but you can view the full file.
{
"cells": [
{
"cell_type": "markdown",
"id": "ZbK0CUBCI4nI",
"metadata": {
"id": "ZbK0CUBCI4nI"
},
"source": [
"<img src=\"https://www.anped.org.br/sites/default/files/images/ufcg-lateral.png\" width=\"780\" height=\"240\" align=\"center\"/>"
from tensorflow.keras.utils import Sequence
import numpy as np
class MergedGeneratorsSerie(Sequence):
def __init__(self, *args):
self.args = args
def __len__(self):
return len(self.args[0])
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Alyssonmach
Alyssonmach / w3_assignment.ipynb
Created August 25, 2021 03:24
w3_assignment.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Alyssonmach
Alyssonmach / w3_lab3.ipynb
Created August 25, 2021 02:14
w3_lab3.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.