Commit 1f07de76 authored by Yuxin Wu's avatar Yuxin Wu

fasterrcnn notes

parent d96f2675
# Faster-RCNN / Mask-RCNN on COCO # Faster-RCNN / Mask-RCNN on COCO
This example aims to provide a minimal (1.3k lines) multi-GPU implementation of This example aims to provide a minimal (1.3k lines) multi-GPU implementation of
Faster-RCNN / Mask-RCNN (without FPN) on COCO. Faster-RCNN & Mask-RCNN (with ResNet backbones) on COCO.
## Dependencies ## Dependencies
+ Python 3; TensorFlow >= 1.4.0 + Python 3; TensorFlow >= 1.4.0
...@@ -53,14 +53,14 @@ MaskRCNN results contain both bbox and segm mAP. ...@@ -53,14 +53,14 @@ MaskRCNN results contain both bbox and segm mAP.
|Backbone | `FASTRCNN_BATCH` | resolution | mAP (bbox/segm) | Time | |Backbone | `FASTRCNN_BATCH` | resolution | mAP (bbox/segm) | Time |
| - | - | - | - | - | | - | - | - | - | - |
| Res50 | 64 | (600, 1024) | 33.0 | 22h on 8 P100 | | R50 | 64 | (600, 1024) | 33.0 | 22h on 8 P100 |
| Res50 | 256 | (600, 1024) | 34.4 | 49h on 8 M40 | | R50 | 256 | (600, 1024) | 34.4 | 49h on 8 M40 |
| Res50 | 512 | (800, 1333) | 35.6 | 55h on 8 P100| | R50 | 512 | (800, 1333) | 35.6 | 55h on 8 P100|
| Res50 | 256 | (800, 1333) | 36.9/32.3 | 39h on 8 P100| | R50 | 256 | (800, 1333) | 36.9/32.3 | 39h on 8 P100|
| Res101 | 512 | (800, 1333) | 40.1/34.4 | 70h on 8 P100| | R101 | 512 | (800, 1333) | 40.1/34.4 | 70h on 8 P100|
Note that these models are trained with a larger ROI batch size than the paper, Note that these models are trained with different ROI batch size and LR schedule.
and get about 1mAP better performance. The performance is slightly better than the paper.
## Notes ## Notes
......
...@@ -160,7 +160,6 @@ class MultiProcessPrefetchData(ProxyDataFlow): ...@@ -160,7 +160,6 @@ class MultiProcessPrefetchData(ProxyDataFlow):
self._size = -1 self._size = -1
self.nr_proc = nr_proc self.nr_proc = nr_proc
self.nr_prefetch = nr_prefetch self.nr_prefetch = nr_prefetch
self._guard = DataFlowReentrantGuard()
if nr_proc > 1: if nr_proc > 1:
logger.info("[MultiProcessPrefetchData] Will fork a dataflow more than one times. " logger.info("[MultiProcessPrefetchData] Will fork a dataflow more than one times. "
...@@ -173,12 +172,11 @@ class MultiProcessPrefetchData(ProxyDataFlow): ...@@ -173,12 +172,11 @@ class MultiProcessPrefetchData(ProxyDataFlow):
start_proc_mask_signal(self.procs) start_proc_mask_signal(self.procs)
def get_data(self): def get_data(self):
with self._guard: for k in itertools.count():
for k in itertools.count(): if self._size > 0 and k >= self._size:
if self._size > 0 and k >= self._size: break
break dp = self.queue.get()
dp = self.queue.get() yield dp
yield dp
def reset_state(self): def reset_state(self):
# do nothing. all ds are reset once and only once in spawned processes # do nothing. all ds are reset once and only once in spawned processes
......
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