Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
ResNet50_tensorflow
Commits
c57e975a
Commit
c57e975a
authored
Nov 29, 2021
by
saberkun
Browse files
Merge pull request #10338 from srihari-humbarwadi:readme
PiperOrigin-RevId: 413033276
parents
7fb4f3cd
acf4156e
Changes
291
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
111 additions
and
13 deletions
+111
-13
official/vision/utils/object_detection/preprocessor.py
official/vision/utils/object_detection/preprocessor.py
+2
-4
official/vision/utils/object_detection/region_similarity_calculator.py
...on/utils/object_detection/region_similarity_calculator.py
+0
-0
official/vision/utils/object_detection/shape_utils.py
official/vision/utils/object_detection/shape_utils.py
+0
-0
official/vision/utils/object_detection/target_assigner.py
official/vision/utils/object_detection/target_assigner.py
+2
-2
official/vision/utils/object_detection/visualization_utils.py
...cial/vision/utils/object_detection/visualization_utils.py
+4
-4
orbit/standard_runner.py
orbit/standard_runner.py
+4
-1
tensorflow_models/LICENSE
tensorflow_models/LICENSE
+2
-2
tensorflow_models/__init__.py
tensorflow_models/__init__.py
+23
-0
tensorflow_models/nlp/__init__.py
tensorflow_models/nlp/__init__.py
+17
-0
tensorflow_models/tensorflow_models_test.py
tensorflow_models/tensorflow_models_test.py
+40
-0
tensorflow_models/vision/__init__.py
tensorflow_models/vision/__init__.py
+17
-0
No files found.
official/vision/
detection/
utils/object_detection/preprocessor.py
→
official/vision/utils/object_detection/preprocessor.py
View file @
c57e975a
...
...
@@ -39,11 +39,9 @@ we pass it to the functions. At the end of the preprocess we expand the image
back to rank 4.
"""
import
tensorflow
as
tf
import
numpy
as
np
from
official.vision.
detection.
utils.object_detection
import
box_list
import
tensorflow
as
tf
from
official.vision.utils.object_detection
import
box_list
def
_flip_boxes_left_right
(
boxes
):
...
...
official/vision/
detection/
utils/object_detection/region_similarity_calculator.py
→
official/vision/utils/object_detection/region_similarity_calculator.py
View file @
c57e975a
File moved
official/vision/
detection/
utils/object_detection/shape_utils.py
→
official/vision/utils/object_detection/shape_utils.py
View file @
c57e975a
File moved
official/vision/
detection/
utils/object_detection/target_assigner.py
→
official/vision/utils/object_detection/target_assigner.py
View file @
c57e975a
...
...
@@ -33,8 +33,8 @@ images must be handled externally.
import
tensorflow
as
tf
from
official.vision.
detection.
utils.object_detection
import
box_list
from
official.vision.
detection.
utils.object_detection
import
shape_utils
from
official.vision.utils.object_detection
import
box_list
from
official.vision.utils.object_detection
import
shape_utils
KEYPOINTS_FIELD_NAME
=
'keypoints'
...
...
official/vision/
detection/
utils/object_detection/visualization_utils.py
→
official/vision/utils/object_detection/visualization_utils.py
View file @
c57e975a
...
...
@@ -34,8 +34,8 @@ import PIL.ImageFont as ImageFont
import
six
import
tensorflow
as
tf
from
official.vision.
d
et
ection.util
s
import
box_
util
s
from
official.vision.
detection.
utils.object_detection
import
shape_utils
from
official.vision.
b
et
a.op
s
import
box_
op
s
from
official.vision.utils.object_detection
import
shape_utils
_TITLE_LEFT_MARGIN
=
10
_TITLE_TOP_MARGIN
=
10
...
...
@@ -107,8 +107,8 @@ def visualize_images_with_bounding_boxes(images, box_outputs, step,
image_shape
=
tf
.
shape
(
images
[
0
])
image_height
=
tf
.
cast
(
image_shape
[
0
],
tf
.
float32
)
image_width
=
tf
.
cast
(
image_shape
[
1
],
tf
.
float32
)
normalized_boxes
=
box_
util
s
.
normalize_boxes
(
box_outputs
,
[
image_height
,
image_width
])
normalized_boxes
=
box_
op
s
.
normalize_boxes
(
box_outputs
,
[
image_height
,
image_width
])
bounding_box_color
=
tf
.
constant
([[
1.0
,
1.0
,
0.0
,
1.0
]])
image_summary
=
tf
.
image
.
draw_bounding_boxes
(
...
...
orbit/standard_runner.py
View file @
c57e975a
...
...
@@ -265,7 +265,10 @@ class StandardEvaluator(runner.AbstractEvaluator, metaclass=abc.ABCMeta):
Args:
eval_dataset: A `tf.nest`-compatible structure of `tf.data.Dataset` or
`DistributedDataset`.
`DistributedDataset`. On TPUs, if users want to exaust the dataset
without specifying number of eval steps, it is recommended to set
`drop_remainder=False` when batching the dataset, so the infrastructure
can handle the last partial batch properly.
options: An `orbit.StandardEvaluatorOptions` instance.
"""
options
=
options
or
StandardEvaluatorOptions
()
...
...
official/vision/keras_cv
/LICENSE
→
tensorflow_models
/LICENSE
View file @
c57e975a
Copyright 20
20
The TensorFlow Authors. All rights reserved.
Copyright 20
15
The TensorFlow Authors.
All rights reserved.
Apache License
Version 2.0, January 2004
...
...
@@ -200,4 +200,4 @@ Copyright 2020 The TensorFlow Authors. All rights reserved.
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
\ No newline at end of file
limitations under the License.
tensorflow_models/__init__.py
0 → 100644
View file @
c57e975a
# Copyright 2021 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""TensorFlow Models Libraries."""
# pylint: disable=wildcard-import
from
tensorflow_models
import
nlp
from
tensorflow_models
import
vision
from
official
import
core
from
official.modeling
import
hyperparams
from
official.modeling
import
optimization
from
official.modeling
import
tf_utils
tensorflow_models/nlp/__init__.py
0 → 100644
View file @
c57e975a
# Copyright 2021 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""TensorFlow Models NLP Libraries."""
from
official.nlp
import
tasks
from
official.nlp.modeling
import
*
tensorflow_models/tensorflow_models_test.py
0 → 100644
View file @
c57e975a
# Copyright 2021 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Tests for tensorflow_models imports."""
import
tensorflow
as
tf
import
tensorflow_models
as
tfm
class
TensorflowModelsTest
(
tf
.
test
.
TestCase
):
def
testVisionImport
(
self
):
_
=
tfm
.
vision
.
layers
.
SqueezeExcitation
(
in_filters
=
8
,
out_filters
=
4
,
se_ratio
=
1
)
_
=
tfm
.
vision
.
configs
.
image_classification
.
Losses
()
def
testNLPImport
(
self
):
_
=
tfm
.
nlp
.
layers
.
TransformerEncoderBlock
(
num_attention_heads
=
2
,
inner_dim
=
10
,
inner_activation
=
'relu'
)
_
=
tfm
.
nlp
.
tasks
.
TaggingTask
(
params
=
tfm
.
nlp
.
tasks
.
TaggingConfig
())
def
testCommonImports
(
self
):
_
=
tfm
.
hyperparams
.
Config
()
_
=
tfm
.
optimization
.
LinearWarmup
(
after_warmup_lr_sched
=
0.0
,
warmup_steps
=
10
,
warmup_learning_rate
=
0.1
)
if
__name__
==
'__main__'
:
tf
.
test
.
main
()
tensorflow_models/vision/__init__.py
0 → 100644
View file @
c57e975a
# Copyright 2021 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""TensorFlow Models Vision Libraries."""
from
official.vision.beta
import
configs
from
official.vision.beta.modeling
import
*
Prev
1
…
11
12
13
14
15
Next
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