Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make packages versions consistent #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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