Skip to content

In project Densepose #4798

@romany10203

Description

@romany10203

Instructions To Reproduce the 🐛 Bug:

  1. Full runnable code or full changes you made:
Installation 
!python -m pip install pyyaml==5.1
import sys, os, distutils.core
!git clone 'https://github.com/facebookresearch/detectron2'
dist = distutils.core.run_setup("./detectron2/setup.py")
!python -m pip install {' '.join([f"'{x}'" for x in dist.install_requires])}
sys.path.insert(0, os.path.abspath('./detectron2'))

import torch, detectron2
!nvcc --version
TORCH_VERSION = ".".join(torch.__version__.split(".")[:2])
CUDA_VERSION = torch.__version__.split("+")[-1]
print("torch: ", TORCH_VERSION, "; cuda: ", CUDA_VERSION)
print("detectron2:", detectron2.__version__)

import detectron2
from detectron2.utils.logger import setup_logger
setup_logger()
import numpy as np
import os, json, cv2, random
from google.colab.patches import cv2_imshow
from detectron2 import model_zoo
from detectron2.engine import DefaultPredictor
from detectron2.config import get_cfg
from detectron2.utils.visualizer import Visualizer
from detectron2.data import MetadataCatalog, DatasetCatalog


##### ---Using densepose--- #####

!python "/content/detectron2/projects/DensePose/apply_net.py" show configs/densepose_rcnn_R_50_FPN_s1x.yaml densepose_rcnn_R_50_FPN_s1x.pkl ".content/image.jpg" dp_contour,bbox --output image_densepose_contour.png

Full logs or other relevant observations:

Traceback (most recent call last):
  File "/content/detectron2/projects/DensePose/apply_net.py", line 12, in <module>
    from detectron2.config import CfgNode, get_cfg
ModuleNotFoundError: No module named 'detectron2'

Expected behavior:

after installation i'm trying to use densepsoe but i still got this error
If there are no obvious error in "full logs" provided above,

Environment: google colab

Provide your environment information using the following command:

!python "/content/detectron2/projects/DensePose/apply_net.py" show configs/densepose_rcnn_R_50_FPN_s1x.yaml densepose_rcnn_R_50_FPN_s1x.pkl ".content/image.jpg" dp_contour,bbox --output image_densepose_contour.png

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions