This file contains hidden or 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
import requests | |
import json | |
# Given a government issued ID card from Malaysia, Singapore, etc., extract the user face and parse all fields. | |
# | |
# PixLab recommend that you connect your AWS S3 bucket via your dashboard at https://pixlab.io/dashboard | |
# so that any cropped face or MRZ crop is stored automatically on your S3 bucket rather than the PixLab one. | |
# This feature should give you full control over your analyzed media files. | |
# | |
# https://pixlab.io/cmd?id=docscan for additional information. |
This file contains hidden or 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
import requests | |
import json | |
# Target Image: Change to any link (Possibly adult) you want or switch to POST if you want to upload your image directly, refer to the sample set for more info. | |
img = 'https://i.redd.it/oetdn9wc13by.jpg' | |
# Your PixLab API key that you can obtain from https://pixlab.io/dashboard | |
key = 'PIXLAB_API_KEY' | |
# Censor an image according to its NSFW score | |
req = requests.get('https://api.pixlab.io/nsfw',params={'img':img,'key':key}) |
This file contains hidden or 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
<?php | |
/* | |
* Usage sample of the ID card scnner from PixLab. | |
*/ | |
/* | |
* PixLab PHP Client which is just a single class PHP file without any dependency that you can get from Github | |
* https://github.com/symisc/pixlab-php | |
*/ | |
require_once "pixlab.php"; | |
# Given a government issued ID card from Malaysia, Singapore, etc., extract the user face and parse all fields. |
This file contains hidden or 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
import requests | |
import json | |
# Given a government issued ID card from India (Aadhaar), Malaysia, Singapore, etc., extract the user face and parse all fields. | |
# | |
# PixLab recommend that you connect your AWS S3 bucket via your dashboard at https://pixlab.io/dashboard | |
# so that any cropped face or MRZ crop is stored automatically on your S3 bucket rather than the PixLab one. | |
# This feature should give you full control over your analyzed media files. | |
# | |
# https://pixlab.io/cmd?id=docscan for additional information. |
This file contains hidden or 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
<?php | |
/* | |
* Usage sample of the ID card scanner API endpoint from PixLab - https://pixlab.io/cmd?id=docscan. | |
*/ | |
/* | |
* PixLab PHP Client which is just a single class PHP file without any dependency that you can get from Github | |
* https://github.com/symisc/pixlab-php | |
*/ | |
require_once "pixlab.php"; | |
# Given a government issued ID card from India, Malaysia, Singapore, etc., extract the user face and parse all fields. |
This file contains hidden or 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
import requests | |
import json | |
# Given a government issued ID card from India (Aadhaar), Malaysia, Singapore, etc., extract the user face and parse all fields. | |
# | |
# PixLab recommend that you connect your AWS S3 bucket via your dashboard at https://pixlab.io/dashboard | |
# so that any cropped face or MRZ crop is stored automatically on your S3 bucket rather than the PixLab one. | |
# This feature should give you full control over your analyzed media files. | |
# | |
# https://pixlab.io/cmd?id=docscan for additional information. |
This file contains hidden or 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
import requests | |
import json | |
imgUrl = 'https://pixlab.io/images/m3.jpg' # Target picture we want to blur any face on | |
# Detect all human faces in a given image via /facedetect first and blur all of them later via /mogrify. | |
# https://pixlab.io/cmd?id=facedetect & https://pixlab.io/cmd?id=mogrify for additional information. | |
req = requests.get('https://api.pixlab.io/facedetect',params={ | |
'img': imgUrl, |
This file contains hidden or 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
<?php | |
/* | |
* PixLab PHP Client which is just a single class PHP file without any dependency that you can get from Github | |
* https://github.com/symisc/pixlab-php | |
*/ | |
require_once "pixlab.php"; | |
# Detect all human faces in a given image via `facedetect` and blur all of them via `mogrify`. | |
# https://pixlab.io/cmd?id=facedetect & https://pixlab.io/cmd?id=mogrify for additional information. |
This file contains hidden or 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
/* | |
* Compile this file together with the ASCII Art source code (https://pixlab.io/art - https://github.com/symisc/ascii_art) | |
* to generate the executable. For example: | |
* | |
* gcc -W -Wall -O6 ascii_art.c sample.c -o ascii -D ART_ENABLE_STB_IMAGE | |
* ./ascii test.png | |
* | |
* ART_ENABLE_STB_IMAGE directive must be defined in order to load images from disk. | |
* Otherwise you have to rely on an external library such as OpenCV to load the target images. | |
* |
This file contains hidden or 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
import requests | |
import json | |
# Generates a set of random pixels of desired Width & Height. This endpoint is similar to /newimage except that the image contents is filled with random pixels. This is very useful for generating background (negative) samples for feeding Machine Learning training algorithms | |
req = requests.get('https://api.pixlab.io/pixelgenerate',params={ | |
'key':'PIXLAB_API_KEY', # https://pixlab.io/dashboard to get your API Key | |
"width":300, | |
"height":300 | |
}) | |
reply = req.json() |