This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# set the arch [IM] | |
sudo dpkg --add-architecture i386 | |
# add the repos [IM] | |
sudo add-apt-repository -y ppa:wine/wine-builds | |
sudo add-apt-repository -y ppa:ethanak/milena | |
# update the deps [IM] | |
sudo apt-get update | |
sudo apt-get -y upgrade |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* @Author: Ícaro Lima Magalhães | |
*/ | |
#include <iostream> | |
#include <algorithm> | |
#include <vector> | |
#include <fstream> | |
#include <random> | |
#include <chrono> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @Author: Icaro Lima Magalhaes - 2016 | |
*/ | |
#include <algorithm> | |
#include <iostream> | |
#include <sstream> | |
#include <fstream> | |
#include <utility> | |
#include <vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PIL import Image | |
import numpy as np | |
from os import listdir | |
def crop(png_image_name): | |
pil_image = Image.open(png_image_name) | |
np_array = np.array(pil_image) | |
blank_element = [255, 255, 255, 0] | |
mask = np_array != blank_element |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PIL import Image | |
import numpy as np | |
from os import listdir | |
def crop(png_image_name): | |
pil_image = Image.open(png_image_name) | |
np_array = np.array(pil_image) | |
blank_element = [255, 255, 255, 0] | |
mask = np_array != blank_element |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pprint import pprint | |
from PIL import Image | |
import numpy as np | |
import cv2 | |
import os | |
import io | |
DATASET_PATH = '/home/icaro/Workspace/classifier/generator-data/perfume/' | |
INPUT_DIR = '/home/icaro/Workspace/classifier/generator-data/test-inputs/' | |
INPUT_FILE = INPUT_DIR + './box10.jpg' |