Closed AlexUrrutia closed 9 months ago
Hi, the docker image I pushed is pretty old and based on v2. also looks like you are running docker image for classification instead of detection.
I will push a new docker image and update it here.
https://github.com/notAI-tech/NudeNet#docker @AlexUrrutia
https://github.com/notAI-tech/NudeNet#docker @AlexUrrutia
Thanks, I'll test it now
Now I get this:
{
"success": false,
"reason": "Received json input. Expected multi-part file input."
}
curl -F f1=@"images.jpeg" "http://localhost:8080/infer" this is the curl.
what curl are you sending ?
Hello, I was using the php script posted here some time ago...
<?php
header("Content-Type: application/json");
$url = "http://localhost:8080/infer";
$image1 = base64_encode(file_get_contents('https://domain.com/16955673673220129769.jpg'));
$data = array('data' => array('image'=>$image1));
$payload = json_encode($data);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result1 = curl_exec($ch);
print_r($result1);
?>
ok I fixed the code and now it works, thanks!
<?php
$url = "http://localhost:8080/infer";
$imageFilePath = 'path/to/image/image.jpg';
$imageFileHandle = fopen($imageFilePath, 'r');
if ($imageFileHandle === false) {
die('Unable to open the image file.');
}
$ch = curl_init($url);
$postData = [
'image' => curl_file_create($imageFilePath, 'image/jpeg', 'image.jpg'),
];
curl_setopt($ch, CURLOPT_POSTFIELDS, $postData);
$result = curl_exec($ch);
if (curl_errno($ch)) {
echo 'cURL Error: ' . curl_error($ch);
} else {
echo $result;
}
curl_close($ch);
fclose($imageFileHandle);
?>
Hi, I am running it on docker and results I get are:
How can I access data for all the properties Like this: