mirror of
https://github.com/jantic/DeOldify.git
synced 2026-08-28 17:45:27 +08:00
fix old doc + add local file curl documentation
This commit is contained in:
@@ -359,14 +359,24 @@ Running Docker
|
||||
echo "http://$(curl ifconfig.io):5000" && nvidia-docker run --ipc=host -p 5000:5000 -d deoldify_api
|
||||
```
|
||||
|
||||
Calling the API for image processing
|
||||
Calling the API for image processing for a remote image
|
||||
```console
|
||||
curl -X POST "http://MY_SUPER_API_IP:5000/process" -H "accept: image/png" -H "Content-Type: application/json" -d "{\"source_url\":\"http://www.afrikanheritage.com/wp-content/uploads/2015/08/slave-family-P.jpeg\", \"render_factor\":35}" --output colorized_image.png
|
||||
curl -X POST "http://MY_SUPER_API_IP:5000/process" -H "accept: image/png" -H "Content-Type: application/json" -d "{\"url\":\"http://www.afrikanheritage.com/wp-content/uploads/2015/08/slave-family-P.jpeg\", \"render_factor\":35}" --output colorized_image.png
|
||||
```
|
||||
|
||||
Calling the API for video processing
|
||||
Calling the API for image processing for a binary image
|
||||
```console
|
||||
curl -X POST "http://MY_SUPER_API_IP:5000/process" -H "accept: application/octet-stream" -H "Content-Type: application/json" -d "{\"source_url\":\"https://v.redd.it/d1ku57kvuf421/HLSPlaylist.m3u8\", \"render_factor\":35}" --output colorized_video.mp4
|
||||
curl -X POST "http://MY_SUPER_API_IP:5000/process" -H "accept: image/png" -H "Content-Type: image/jpeg" -F "file=@slave-family-P.jpeg" -F "render_factor=35" --output colorized_image.png
|
||||
```
|
||||
|
||||
Calling the API for video processing for a remote video
|
||||
```console
|
||||
curl -X POST "http://MY_SUPER_API_IP:5000/process" -H "accept: application/octet-stream" -H "Content-Type: application/json" -d "{\"url\":\"https://v.redd.it/d1ku57kvuf421/HLSPlaylist.m3u8\", \"render_factor\":35}" --output colorized_video.mp4
|
||||
```
|
||||
|
||||
Calling the API for viedo processing for a local video
|
||||
```console
|
||||
curl -X POST "http://MY_SUPER_API_IP:5000/process" -H "accept: image/png" -H "Content-Type: video/mpeg" -F "file=@chaplin.mp4" -F "render_factor=35" --output colorized_video.mp4
|
||||
```
|
||||
> **Note:** If you don't have Nvidia Docker, [here](https://github.com/nvidia/nvidia-docker/wiki/Installation-(version-2.0)#installing-version-20) is the installation guide.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user