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
20 changed files
with
38 additions
and
125 deletions
+38
-125
official/vision/image_classification/optimizer_factory.py
official/vision/image_classification/optimizer_factory.py
+0
-1
official/vision/image_classification/optimizer_factory_test.py
...ial/vision/image_classification/optimizer_factory_test.py
+0
-1
official/vision/image_classification/preprocessing.py
official/vision/image_classification/preprocessing.py
+0
-1
official/vision/image_classification/resnet/resnet_runnable.py
...ial/vision/image_classification/resnet/resnet_runnable.py
+0
-5
official/vision/image_classification/resnet/tfhub_export.py
official/vision/image_classification/resnet/tfhub_export.py
+0
-1
official/vision/keras_cv/README.md
official/vision/keras_cv/README.md
+0
-13
official/vision/keras_cv/contributing.md
official/vision/keras_cv/contributing.md
+0
-21
official/vision/keras_cv/requirements.txt
official/vision/keras_cv/requirements.txt
+0
-2
official/vision/keras_cv/setup.py
official/vision/keras_cv/setup.py
+0
-70
official/vision/utils/__init__.py
official/vision/utils/__init__.py
+14
-0
official/vision/utils/object_detection/__init__.py
official/vision/utils/object_detection/__init__.py
+14
-0
official/vision/utils/object_detection/argmax_matcher.py
official/vision/utils/object_detection/argmax_matcher.py
+2
-2
official/vision/utils/object_detection/balanced_positive_negative_sampler.py
...ls/object_detection/balanced_positive_negative_sampler.py
+2
-2
official/vision/utils/object_detection/box_coder.py
official/vision/utils/object_detection/box_coder.py
+0
-0
official/vision/utils/object_detection/box_list.py
official/vision/utils/object_detection/box_list.py
+0
-0
official/vision/utils/object_detection/box_list_ops.py
official/vision/utils/object_detection/box_list_ops.py
+2
-2
official/vision/utils/object_detection/faster_rcnn_box_coder.py
...al/vision/utils/object_detection/faster_rcnn_box_coder.py
+2
-2
official/vision/utils/object_detection/matcher.py
official/vision/utils/object_detection/matcher.py
+0
-0
official/vision/utils/object_detection/minibatch_sampler.py
official/vision/utils/object_detection/minibatch_sampler.py
+1
-1
official/vision/utils/object_detection/ops.py
official/vision/utils/object_detection/ops.py
+1
-1
No files found.
official/vision/image_classification/optimizer_factory.py
View file @
c57e975a
...
...
@@ -15,7 +15,6 @@
"""Optimizer factory for vision tasks."""
from
__future__
import
absolute_import
from
__future__
import
division
# from __future__ import google_type_annotations
from
__future__
import
print_function
from
typing
import
Any
,
Dict
,
Optional
,
Text
...
...
official/vision/image_classification/optimizer_factory_test.py
View file @
c57e975a
...
...
@@ -16,7 +16,6 @@
from
__future__
import
absolute_import
from
__future__
import
division
# from __future__ import google_type_annotations
from
__future__
import
print_function
from
absl.testing
import
parameterized
...
...
official/vision/image_classification/preprocessing.py
View file @
c57e975a
...
...
@@ -16,7 +16,6 @@
from
__future__
import
absolute_import
from
__future__
import
division
# from __future__ import google_type_annotations
from
__future__
import
print_function
import
tensorflow
as
tf
...
...
official/vision/image_classification/resnet/resnet_runnable.py
View file @
c57e975a
...
...
@@ -72,14 +72,9 @@ class ResnetRunnable(orbit.StandardTrainer, orbit.StandardEvaluator):
# Make sure iterations variable is created inside scope.
self
.
global_step
=
self
.
optimizer
.
iterations
use_graph_rewrite
=
flags_obj
.
fp16_implementation
==
'graph_rewrite'
if
use_graph_rewrite
and
not
flags_obj
.
use_tf_function
:
raise
ValueError
(
'--fp16_implementation=graph_rewrite requires '
'--use_tf_function to be true'
)
self
.
optimizer
=
performance
.
configure_optimizer
(
self
.
optimizer
,
use_float16
=
self
.
dtype
==
tf
.
float16
,
use_graph_rewrite
=
use_graph_rewrite
,
loss_scale
=
flags_core
.
get_loss_scale
(
flags_obj
,
default_for_fp16
=
128
))
self
.
train_loss
=
tf
.
keras
.
metrics
.
Mean
(
'train_loss'
,
dtype
=
tf
.
float32
)
...
...
official/vision/image_classification/resnet/tfhub_export.py
View file @
c57e975a
...
...
@@ -16,7 +16,6 @@
from
__future__
import
absolute_import
from
__future__
import
division
# from __future__ import google_type_annotations
from
__future__
import
print_function
import
os
...
...
official/vision/keras_cv/README.md
deleted
100644 → 0
View file @
7fb4f3cd
# keras-cv
## Losses
*
[
FocalLoss
](
losses/focal_loss.py
)
implements Focal loss as described in
[
"Focal Loss for Dense Object Detection"
](
https://arxiv.org/abs/1708.02002
)
.
## Ops
Ops are used in data pipeline for pre-compute labels, weights.
*
[
IOUSimilarity
](
ops/iou_similarity.py
)
implements Intersection-Over-Union.
official/vision/keras_cv/contributing.md
deleted
100644 → 0
View file @
7fb4f3cd
## Contributing to KerasCV
Patches to KerasCV are welcome!
The source-of-truth repository lives under
[
TF Model Garden Vision
](
https://github.com/tensorflow/models/official/vision/keras_cv
)
,
and is mirrored as a read-only repository under
[
keras-team/keras-cv
](
https://github.com/keras-team/keras-cv
)
.
Contributions should be made as PRs to the TF Model Garden repository.
This is to ensure the codebase is rigorously tested with state-of-art models
on different accelerators.
In the long run, we will move development to the current repository
`keras-team/keras-cv`
.
## :heavy_check_mark: Contributor checklist
1.
Ensure you have signed the
[
Contributor License Agreement
](
https://cla.developers.google.com/about/google-individual?csw=1
)
.
*
All code contributors are required to sign a Contributor License Agreement.
*
Please read this
[
troubleshooting guide
](
Contributor-License-Agreements#troubleshooting-clas
)
if you encounter an issue.
2.
Please review the
[
contribution guidelines
](
https://github.com/tensorflow/models/wiki/How-to-contribute
)
.
3.
Check if your changes are consistent with the
[
TensorFlow coding style
](
https://www.tensorflow.org/community/contribute/code_style
)
.
official/vision/keras_cv/requirements.txt
deleted
100644 → 0
View file @
7fb4f3cd
numpy
scipy
official/vision/keras_cv/setup.py
deleted
100644 → 0
View file @
7fb4f3cd
# 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.
"""Setup script."""
import
os
from
setuptools
import
find_packages
from
setuptools
import
setup
version
=
'0.0.1'
def
_get_requirements
():
"""Parses requirements.txt file."""
install_requires_tmp
=
[]
dependency_links_tmp
=
[]
with
open
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'./requirements.txt'
),
'r'
)
as
f
:
for
line
in
f
:
package_name
=
line
.
strip
()
# Skip empty line or comments starting with "#".
if
not
package_name
or
package_name
[
0
]
==
'#'
:
continue
if
package_name
.
startswith
(
'-e '
):
dependency_links_tmp
.
append
(
package_name
[
3
:].
strip
())
else
:
install_requires_tmp
.
append
(
package_name
)
return
install_requires_tmp
,
dependency_links_tmp
install_requires
,
dependency_links
=
_get_requirements
()
install_requires
.
append
(
'tf-nightly'
)
install_requires
.
append
(
'tensorflow-datasets'
)
setup
(
name
=
'keras-cv'
,
version
=
version
,
description
=
'Keras Computer Vision Library'
,
url
=
'https://github.com/keras-team/keras-cv'
,
author
=
'The Keras authors'
,
author_email
=
'keras-team@google.com'
,
license
=
'Apache License 2.0'
,
install_requires
=
install_requires
,
classifiers
=
[
'Programming Language :: Python'
,
'Programming Language :: Python :: 3.6'
,
'Operating System :: Unix'
,
'Operating System :: Microsoft :: Windows'
,
'Operating System :: MacOS'
,
'Intended Audience :: Science/Research'
,
'Topic :: Scientific/Engineering'
,
'Topic :: Software Development'
],
packages
=
find_packages
(
exclude
=
(
'tests'
,)),
exclude_package_data
=
{
''
:
[
'*_test.py'
,],},
dependency_links
=
dependency_links
,
python_requires
=
'>=3.6'
,
)
official/vision/utils/__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.
official/vision/utils/object_detection/__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.
official/vision/
detection/
utils/object_detection/argmax_matcher.py
→
official/vision/utils/object_detection/argmax_matcher.py
View file @
c57e975a
...
...
@@ -28,8 +28,8 @@ factory function for popular implementations.
"""
import
tensorflow
as
tf
from
official.vision.
detection.
utils.object_detection
import
matcher
from
official.vision.
detection.
utils.object_detection
import
shape_utils
from
official.vision.utils.object_detection
import
matcher
from
official.vision.utils.object_detection
import
shape_utils
class
ArgMaxMatcher
(
matcher
.
Matcher
):
...
...
official/vision/
detection/
utils/object_detection/balanced_positive_negative_sampler.py
→
official/vision/utils/object_detection/balanced_positive_negative_sampler.py
View file @
c57e975a
...
...
@@ -33,8 +33,8 @@ This is originally implemented in TensorFlow Object Detection API.
import
tensorflow
as
tf
from
official.vision.
detection.
utils.object_detection
import
minibatch_sampler
from
official.vision.
detection.
utils.object_detection
import
ops
from
official.vision.utils.object_detection
import
minibatch_sampler
from
official.vision.utils.object_detection
import
ops
class
BalancedPositiveNegativeSampler
(
minibatch_sampler
.
MinibatchSampler
):
...
...
official/vision/
detection/
utils/object_detection/box_coder.py
→
official/vision/utils/object_detection/box_coder.py
View file @
c57e975a
File moved
official/vision/
detection/
utils/object_detection/box_list.py
→
official/vision/utils/object_detection/box_list.py
View file @
c57e975a
File moved
official/vision/
detection/
utils/object_detection/box_list_ops.py
→
official/vision/utils/object_detection/box_list_ops.py
View file @
c57e975a
...
...
@@ -29,8 +29,8 @@ from __future__ import print_function
from
six.moves
import
range
import
tensorflow
as
tf
from
official.vision.
detection.
utils.object_detection
import
box_list
from
official.vision.
detection.
utils.object_detection
import
ops
from
official.vision.utils.object_detection
import
box_list
from
official.vision.utils.object_detection
import
ops
class
SortOrder
(
object
):
...
...
official/vision/
detection/
utils/object_detection/faster_rcnn_box_coder.py
→
official/vision/utils/object_detection/faster_rcnn_box_coder.py
View file @
c57e975a
...
...
@@ -29,8 +29,8 @@ Faster RCNN box coder follows the coding schema described below:
import
tensorflow
as
tf
from
official.vision.
detection.
utils.object_detection
import
box_coder
from
official.vision.
detection.
utils.object_detection
import
box_list
from
official.vision.utils.object_detection
import
box_coder
from
official.vision.utils.object_detection
import
box_list
EPSILON
=
1e-8
...
...
official/vision/
detection/
utils/object_detection/matcher.py
→
official/vision/utils/object_detection/matcher.py
View file @
c57e975a
File moved
official/vision/
detection/
utils/object_detection/minibatch_sampler.py
→
official/vision/utils/object_detection/minibatch_sampler.py
View file @
c57e975a
...
...
@@ -34,7 +34,7 @@ from abc import abstractmethod
import
tensorflow
as
tf
from
official.vision.
detection.
utils.object_detection
import
ops
from
official.vision.utils.object_detection
import
ops
class
MinibatchSampler
(
object
):
...
...
official/vision/
detection/
utils/object_detection/ops.py
→
official/vision/utils/object_detection/ops.py
View file @
c57e975a
...
...
@@ -19,7 +19,7 @@ This is originally implemented in TensorFlow Object Detection API.
import
tensorflow
as
tf
from
official.vision.
detection.
utils.object_detection
import
shape_utils
from
official.vision.utils.object_detection
import
shape_utils
def
indices_to_dense_vector
(
indices
,
...
...
Prev
1
…
10
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