Posts by @Jasper_Holton (359)


Mi nombre es Jasper Camber Holton. escribe, programa, crea música y es el desarrollador de Uglek.com.

Has 359 posts, follows 17 users and is followed by 12 users.

Visto por última vez en September 28, 2022 08:50



@Jasper_Holton's Foto de perfil

A GFPGAN face, using denoising as well. This was taken from a web shell using a MediaRecorder and MediaCapture in JavaScript.

Ver la foto de una publicación de @Jasper_Holton

@Jasper_Holton, likes this,

@Jasper_Holton's Foto de perfil

GFPGAN Face Restoration for Beautiful Faces with Python This is how I make my face photos look even nicer from the web shell and photobooth webapp. Try it out, you won't be disappointed! To run the command,


#shell/execute.py
from subprocess import Popen, STDOUT, PIPE

banned_commands = ['rm']

def run_command(command):
    cmd = command.split(' ')
    if cmd[0] in banned_commands:
        return 'command not accepted.\n'
    proc = Popen(cmd, stdout=PIPE, stderr=STDOUT, cwd='/home/team/clemn')
    proc.wait()
    return proc.stdout.read().decode("unicode_escape")
To enhance the image,

#enhance/gfpgan.py
from shell.execute import run_command
import shutil
import os

base_dir = '/home/team/theapp/temp/gfpgan/'
op_dir = '/home/team/theapp/temp/gfpgan-output/'

def gfpgan_enhance(image_path):
    filename = image_path.split('/')[-1]
    path = os.path.join(base_dir, filename)
    shutil.copy(image_path, path)
    print(run_command('venv/bin/python GFPGAN/inference_gfpgan.py -i {} -o {} -v 1.3 -s 2'.format(base_dir, op_dir)))
    dest_path = os.path.join(op_dir, filename)
    shutil.copy(dest_path, image_path)
    os.remove(path)
    os.remove(dest_path)
Download and install information for GFPGAN is found here: github.com/TencentARC/GFPGAN Enjoy!


@Jasper_Holton's Foto de perfil

I am making the best of my coding skills and dedication to beauty with my nuclear security solution for adults. I'll post more about the apps on there and the function of the webapp soon. Message me for a link, don't be shy!

Ver la foto de una publicación de @Jasper_Holton

@Jasper_Holton, likes this,

@Jasper_Holton's Foto de perfil

How to isolate a license plate or document from an image using Python I use this code to create really perfect ID scans which contain just the ID from an image. The code looks for the largest square in the image using computer vision. This is useful for OCR, forensics, verification, or any situation where documents are processed. The code can be modified to isolate anything from an image with contours, like a street sign, cell phone, building or anything else.


# isolate the id from the image scan
import cv2

def write_isolated(image_path, output_path):
    image = cv2.imread(image_path)
    gray_image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
    thresh_img = cv2.threshold(gray_image, 0, 255, cv2.THRESH_BINARY + cv2.THRESH_OTSU)[1]
    cnts = cv2.findContours(thresh_img, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
    cnts = cnts[0] if len(cnts) == 2 else cnts[1]
    cnts = sorted(cnts, key=cv2.contourArea, reverse=True)[:5]
    for c in cnts:
        perimeter = cv2.arcLength(c, True)
        approx = cv2.approxPolyDP(c, 0.018 * perimeter, True)
        if len(approx) >= 4:
            x,y,w,h = cv2.boundingRect(c)
            new_img = image[y:y+h,x:x+w]
            cv2.imwrite(output_path, new_img)
            return output_path
    return None


@Jasper_Holton's Foto de perfil

This is me. I wear makeup and write code. Thanks for visiting my website! Good to see your face here.

Ver la foto de una publicación de @Jasper_Holton

@Jasper_Holton's Foto de perfil

This is me. I wear makeup and write code. Thanks for visiting my website! Good to see your face here.

Ver la foto de una publicación de @Jasper_Holton

@Wen, likes this,

@Jasper_Holton's Foto de perfil

Visit this link on Uglek - uglek.com/members/ - to become a member and enjoy all sorts of exclusive member benefits including ways to make money on your profile. Uglek is free to use, but it's better with a membership. You won't see ads, you'll get a larger cut from subscriptions and funding, and you'll get to see exclusive posts at /members/. Please consider a membership to help keep the site alive.