Giter Club home page Giter Club logo

clipdrop-api-samples's Introduction

ClipDrop API Samples

A collection of open-source samples that demonstrate how to use the ClipDrop APIs on a broad range of applications and platforms.


iOS Samples

A minimal SwiftUI app that shows how to remove the background of any object using the camera.

remove-background-bulk



Android Samples

A minimal Kotlin app that shows how to remove the background of any object using the camera.

telegram-cloud-document-4-6044047144808090677



Web Samples

A sample React/Next.js/TailwindCSS app that decomposes images into separate layers.

⚡️ Live app: https://clipdrop-api-sample-decompose-layers.vercel.app

decompose-layers

A sample TensorflowJS/React/Next.js/TailwindCSS app that detects object bounding boxes using CocoSSD and uses ClipDrop API's inpainting to automatically remove the detected objects.

⚡️ Live app: https://remove-objects-tfjs.vercel.app

remove-objects-tfjs

A sample Next.js/TailwindCSS app that detects text using the Cloud Vision API and uses ClipDrop API's inpainting to automatically remove the detected texts.

⚡️ Live app: https://clipdrop-api-samples-text-remover.vercel.app

FTguR51UEAEEZGh

A sample React/Typescript app that allows processing images in bulk.

⚡️ Live app: https://remove-background-bulk.vercel.app

remove-background-bulk

Our tools

ClipDrop API is made with love by ClipDrop. Take a look at our other ClipDrop web apps:

Our Cleanup.pictures website

Or try one of our mobile apps:

clipdrop-api-samples's People

Contributors

benjaminaubin avatar cyrildiagne avatar jblanche avatar juliengenoud avatar sr-tune avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

clipdrop-api-samples's Issues

we can't put the key in the frontend code``

hey ` i have seen the demo on website.

but in React ` we can't put the key in the frontend code so i use the express to post the form data image to your api

and i get a image of binary from the api`` and how i can tranform this format to image in the React?

Issue with CLIPDROP API Image Download in Android App

Hi Team,
I am currently using the ClipDrop APIs in my Android application, and I am facing issues with processing the image bytes I receive in the response. I have tried various methods including decoding the bytes into a bitmap and downloading the image via InputStream, but none of them have been successful in generating a usable output image.

When attempting to decode the image bytes into a bitmap using the following code snippet:
val imageInputStream = it.value.body()?.byteStream()
val imageBytes = imageInputStream?.readBytes()
val bitmapImage = BitmapFactory.decodeByteArray(imageBytes, 0, imageBytes.size, null)
The bitmapImage is resulting in null.

Similarly, when I download the image using an InputStream and save it, the downloaded image is corrupted and not viewable on the device.
private fun saveImageAndPreviewOutput(inputStream: InputStream) {
try {
val directory = File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM), "photoLens")
if (!directory.exists()) {
directory.mkdirs()
}
val imageFile = File(directory, "${getUuid()}.png")
FileOutputStream(imageFile).use { output ->
inputStream.copyTo(output)
}
viewModel.outputImagePath = imageFile.toString()
val bundle = Bundle()
outputImageFragment.arguments = bundle
val transaction =
requireActivity().supportFragmentManager.beginTransaction()
.addToBackStack("OutputImageFragment")
.add(R.id.flCameraFragment, outputImageFragment)
transaction.commit()
} finally {
inputStream.close()
}
}

The downloaded image is not opening on the device, and it seems to be corrupted.

Could you please assist me in identifying and resolving the issue? I have attached a sample of the downloaded image for reference.

I have followed the example provided on the GitHub repository for the Android integration, but I am encountering the same issue there as well.

Thanks and regards,
Gourav
+91-9625508164
[email protected]

sketch-to-image return message (The request multipart form is malformed: One of the files in the multipart form is not expected)

hi

env:python 3.9

usage:

img:WX20230912-140459

import requests

r = requests.post('https://clipdrop-api.co/sketch-to-image/v1/sketch-to-image',
  files = {
    'image_file': ('owl-sketch.jpg', image_file_object, 'image/jpeg'),
    },
  data = { 'prompt': 'an owl on a branch, cinematic' },
  headers = { 'x-api-key': 'YOUR_API_KEY'}
)
if (r.ok):
  # r.content contains the bytes of the returned image
else:


  r.raise_for_status()

retrun error message :
The request multipart form is malformed: One of the files in the multipart form is not expected

Please help me find out why there is an error. I'm looking forward to your response

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.