-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
96 additions
and
182 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
from imdb import Imdb | ||
from dataset.imdb import Imdb | ||
import random | ||
|
||
class ConcatDB(Imdb): | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import os | ||
from imdb import Imdb | ||
from dataset.imdb import Imdb | ||
|
||
|
||
class TestDB(Imdb): | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import os | ||
import numpy as np | ||
from imdb import Imdb | ||
from dataset.imdb import Imdb | ||
|
||
|
||
class YoloFormat(Imdb): | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule mxnet
updated
1962 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
""" | ||
Reference: | ||
Redmon, Joseph, and Ali Farhadi. "YOLO9000: Better, Faster, Stronger." | ||
"https://arxiv.org/pdf/1612.08242.pdf" | ||
""" | ||
import mxnet as mx | ||
from symbol.symbol_darknet19 import get_symbol as get_darknet19 | ||
from symbol.symbol_darknet19 import conv_act_layer | ||
|
||
def get_symbol(num_classes=20, nms_thresh=0.5, force_nms=False, **kwargs): | ||
bone = get_darknet19(num_classes=num_classes, **kwargs) | ||
conv5_5 = bone.get_internals()["leaky_conv5_5_output"] | ||
conv6_5 = bone.get_internals()["leaky_conv6_5_output"] | ||
# anchors | ||
anchors = [ | ||
1.3221, 1.73145, | ||
3.19275, 4.00944, | ||
5.05587, 8.09892, | ||
9.47112, 4.84053, | ||
11.2364, 10.0071] | ||
num_anchor = len(anchors) // 2 | ||
|
||
# extra layers | ||
conv7_1 = conv_act_layer(conv6_5, 'conv7_1', 1024, kernel=(3, 3), pad=(1, 1), | ||
act_type='leaky') | ||
conv7_2 = conv_act_layer(conv7_1, 'conv7_2', 1024, kernel=(3, 3), pad=(1, 1), | ||
act_type='leaky') | ||
conv8_1 = conv_act_layer(conv7_2, 'conv8_1', 1024, kernel=(3, 3), pad=(1, 1), | ||
act_type='leaky') | ||
pred = mx.symbol.Convolution(data=conv8_1, name='conv_pred', kernel=(1, 1), | ||
num_filter=num_anchor * (num_classes + 4 + 1)) | ||
|
||
out = mx.contrib.symbol.YoloOutput(data=pred, num_class=num_classes, | ||
num_anchor=num_anchor, object_grad_scale=5.0, background_grad_scale=1.0, | ||
coord_grad_scale=1.0, class_grad_scale=1.0, anchors=anchors, | ||
nms_topk=400, warmup_samples=12800, name='yolo_output') | ||
return out |
Oops, something went wrong.