Giter Club home page Giter Club logo

modify-anything's Introduction

English | 简体中文

Modify-Anything: Segment Anything Meets Video and Image Modify and Picture Video Background Replacement

Modify-Anything is based on YOLO5,YOLO8, for video and image detection. Segment-anything,lama_cleaner is applied to segment, modify, erase, and obtain the target image. The background of the target image video can be changed, and the background of the image video can be changed.

Installation

The code requires python>=3.8, as well as pytorch>=1.7 and torchvision>=0.8. Please follow the instructions here to install both PyTorch and TorchVision dependencies. Installing both PyTorch and TorchVision with CUDA support is strongly recommended. To install the Modify-Anything, please follow these steps:

  • The first time it runs, it will download the model itself. If the download is too slow, the phone will download and place it as follows
  • Train your own YOLO5 or YOLOv8 models to detect segmentation, modification, and erasure. The default models used in this project are "YOLOv5l. pt", "YOLOv5l6. pt", "YOLOv8l. pt", and "YOLOv8x. pt". Please download and place them in the project root directory
  • Download the Segment anything model and place it in the project root directory sam_vit_h_4b8939.pth (change to) vit_h.pth,sam_vit_l_0b3195.pth (change to) vit_l.pth,sam_vit_b_01ec64.pth (change to) vit_b.pth
  • Install pip install ultralytics sahi fal_serverless lama_cleaner tqdm or pip install - r requirements. Txt
  • Run python app.py
  • The generated results are all in the output directory

image

Modify Anything Image and Picture Video Background Replacement

Modify Anything Video and Picture Video Background Replacement

Acknowledgments

Citation

If you find this work useful for your research, please cite us:

@article{
  title={Modify-Anything: Segment Anything Meets Video and Image Modify and Picture Video Background Replacement},
  author={Zhang Jing},
  year={2023}
}

modify-anything's People

Contributors

jxaizj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

dsx-ai

modify-anything's Issues

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.