Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
K
keras-retinanet
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Seyfullah Tıkıç
keras-retinanet
Commits
80f6e2d0
Kaydet (Commit)
80f6e2d0
authored
Kas 06, 2018
tarafından
vcarpani
Kaydeden (comit)
Hans Gaiser
Ara 07, 2018
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Rename postprocess_image to cast_image_to_floatx.
üst
7899cd81
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
8 deletions
+6
-8
generator.py
keras_retinanet/preprocessing/generator.py
+5
-5
image.py
keras_retinanet/utils/image.py
+1
-3
No files found.
keras_retinanet/preprocessing/generator.py
Dosyayı görüntüle @
80f6e2d0
...
...
@@ -33,7 +33,7 @@ from ..utils.image import (
apply_transform
,
preprocess_image
,
resize_image
,
postprocess_image
,
cast_image_to_floatx
,
)
from
..utils.transform
import
transform_aabb
...
...
@@ -54,7 +54,7 @@ class Generator(object):
compute_anchor_targets
=
anchor_targets_bbox
,
compute_shapes
=
guess_shapes
,
preprocess_image
=
preprocess_image
,
postprocess_image
=
postprocess_image
,
cast_image_to_floatx
=
cast_image_to_floatx
,
config
=
None
):
""" Initialize Generator object.
...
...
@@ -70,7 +70,7 @@ class Generator(object):
compute_anchor_targets : Function handler for computing the targets of anchors for an image and its annotations.
compute_shapes : Function handler for computing the shapes of the pyramid for a given input.
preprocess_image : Function handler for preprocessing an image (scaling / normalizing) for passing through a network.
postprocess_image : Function handler for postprocessing an image (converting to floatx)
for passing through a network.
cast_image_to_floatx : Function handler for converting to floatx an image
for passing through a network.
"""
self
.
transform_generator
=
transform_generator
self
.
batch_size
=
int
(
batch_size
)
...
...
@@ -82,7 +82,7 @@ class Generator(object):
self
.
compute_anchor_targets
=
compute_anchor_targets
self
.
compute_shapes
=
compute_shapes
self
.
preprocess_image
=
preprocess_image
self
.
postprocess_image
=
postprocess_image
self
.
cast_image_to_floatx
=
cast_image_to_floatx
self
.
config
=
config
self
.
group_index
=
0
...
...
@@ -226,7 +226,7 @@ class Generator(object):
annotations
[
'bboxes'
]
*=
image_scale
# convert to the wanted keras floatx
image
=
self
.
postprocess_image
(
image
)
image
=
self
.
cast_image_to_floatx
(
image
)
return
image
,
annotations
...
...
keras_retinanet/utils/image.py
Dosyayı görüntüle @
80f6e2d0
...
...
@@ -62,7 +62,7 @@ def preprocess_image(x, mode='caffe'):
return
x
def
postprocess_image
(
x
):
def
cast_image_to_floatx
(
x
):
""" Convert an image to the actual keras floatx.
Args
...
...
@@ -71,8 +71,6 @@ def postprocess_image(x):
Returns
The input in the keras floatx representation.
"""
# mostly identical to "https://github.com/keras-team/keras-applications/blob/master/keras_applications/imagenet_utils.py"
# except for converting RGB -> BGR since we assume BGR already
x
=
x
.
astype
(
keras
.
backend
.
floatx
())
return
x
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment