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
9cd7a576
Commit
9cd7a576
authored
Nov 15, 2021
by
Yeqing Li
Committed by
A. Unique TensorFlower
Nov 15, 2021
Browse files
Internal change
PiperOrigin-RevId: 410121249
parent
4151365b
Changes
21
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
39 additions
and
27 deletions
+39
-27
official/vision/beta/ops/anchor.py
official/vision/beta/ops/anchor.py
+3
-3
official/vision/detection/dataloader/anchor.py
official/vision/detection/dataloader/anchor.py
+5
-5
official/vision/detection/executor/detection_executor.py
official/vision/detection/executor/detection_executor.py
+1
-1
official/vision/detection/ops/target_ops.py
official/vision/detection/ops/target_ops.py
+1
-1
official/vision/detection/utils/input_utils.py
official/vision/detection/utils/input_utils.py
+1
-1
official/vision/utils/__init__.py
official/vision/utils/__init__.py
+0
-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
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
No files found.
official/vision/beta/ops/anchor.py
View file @
9cd7a576
...
@@ -24,9 +24,9 @@ from official.vision.beta.ops import anchor_generator
...
@@ -24,9 +24,9 @@ from official.vision.beta.ops import anchor_generator
from
official.vision.beta.ops
import
box_matcher
from
official.vision.beta.ops
import
box_matcher
from
official.vision.beta.ops
import
iou_similarity
from
official.vision.beta.ops
import
iou_similarity
from
official.vision.beta.ops
import
target_gather
from
official.vision.beta.ops
import
target_gather
from
official.vision.
detection.
utils.object_detection
import
balanced_positive_negative_sampler
from
official.vision.utils.object_detection
import
balanced_positive_negative_sampler
from
official.vision.
detection.
utils.object_detection
import
box_list
from
official.vision.utils.object_detection
import
box_list
from
official.vision.
detection.
utils.object_detection
import
faster_rcnn_box_coder
from
official.vision.utils.object_detection
import
faster_rcnn_box_coder
class
Anchor
(
object
):
class
Anchor
(
object
):
...
...
official/vision/detection/dataloader/anchor.py
View file @
9cd7a576
...
@@ -23,11 +23,11 @@ import collections
...
@@ -23,11 +23,11 @@ import collections
import
tensorflow
as
tf
import
tensorflow
as
tf
from
official.vision.beta.ops
import
iou_similarity
from
official.vision.beta.ops
import
iou_similarity
from
official.vision.detection.utils
import
box_utils
from
official.vision.detection.utils
import
box_utils
from
official.vision.
detection.
utils.object_detection
import
argmax_matcher
from
official.vision.utils.object_detection
import
argmax_matcher
from
official.vision.
detection.
utils.object_detection
import
balanced_positive_negative_sampler
from
official.vision.utils.object_detection
import
balanced_positive_negative_sampler
from
official.vision.
detection.
utils.object_detection
import
box_list
from
official.vision.utils.object_detection
import
box_list
from
official.vision.
detection.
utils.object_detection
import
faster_rcnn_box_coder
from
official.vision.utils.object_detection
import
faster_rcnn_box_coder
from
official.vision.
detection.
utils.object_detection
import
target_assigner
from
official.vision.utils.object_detection
import
target_assigner
class
Anchor
(
object
):
class
Anchor
(
object
):
...
...
official/vision/detection/executor/detection_executor.py
View file @
9cd7a576
...
@@ -22,7 +22,7 @@ from absl import logging
...
@@ -22,7 +22,7 @@ from absl import logging
import
tensorflow
as
tf
import
tensorflow
as
tf
from
official.vision.detection.executor
import
distributed_executor
as
executor
from
official.vision.detection.executor
import
distributed_executor
as
executor
from
official.vision.
detection.
utils.object_detection
import
visualization_utils
from
official.vision.utils.object_detection
import
visualization_utils
class
DetectionDistributedExecutor
(
executor
.
DistributedExecutor
):
class
DetectionDistributedExecutor
(
executor
.
DistributedExecutor
):
...
...
official/vision/detection/ops/target_ops.py
View file @
9cd7a576
...
@@ -22,7 +22,7 @@ import tensorflow as tf
...
@@ -22,7 +22,7 @@ import tensorflow as tf
from
official.vision.detection.ops
import
spatial_transform_ops
from
official.vision.detection.ops
import
spatial_transform_ops
from
official.vision.detection.utils
import
box_utils
from
official.vision.detection.utils
import
box_utils
from
official.vision.
detection.
utils.object_detection
import
balanced_positive_negative_sampler
from
official.vision.utils.object_detection
import
balanced_positive_negative_sampler
def
box_matching
(
boxes
,
gt_boxes
,
gt_classes
):
def
box_matching
(
boxes
,
gt_boxes
,
gt_classes
):
...
...
official/vision/detection/utils/input_utils.py
View file @
9cd7a576
...
@@ -19,7 +19,7 @@ import math
...
@@ -19,7 +19,7 @@ import math
import
tensorflow
as
tf
import
tensorflow
as
tf
from
official.vision.detection.utils
import
box_utils
from
official.vision.detection.utils
import
box_utils
from
official.vision.
detection.
utils.object_detection
import
preprocessor
from
official.vision.utils.object_detection
import
preprocessor
def
pad_to_fixed_size
(
input_tensor
,
size
,
constant_values
=
0
):
def
pad_to_fixed_size
(
input_tensor
,
size
,
constant_values
=
0
):
...
...
official/vision/
detection/utils/object_detection
/__init__.py
→
official/vision/
utils
/__init__.py
View file @
9cd7a576
File moved
official/vision/utils/object_detection/__init__.py
0 → 100644
View file @
9cd7a576
# 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 @
9cd7a576
...
@@ -28,8 +28,8 @@ factory function for popular implementations.
...
@@ -28,8 +28,8 @@ factory function for popular implementations.
"""
"""
import
tensorflow
as
tf
import
tensorflow
as
tf
from
official.vision.
detection.
utils.object_detection
import
matcher
from
official.vision.utils.object_detection
import
matcher
from
official.vision.
detection.
utils.object_detection
import
shape_utils
from
official.vision.utils.object_detection
import
shape_utils
class
ArgMaxMatcher
(
matcher
.
Matcher
):
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 @
9cd7a576
...
@@ -33,8 +33,8 @@ This is originally implemented in TensorFlow Object Detection API.
...
@@ -33,8 +33,8 @@ This is originally implemented in TensorFlow Object Detection API.
import
tensorflow
as
tf
import
tensorflow
as
tf
from
official.vision.
detection.
utils.object_detection
import
minibatch_sampler
from
official.vision.utils.object_detection
import
minibatch_sampler
from
official.vision.
detection.
utils.object_detection
import
ops
from
official.vision.utils.object_detection
import
ops
class
BalancedPositiveNegativeSampler
(
minibatch_sampler
.
MinibatchSampler
):
class
BalancedPositiveNegativeSampler
(
minibatch_sampler
.
MinibatchSampler
):
...
...
official/vision/
detection/
utils/object_detection/box_coder.py
→
official/vision/utils/object_detection/box_coder.py
View file @
9cd7a576
File moved
official/vision/
detection/
utils/object_detection/box_list.py
→
official/vision/utils/object_detection/box_list.py
View file @
9cd7a576
File moved
official/vision/
detection/
utils/object_detection/box_list_ops.py
→
official/vision/utils/object_detection/box_list_ops.py
View file @
9cd7a576
...
@@ -29,8 +29,8 @@ from __future__ import print_function
...
@@ -29,8 +29,8 @@ from __future__ import print_function
from
six.moves
import
range
from
six.moves
import
range
import
tensorflow
as
tf
import
tensorflow
as
tf
from
official.vision.
detection.
utils.object_detection
import
box_list
from
official.vision.utils.object_detection
import
box_list
from
official.vision.
detection.
utils.object_detection
import
ops
from
official.vision.utils.object_detection
import
ops
class
SortOrder
(
object
):
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 @
9cd7a576
...
@@ -29,8 +29,8 @@ Faster RCNN box coder follows the coding schema described below:
...
@@ -29,8 +29,8 @@ Faster RCNN box coder follows the coding schema described below:
import
tensorflow
as
tf
import
tensorflow
as
tf
from
official.vision.
detection.
utils.object_detection
import
box_coder
from
official.vision.utils.object_detection
import
box_coder
from
official.vision.
detection.
utils.object_detection
import
box_list
from
official.vision.utils.object_detection
import
box_list
EPSILON
=
1e-8
EPSILON
=
1e-8
...
...
official/vision/
detection/
utils/object_detection/matcher.py
→
official/vision/utils/object_detection/matcher.py
View file @
9cd7a576
File moved
official/vision/
detection/
utils/object_detection/minibatch_sampler.py
→
official/vision/utils/object_detection/minibatch_sampler.py
View file @
9cd7a576
...
@@ -34,7 +34,7 @@ from abc import abstractmethod
...
@@ -34,7 +34,7 @@ from abc import abstractmethod
import
tensorflow
as
tf
import
tensorflow
as
tf
from
official.vision.
detection.
utils.object_detection
import
ops
from
official.vision.utils.object_detection
import
ops
class
MinibatchSampler
(
object
):
class
MinibatchSampler
(
object
):
...
...
official/vision/
detection/
utils/object_detection/ops.py
→
official/vision/utils/object_detection/ops.py
View file @
9cd7a576
...
@@ -19,7 +19,7 @@ This is originally implemented in TensorFlow Object Detection API.
...
@@ -19,7 +19,7 @@ This is originally implemented in TensorFlow Object Detection API.
import
tensorflow
as
tf
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
,
def
indices_to_dense_vector
(
indices
,
...
...
official/vision/
detection/
utils/object_detection/preprocessor.py
→
official/vision/utils/object_detection/preprocessor.py
View file @
9cd7a576
...
@@ -39,11 +39,9 @@ we pass it to the functions. At the end of the preprocess we expand the image
...
@@ -39,11 +39,9 @@ we pass it to the functions. At the end of the preprocess we expand the image
back to rank 4.
back to rank 4.
"""
"""
import
tensorflow
as
tf
import
numpy
as
np
import
numpy
as
np
import
tensorflow
as
tf
from
official.vision.
detection.
utils.object_detection
import
box_list
from
official.vision.utils.object_detection
import
box_list
def
_flip_boxes_left_right
(
boxes
):
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 @
9cd7a576
File moved
official/vision/
detection/
utils/object_detection/shape_utils.py
→
official/vision/utils/object_detection/shape_utils.py
View file @
9cd7a576
File moved
official/vision/
detection/
utils/object_detection/target_assigner.py
→
official/vision/utils/object_detection/target_assigner.py
View file @
9cd7a576
...
@@ -33,8 +33,8 @@ images must be handled externally.
...
@@ -33,8 +33,8 @@ images must be handled externally.
import
tensorflow
as
tf
import
tensorflow
as
tf
from
official.vision.
detection.
utils.object_detection
import
box_list
from
official.vision.utils.object_detection
import
box_list
from
official.vision.
detection.
utils.object_detection
import
shape_utils
from
official.vision.utils.object_detection
import
shape_utils
KEYPOINTS_FIELD_NAME
=
'keypoints'
KEYPOINTS_FIELD_NAME
=
'keypoints'
...
...
Prev
1
2
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