Comments (8)
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.
from nudenet.
https://github.com/notAI-tech/NudeNet#docker @AlexUrrutia
from nudenet.
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);
?>
from nudenet.
Thanks, I'll test it now
from nudenet.
Now I get this:
{
"success": false,
"reason": "Received json input. Expected multi-part file input."
}
from nudenet.
curl -F f1=@"images.jpeg" "http://localhost:8080/infer"
this is the curl.
from nudenet.
what curl are you sending ?
from nudenet.
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);
?>
from nudenet.
Related Issues (20)
- How to draw boxes? HOT 4
- UserWarning: Specified provider 'CUDAExecutionProvider' is not in available provider names.Available providers: 'AzureExecutionProvider, CPUExecutionProvider' HOT 1
- pretrained model best.onnx HOT 1
- in_browser "Can't create a session" HOT 1
- Accuracy Issues with Certain Classes in NudeClassifier HOT 1
- Onnx Post-Processing, NMS, TensoRT HOT 4
- Possible with tf-light? HOT 3
- I made a censor extension for stable diffusion web ui using nudenet HOT 3
- Dataset question
- Helllo~how to train detectot by ourself?Is it use the model yolov8???
- Unable to detect NFS image
- Dataset availability
- ONNX Model wont load HOT 2
- not lunching after install HOT 6
- Not Predicting unsafe on some nsfw images HOT 1
- Censor type
- why is web version much better than python library? HOT 1
- how to cover parts after detected ?
- New detector only inputs path, can't use with cv images. HOT 3
- Centering censorship area around specific points
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nudenet.