Skip to content

darkenergy814/PPP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PPP

Privacy preserving PropTech.

Poster

initial

Test Code

There are two versions. One is with yolov5 and LaMa Inpainting, and the other is with mask_RCNN with LaMa Inpainting. You could try it on Colab.
Open In Colab

How to use

Yolov5+LaMa Inpainting Version

  1. Use code block named "settings for ppp" for setting.

    • Git clone PPP
    • Install packages for yolov5 and LaMa Inpainting
    • Install an LaMa model file
    PPP
    │ lama   
    │  └── big-lama   
    │      ├── config.yaml # model configs  
    │      └── models           
    │          └── best.ckpt # model weights     
    
    • Make an directory for LaMa Inpainting prediction
    PPP
    │ lama
    │  └── data_for_prediction
    │      ├── sample1.png # example
    │      └── sample1_mask.png # example
    
  2. Use code block named "Change file path and start object detection and Inpainting" for object detection, mask generating, and mask inpainting.

    • By using maskGenerator.yolov5Mask, you could make an mask(black and white) with yolov5.
    • Make an Inpainted Image from the mask made by the maskGenerator.yolov5Mask.

MaskRCNN+LaMa Inpainting Version

  1. Use code block named "Change python version 3.10 -> 3.7" for change python version.
    • Python version change in google colab
  2. Use code bloack named "Settings for ppp" for setting
    • Git clone PPP
    • Install packages for mask rcnn and LaMa Inpainting
    • Install LaMa model file
    .root
    │ lama   
    │  └── big-lama   
    │      ├── config.yaml # model configs     
    │      └── models           
    │          └── best.ckpt # model weights    
    
    • Make an directory for LaMa Inpainting prediction.
    PPP
    │ lama
    │  └── data_for_prediction
    │      ├── sample8.png # example
    │      └── sample8_mask.png # example
    
  3. Use code block named "Change file path and start Inpainting" for object detection, mask generating, and mask inpainting.
    • By using maskGenerator.mrcnnMask, you could make an mask(black and white) with mask RCNN.
    • After making mask, reset gpu ram for LaMa Inpainting
    • Make an Inpainted Image from the mask made by the maskGenerator.mrcnnMask

Requirements

We changed a few codes of yolov5 and Mask RCNN for Running both models(yolov5+LaMa or mask RCNN+Lama).

Yolov5+LaMa Version

python 3.10 torch 2.0.0 cu118 etc

Mask RCNN+LaMa Version

python 3.7 torch 1.8.0 cu111 etc

License

YOLOv5 is available under two different licenses:

  • AGPL-3.0 License: See LICENSE file for details.
  • Enterprise License: Provides greater flexibility for commercial product development without the open-source requirements of AGPL-3.0. Typical use cases are embedding Ultralytics software and AI models in commercial products and applications. Request an Enterprise License at Ultralytics Licensing.

Citation

Use this bibtex to cite this repository:

@misc{matterport_maskrcnn_2017,
  title={Mask R-CNN for object detection and instance segmentation on Keras and TensorFlow},
  author={Waleed Abdulla},
  year={2017},
  publisher={Github},
  journal={GitHub repository},
  howpublished={\url{https://github.com/matterport/Mask_RCNN}},
}

About

Privacy preserving PropTech

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published