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
{'predictions': [{'x_max': 712, 'y_max': 261, 'x_min': 626, 'confidence': 0.99990666, 'y_min': 145}, {'x_max': 620, 'y_max': 288, 'x_min': 543, 'confidence': 0.99986553, 'y_min': 174}, {'x_max': 810, 'y_max': 242, 'x_min': 731, 'confidence': 0.99986434, 'y_min': 163}, {'x_max': 542, 'y_max': 279, 'x_min': 477, 'confidence': 0.99899536, 'y_min': 197}], 'success': True} |
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
using System; | |
using System.IO; | |
using System.Net.Http; | |
using System.Threading.Tasks; | |
using Newtonsoft.Json; | |
using SixLabors.ImageSharp; | |
using SixLabors.ImageSharp.Processing; | |
using SixLabors.Primitives; | |
namespace appone |
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
using System; | |
using System.IO; | |
using System.Net.Http; | |
using System.Threading.Tasks; | |
using Newtonsoft.Json; | |
namespace appone | |
{ |
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
const request = require("request") | |
const fs = require("fs") | |
const easyimage = require("easyimage") | |
image_stream = fs.createReadStream("family.jpg") | |
var form = {"image":image_stream} | |
request.post({url:"http://localhost:80/v1/vision/face", formData:form},function(err,res,body){ |
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
const request = require("request") | |
const fs = require("fs") | |
image_stream = fs.createReadStream("family.jpg") | |
var form = {"image":image_stream} | |
request.post({url:"http://localhost:80/v1/vision/face", formData:form},function(err,res,body){ | |
response = JSON.parse(body) |
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 | |
from PIL import Image | |
image_data = open("family.jpg","rb").read() | |
image = Image.open("family.jpg").convert("RGB") | |
response = requests.post("http://localhost:80/v1/vision/face",files={"image":image_data}).json() | |
i = 0 | |
for face in response["predictions"]: |
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 | |
image_data = open("family.jpg","rb").read() | |
response = requests.post("http://localhost:80/v1/vision/face",files={"image":image_data}).json() | |
print(response) |
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 cv2 | |
import numpy as np | |
import requests | |
cap = cv2.VideoCapture('furious.mp4') | |
out = cv2.VideoWriter("scene_recognition_from_video_to_file.avi", cv2.VideoWriter_fourcc('M', 'J', 'P', 'G'), | |
24,((int(cap.get(3)), int(cap.get(4))))) | |
progress_tracker = 0 |
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 cv2 | |
import numpy as np | |
import requests | |
cap = cv2.VideoCapture('furious.mp4') | |
progress_tracker = 0 | |
response_label = "" | |
skip_frame = 20 |
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 cv2 | |
import numpy as np | |
import requests | |
cap = cv2.VideoCapture(0) | |
out = cv2.VideoWriter("scene_recognition_from_camera_to_file.avi", cv2.VideoWriter_fourcc('M', 'J', 'P', 'G'), | |
24,((int(cap.get(3)), int(cap.get(4))))) | |
progress_tracker = 0 |