cog-resnet example trial
Image to classify
Run this model in Node.js with one line of code:
npm install replicate
REPLICATE_API_TOKEN
export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run peter65374/cog-resnet using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "peter65374/cog-resnet:2658d3a89732259f3805a0a80a7f0dbc2c55164a08e57277cbfae86c1165fab6", { input: { image: "https://replicate.delivery/pbxt/Ji6W05uKm3Lw6HDJ3kbE8gNl917Nuz4SI9A0mBCuBIdjfh5Q/%E9%B8%A1%E8%84%96.png" } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
import replicate
output = replicate.run( "peter65374/cog-resnet:2658d3a89732259f3805a0a80a7f0dbc2c55164a08e57277cbfae86c1165fab6", input={ "image": "https://replicate.delivery/pbxt/Ji6W05uKm3Lw6HDJ3kbE8gNl917Nuz4SI9A0mBCuBIdjfh5Q/%E9%B8%A1%E8%84%96.png" } ) print(output)
To learn more, take a look at the guide on getting started with Python.
curl -s -X POST \ -H "Authorization: Bearer $REPLICATE_API_TOKEN" \ -H "Content-Type: application/json" \ -H "Prefer: wait" \ -d $'{ "version": "peter65374/cog-resnet:2658d3a89732259f3805a0a80a7f0dbc2c55164a08e57277cbfae86c1165fab6", "input": { "image": "https://replicate.delivery/pbxt/Ji6W05uKm3Lw6HDJ3kbE8gNl917Nuz4SI9A0mBCuBIdjfh5Q/%E9%B8%A1%E8%84%96.png" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{ "completed_at": "2023-10-16T16:15:02.058097Z", "created_at": "2023-10-16T16:14:46.260922Z", "data_removed": false, "error": null, "id": "r25473rbdmfollnmlg7ususyoa", "input": { "image": "https://replicate.delivery/pbxt/Ji6W05uKm3Lw6HDJ3kbE8gNl917Nuz4SI9A0mBCuBIdjfh5Q/%E9%B8%A1%E8%84%96.png" }, "logs": "1/1 [==============================] - ETA: 0s\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\n1/1 [==============================] - 13s 13s/step\nDownloading data from https://storage.googleapis.com/download.tensorflow.org/data/imagenet_class_index.json\n 8192/35363 [=====>........................] - ETA: 0s\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\n35363/35363 [==============================] - 0s 0us/step", "metrics": { "predict_time": 14.65494, "total_time": 15.797175 }, "output": [ [ "n07745940", "strawberry", 0.18707609176635742 ], [ "n07579787", "plate", 0.14594434201717377 ], [ "n07720875", "bell_pepper", 0.1095614954829216 ] ], "started_at": "2023-10-16T16:14:47.403157Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/r25473rbdmfollnmlg7ususyoa", "cancel": "https://api.replicate.com/v1/predictions/r25473rbdmfollnmlg7ususyoa/cancel" }, "version": "2658d3a89732259f3805a0a80a7f0dbc2c55164a08e57277cbfae86c1165fab6" }
1/1 [==============================] - ETA: 1/1 [==============================] - 13s 13s/step Downloading data from https://storage.googleapis.com/download.tensorflow.org/data/imagenet_class_index.json 8192/35363 [=====>........................] - ETA: 35363/35363 [==============================] - 0s 0us/step
This model runs on Nvidia T4 GPU hardware. We don't yet have enough runs of this model to provide performance information.
Cog wrapper trial project.
sdxl-1.0 finetuned with 'Bundaberg' bottle beverage images
finetuned sdxl 1.0 with food named 'gongbao chicken' images
SAM(Segment Anything) ViT-H image encoder
Openbuddy finetuned mistral-7b in GPTQ quantization in 4bits by TheBloke
This is a cog implementation of "openbuddy-llemma-34b" 4-bit quantization model.
human-like cat sdxl-lora model
This model is cold. You'll get a fast response if the model is warm and already running, and a slower response if the model is cold and starting up.
This model costs approximately $0.016 to run on Replicate, but this varies depending on your inputs. View more.
Choose a file from your machine
Hint: you can also drag files onto the input