Skip to content

Commit a9238fe

Browse files
committed
add windows 10 support
1 parent fb423a5 commit a9238fe

File tree

7 files changed

+14
-12
lines changed

7 files changed

+14
-12
lines changed

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SECOND-V1.5 for KITTI object detection
22
SECOND-V1.5 detector.
33

4-
ONLY support python 3.6+, pytorch 1.0.0+. Tested in Ubuntu 16.04/18.04.
4+
ONLY support python 3.6+, pytorch 1.0.0+. Tested in Ubuntu 16.04/18.04/Windows 10.
55

66
## News
77

@@ -53,13 +53,17 @@ cd ./second.pytorch/second
5353
It is recommend to use Anaconda package manager.
5454

5555
```bash
56-
pip install shapely fire pybind11 tensorboardX protobuf scikit-image numba pillow
56+
conda install scikit-image scipy numba pillow matplotlib
57+
```
58+
59+
```bash
60+
pip install fire tensorboardX protobuf opencv-python
5761
```
5862

5963
If you don't have Anaconda:
6064

6165
```bash
62-
pip install numba
66+
pip install numba scikit-image scipy pillow
6367
```
6468

6569
Follow instructions in [spconv](https://github.com/traveller59/spconv) to install spconv.

RELEASE.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@ points([N, 4])->voxels([N, 5, 4])->Features([N, 4])->Sparse Convolution Networks
1818
* Eval functions now support custom data evaluation. you need to specify z_center and z_axis in eval function.
1919
2. Better RPN, you can add custom block by inherit RPNBase and implement _make_layer method.
2020
3. Update pretrained model.
21-
4. Add a simple inference notebook. everyone should start this project by that notebook.
21+
4. Add a simple inference notebook. everyone should start this project by that notebook.
22+
5. Add windows support. Training on windows is slow than linux.

second/core/preprocess.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
import numba
88
import numpy as np
9-
from shapely.geometry import Polygon
109

1110
from second.core import box_np_ops
1211
from second.core.geometry import (points_in_convex_polygon_3d_jit,

second/kittiviewer/backend.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import matplotlib.pyplot as plt
2222
import numba
2323
import skimage
24-
from shapely.geometry import Polygon
2524
from skimage import io
2625

2726
import second.core.box_np_ops as box_np_ops

second/pytorch/models/rpn.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
from enum import Enum
33

44
import numpy as np
5-
import sparseconvnet as scn
65
import torch
76
from torch import nn
87
from torch.nn import functional as F

second/pytorch/models/voxelnet.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from functools import reduce
44

55
import numpy as np
6-
import sparseconvnet as scn
76
import torch
87
from torch import nn
98
from torch.nn import functional as F

second/pytorch/train.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ def build_network(model_cfg, measure_time=False):
7878
net = second_builder.build(model_cfg, voxel_generator, target_assigner, measure_time=measure_time)
7979
return net
8080

81+
def _worker_init_fn(worker_id):
82+
time_seed = np.array(time.time(), dtype=np.int32)
83+
np.random.seed(time_seed + worker_id)
84+
print(f"WORKER {worker_id} seed:", np.random.get_state()[1][0])
85+
8186
def train(config_path,
8287
model_dir,
8388
result_path=None,
@@ -171,10 +176,6 @@ def train(config_path,
171176
training=False,
172177
voxel_generator=voxel_generator,
173178
target_assigner=target_assigner)
174-
def _worker_init_fn(worker_id):
175-
time_seed = np.array(time.time(), dtype=np.int32)
176-
np.random.seed(time_seed + worker_id)
177-
print(f"WORKER {worker_id} seed:", np.random.get_state()[1][0])
178179

179180
dataloader = torch.utils.data.DataLoader(
180181
dataset,

0 commit comments

Comments
 (0)