Skip to content

Instantly share code, notes, and snippets.

View csorgod's full-sized avatar
🏠
Working from home

Guilherme Csorgo Henriques csorgod

🏠
Working from home
View GitHub Profile
@csorgod
csorgod / cnn.py
Created September 24, 2023 22:13
Simple CNN for image classification
from tensorflow.keras.models import Sequential
from tensorflow.keras.callbacks import EarlyStopping
from tensorflow.keras.layers import Activation, Dropout, Flatten, Dense, Conv2D, MaxPooling2D
model = Sequential()
model.add(Conv2D(filters = 32, kernel_size = (3, 3), input_shape = image_shape, activation = 'relu'))
model.add(MaxPooling2D(pool_size = (2, 2)))
model.add(Conv2D(filters = 32, kernel_size = (3, 3), input_shape = image_shape, activation = 'relu'))
@csorgod
csorgod / cat_crop.py
Last active September 24, 2023 22:03
Realtime OpenCV cat detection and face persistance using a webcam
import os
import cv2
import random
cap = cv2.VideoCapture(0)
cat_cascade = cv2.CascadeClassifier('haarcascade_frontalcatface.xml')
cv2.namedWindow('img')
while True:
@csorgod
csorgod / baseClient.js
Created September 9, 2022 19:02
Baseclient with axios
import axios from 'axios';
import Raven from 'raven-js';
const getClient = (baseUrl = null) => {
const opt = {
baseURL: baseUrl,
crossdomain: true
};
opt.headers = {