Welcome to the Deep Live Cam Flutter package documentation. This package allows you to easily integrate real-time image processing, image to image processing, video to image and image to video processing or transformations into your Flutter apps. This guide will walk you through how to get started, use the package, and explore the available features.
Deep Live Cam is a Flutter package designed for deep learning-based image and video processing. Whether you're building an app for real-time image processing, video processing, or transforming images, this package provides all the tools you need.
- Real-Time Image Processing
- Image-to-Image Processing
- Video-to-Image Processing
Before you start using the package, ensure you have a Flutter environment set up. You can find instructions on how to set up Flutter on the official Flutter website.
-
Add Dependency
Adddeep_live_cam
as a dependency in yourpubspec.yaml
file:dependencies: deep_live_cam: ^1.0.0
-
Install the Package
Run the following command in your project directory:flutter pub get
-
Import the Package
Import the package in your Dart files:
import 'package:deep_live_cam/deep_live_cam.dart';
Now that you've installed the package, let’s walk through how to use it in your Flutter application.
Before you can start using the Deep Live Cam Flutter package, you'll need to follow these steps:
-
Create an Application on flutterdeeplivecam.com
Go to the flutterdeeplivecam.com website. Sign up or log in to your account. Navigate to the Dashboard. Create a new application by providing a name and description for your app. Once your app is created, you'll be provided with an API Key.
This API key will be used to authenticate your requests and access the image and video processing services.
- Add the API Key to Your Flutter Application
Once you have your API key, you need to add it to your Flutter project. Here’s how:
Open your pubspec.yaml file and add the API key under the Deep Live Cam configuration section:
dependencies: deep_live_cam: ^1.0.0
flutter: deep_live_cam: api_key: "YOUR_API_KEY"
Replace "YOUR_API_KEY" with the API key you generated on the flutterdeeplivecam.com website.
Run the following command to install the dependencies:
flutter pub get
- Start Using Deep Live Cam in Your Application
Now that you have the API key set up, you can begin using Deep Live Cam in your app.
import 'package:flutter/material.dart';
import 'package:deep_live_cam/deep_live_cam.dart';
//TODO
Apply transformations to captured images, using deep learning models.
//TODO
Extract frames from a video and apply image processing on each frame.
//TODO
The DeepLiveCam
class is the main entry point for using the package. It provides methods for starting and stopping camera feed, processing images, and handling real-time events.
-
startProcessing()
Starts the camera feed and begins real-time image processing. -
stopProcessing()
Stops the camera feed and halts the real-time processing. -
processImage(Image image)
Applies an image-to-image transformation to a captured image. -
extractFramesFromVideo(File videoFile)
Extracts frames from a video file. -
processImagesToVideo(List<File> imageFiles)
Converts a series of images into a video.// TODO
-
onFrameProcessed
Triggered when a frame from the camera feed has been processed. This callback can be used to update the UI or apply transformations. -
onFaceDetected
Triggered when faces are detected in the camera feed.
//TODO
Here is a complete example that demonstrates how to use Deep Live Cam for real-time image processing and face detection:
import 'package:flutter/material.dart';
import 'package:deep_live_cam/deep_live_cam.dart';
//TODO
---
## FAQ
//TODO
---
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
---