Skip to content

Commit

Permalink
Make packages versions consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
maksad committed Apr 29, 2020
1 parent bb947de commit 8da6ee2
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,19 @@ You can use our pretrained models in PyTorch to segment input image. The usage i
```bash
cd lib/nn/prroi_pool
./travis.sh
```
```
You may need ```nvcc``` for this step. If it cannot find the path to ```cuda.h```, do

```bash
export CPATH=/PATH/TO/YOUR/CUDA/include && ./travis.sh
```

2. Now you're good to go! Here is a simple demo to do inference on a single image:
2. Install required packages
```bash
pip install -r requirements.txt
```

3. Now you're good to go! Here is a simple demo to do inference on a single image:

```bash
chmod +x demo_test.sh
Expand All @@ -63,7 +68,7 @@ chmod +x demo_test.sh

This script downloads trained models and a test image, runs the test script, and saves predicted segmentation (.png) to the working directory.

3. Input arguments: (see full input arguments via python3 test.py -h)
4. Input arguments: (see full input arguments via python3 test.py -h)
```bash
usage: test.py [-h] --test_img TEST_IMG --model_path MODEL_PATH
[--suffix SUFFIX] [--arch_encoder ARCH_ENCODER]
Expand Down
4 changes: 2 additions & 2 deletions lib/utils/data/dataloader.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import torch
import torch.multiprocessing as multiprocessing
from torch._C import _set_worker_signal_handlers, _update_worker_pids, \
from torch._C import _set_worker_signal_handlers, _set_worker_pids, \
_remove_worker_pids, _error_if_any_worker_fails
from .sampler import SequentialSampler, RandomSampler, BatchSampler
import signal
Expand Down Expand Up @@ -235,7 +235,7 @@ def __init__(self, loader):
w.daemon = True # ensure that the worker exits on process exit
w.start()

_update_worker_pids(id(self), tuple(w.pid for w in self.workers))
_set_worker_pids(id(self), tuple(w.pid for w in self.workers))
_set_SIGCHLD_handler()
self.worker_pids_set = True

Expand Down
8 changes: 8 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
numpy==1.16.6
pillow==6.2.2
opencv-python==4.2.0.32
scipy==1.1.0
torch==1.4.0
torchvision==0.5.0
tqdm==4.45.0
colormath==3.0.0

0 comments on commit 8da6ee2

Please sign in to comment.