File tree Expand file tree Collapse file tree 3 files changed +18
-5
lines changed Expand file tree Collapse file tree 3 files changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -47,14 +47,19 @@ You can use our pretrained models in PyTorch to segment input image. The usage i
4747``` bash
4848 cd lib/nn/prroi_pool
4949 ./travis.sh
50- ```
50+ ```
5151You may need ``` nvcc ``` for this step. If it cannot find the path to ``` cuda.h ``` , do
5252
5353``` bash
5454 export CPATH=/PATH/TO/YOUR/CUDA/include && ./travis.sh
5555```
5656
57- 2 . Now you're good to go! Here is a simple demo to do inference on a single image:
57+ 2 . Install required packages
58+ ``` bash
59+ pip install -r requirements.txt
60+ ```
61+
62+ 3 . Now you're good to go! Here is a simple demo to do inference on a single image:
5863
5964``` bash
6065chmod +x demo_test.sh
@@ -63,7 +68,7 @@ chmod +x demo_test.sh
6368
6469This script downloads trained models and a test image, runs the test script, and saves predicted segmentation (.png) to the working directory.
6570
66- 3 . Input arguments: (see full input arguments via python3 test.py -h)
71+ 4 . Input arguments: (see full input arguments via python3 test.py -h)
6772``` bash
6873usage: test.py [-h] --test_img TEST_IMG --model_path MODEL_PATH
6974 [--suffix SUFFIX] [--arch_encoder ARCH_ENCODER]
Original file line number Diff line number Diff line change 11import torch
22import torch .multiprocessing as multiprocessing
3- from torch ._C import _set_worker_signal_handlers , _update_worker_pids , \
3+ from torch ._C import _set_worker_signal_handlers , _set_worker_pids , \
44 _remove_worker_pids , _error_if_any_worker_fails
55from .sampler import SequentialSampler , RandomSampler , BatchSampler
66import signal
@@ -235,7 +235,7 @@ def __init__(self, loader):
235235 w .daemon = True # ensure that the worker exits on process exit
236236 w .start ()
237237
238- _update_worker_pids (id (self ), tuple (w .pid for w in self .workers ))
238+ _set_worker_pids (id (self ), tuple (w .pid for w in self .workers ))
239239 _set_SIGCHLD_handler ()
240240 self .worker_pids_set = True
241241
Original file line number Diff line number Diff line change 1+ numpy == 1.16.6
2+ pillow == 6.2.2
3+ opencv-python == 4.2.0.32
4+ scipy == 1.1.0
5+ torch == 1.4.0
6+ torchvision == 0.5.0
7+ tqdm == 4.45.0
8+ colormath == 3.0.0
You can’t perform that action at this time.
0 commit comments