Commit 763d3112 authored by 吴升宇's avatar 吴升宇

fix

parent d56e267e
...@@ -22,3 +22,4 @@ detectron/datasets/data/* ...@@ -22,3 +22,4 @@ detectron/datasets/data/*
# Generated C files # Generated C files
detectron/utils/cython_*.c detectron/utils/cython_*.c
.idea
\ No newline at end of file
...@@ -8,7 +8,7 @@ ENV PYTHONPATH /usr/local/caffe2_build:${PYTHONPATH} ...@@ -8,7 +8,7 @@ ENV PYTHONPATH /usr/local/caffe2_build:${PYTHONPATH}
ENV LD_LIBRARY_PATH /usr/local/caffe2_build/lib:${LD_LIBRARY_PATH} ENV LD_LIBRARY_PATH /usr/local/caffe2_build/lib:${LD_LIBRARY_PATH}
# Clone the Detectron repository # Clone the Detectron repository
RUN git clone https://github.com/facebookresearch/detectron /detectron COPY . /detectron
# Install Python dependencies # Install Python dependencies
RUN pip install -r /detectron/requirements.txt RUN pip install -r /detectron/requirements.txt
...@@ -19,6 +19,7 @@ WORKDIR /cocoapi/PythonAPI ...@@ -19,6 +19,7 @@ WORKDIR /cocoapi/PythonAPI
RUN make install RUN make install
# Go to Detectron root # Go to Detectron root
VOLUME ["/tmp"]
WORKDIR /detectron WORKDIR /detectron
# Set up Python modules # Set up Python modules
......
...@@ -106,7 +106,7 @@ python2 $DETECTRON/detectron/tests/test_zero_even_op.py ...@@ -106,7 +106,7 @@ python2 $DETECTRON/detectron/tests/test_zero_even_op.py
## Docker Image ## Docker Image
We provide a [`Dockerfile`](docker/Dockerfile) that you can use to build a Detectron image on top of a Caffe2 image that satisfies the requirements outlined at the top. If you would like to use a Caffe2 image different from the one we use by default, please make sure that it includes the [Detectron module](https://github.com/caffe2/caffe2/tree/master/modules/detectron). We provide a [`Dockerfile`](Dockerfile) that you can use to build a Detectron image on top of a Caffe2 image that satisfies the requirements outlined at the top. If you would like to use a Caffe2 image different from the one we use by default, please make sure that it includes the [Detectron module](https://github.com/caffe2/caffe2/tree/master/modules/detectron).
Build the image: Build the image:
......
...@@ -30,7 +30,8 @@ import urllib2 ...@@ -30,7 +30,8 @@ import urllib2
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
_DETECTRON_S3_BASE_URL = 'https://s3-us-west-2.amazonaws.com/detectron' # _DETECTRON_S3_BASE_URL = 'https://s3-us-west-2.amazonaws.com/detectron'
_DETECTRON_S3_BASE_URL = 'https://dl.fbaipublicfiles.com/detectron'
def save_object(obj, file_name): def save_object(obj, file_name):
......
...@@ -104,7 +104,7 @@ def vis_mask(img, mask, col, alpha=0.4, show_border=True, border_thick=1): ...@@ -104,7 +104,7 @@ def vis_mask(img, mask, col, alpha=0.4, show_border=True, border_thick=1):
img[idx[0], idx[1], :] += alpha * col img[idx[0], idx[1], :] += alpha * col
if show_border: if show_border:
_, contours, _ = cv2.findContours( contours, _ = cv2.findContours(
mask.copy(), cv2.RETR_CCOMP, cv2.CHAIN_APPROX_NONE) mask.copy(), cv2.RETR_CCOMP, cv2.CHAIN_APPROX_NONE)
cv2.drawContours(img, contours, -1, _WHITE, border_thick, cv2.LINE_AA) cv2.drawContours(img, contours, -1, _WHITE, border_thick, cv2.LINE_AA)
...@@ -323,7 +323,7 @@ def vis_one_image( ...@@ -323,7 +323,7 @@ def vis_one_image(
img[:, :, c] = color_mask[c] img[:, :, c] = color_mask[c]
e = masks[:, :, i] e = masks[:, :, i]
_, contour, hier = cv2.findContours( contour, hier = cv2.findContours(
e.copy(), cv2.RETR_CCOMP, cv2.CHAIN_APPROX_NONE) e.copy(), cv2.RETR_CCOMP, cv2.CHAIN_APPROX_NONE)
for c in contour: for c in contour:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment