Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (4.0%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

Basic Info
  • Host: GitHub
  • Owner: aminrabinia
  • Language: Python
  • Default Branch: master
  • Size: 1.79 MB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created about 3 years ago · Last pushed about 3 years ago
Metadata Files
Readme Contributing Citation

README.md

Pictuer Swap

This app will run inference on a Yolov8 Image Segmentation model, trained on a custom dataset, to segment pictures hanging on a wall. Once the frame on the wall is detected another picture can be selected to swap with the original picture.

After running an inference: results = model.predict(input_image, imgsz=640, conf=conf, save=False, device='cpu')

results are parsed to extract boxes and masks. The coordinates then are used to capture the perspective and angles of a frame on the wall.

contours, hierarchy = cv2.findContours(img, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE) cnt = sorted(contours, key=cv2.contourArea, reverse=True)[-1] cv2.drawContours(canvas, cnt, -1, (255, 255, 0), 2)

The extracted coordinates then adjust the new picture. pts2 = np.float32(new_corners) M = cv2.getPerspectiveTransform(pts1,pts2) dst = cv2.warpPerspective(img, M, (cols, rows), bg_img, borderMode=cv2.BORDER_TRANSPARENT) Finally, a merge function with overlay the new picture on the original frame. for c in range(3): image[y1:y2, x1:x2, c] = alpha * img_pic[:, :, c]

Owner

  • Name: Amin Rabinia
  • Login: aminrabinia
  • Kind: user
  • Company: University of Maine

Sr. AI Engineer Applied ML

Citation (CITATION.cff)

cff-version: 1.2.0
preferred-citation:
  type: software
  message: If you use this software, please cite it as below.
  authors:
  - family-names: Jocher
    given-names: Glenn
    orcid: "https://orcid.org/0000-0001-5950-6979"
  - family-names: Chaurasia
    given-names: Ayush
    orcid: "https://orcid.org/0000-0002-7603-6750"
  - family-names: Qiu
    given-names: Jing
    orcid: "https://orcid.org/0000-0003-3783-7069"
  title: "YOLO by Ultralytics"
  version: 8.0.0
  # doi: 10.5281/zenodo.3908559  # TODO
  date-released: 2023-1-10
  license: GPL-3.0
  url: "https://github.com/ultralytics/ultralytics"

GitHub Events

Total
Last Year

Dependencies

Dockerfile docker
  • ubuntu 20.04 build
docker/Dockerfile docker
  • nvcr.io/nvidia/pytorch 23.01-py3 build
requirements.txt pypi
  • Pillow >=7.1.2
  • PyYAML >=5.3.1
  • fastapi *
  • gradio *
  • ipython *
  • matplotlib >=3.2.2
  • numpy >=1.18.5
  • opencv-python >=4.6.0
  • pandas >=1.1.4
  • psutil *
  • requests >=2.23.0
  • scipy >=1.4.1
  • seaborn >=0.11.0
  • tensorboard >=2.4.1
  • thop >=0.1.1
  • torch >=1.7.0
  • torchvision >=0.8.1
  • tqdm >=4.64.0
  • uvicorn *