Comments (3)
The label value of a bbox might be negative after preprocessing, meaning do-not-care. Such bboxes are ignored and won't contribute the loss when training.
from seglink.
The function of bboxes_filter_overlap is
with tf.name_scope(scope, 'bboxes_filter', [labels, bboxes]):
scores = bboxes_intersection(tf.constant([0, 0, 1, 1], bboxes.dtype),bboxes)
mask = scores > threshold
if assign_negative:
labels = tf.where(mask, labels, -labels)
else:
labels = tf.boolean_mask(labels, mask)
bboxes = tf.boolean_mask(bboxes, mask)
scores = bboxes_intersection(tf.constant([0, 0, 1, 1], bboxes.dtype),bboxes)
xs = tf.boolean_mask(xs, mask);
ys = tf.boolean_mask(ys, mask);
return labels, bboxes, xs, ys
The scores is used to filter out the bboxes.
But i see the code of bboxes_intersection
with tf.name_scope(name, 'bboxes_intersection'):
# Should be more efficient to first transpose.
bboxes = tf.transpose(bboxes)
bbox_ref = tf.transpose(bbox_ref)
# Intersection bbox and volume.
int_ymin = tf.maximum(bboxes[0], bbox_ref[0])
int_xmin = tf.maximum(bboxes[1], bbox_ref[1])
int_ymax = tf.minimum(bboxes[2], bbox_ref[2])
int_xmax = tf.minimum(bboxes[3], bbox_ref[3])
h = tf.maximum(int_ymax - int_ymin, 0.)
w = tf.maximum(int_xmax - int_xmin, 0.)
# Volumes.
inter_vol = h * w
bboxes_vol = (bboxes[2] - bboxes[0]) * (bboxes[3] - bboxes[1])
scores = tfe_math.safe_divide(inter_vol, bboxes_vol, 'intersection')
return scores
if the values in bboxes are postive, the scores should be 1.
some of bboxes with negative are filtered out, but some are not if the score is still larger than threshold.
But if the bboxes with negative mean do-not-care, what is the aim to filter out some of bboxes?
from seglink.
In preprocessing and data augmentation, the original images are randomly cropped, and the coordinate values of a bounding box might be negative, and then the scores in method bboxes_intersection
may be less than 1.0.
from seglink.
Related Issues (20)
- UnboundLocalError: local variable 'setproctitle' referenced before assignment HOT 3
- eval.sh waiting for checkpoint
- Meet a question. HOT 2
- How to train a new model only with pretrained VGG16? HOT 1
- ssd-caffe on coco
- tensorflow pretrained model
- pre trained model
- can i use this model to detect all texts from scanned document image/
- Please Share pretrained models
- detected bounding box slightly rotated to one direction HOT 1
- Error calculating the bbox after image cropping in preprocess? HOT 1
- About the test<(=╥﹏╥=)>
- loss is in [3,4],how can I do HOT 1
- Could anyone upload the pre-trained models on google drive/OneDrive? HOT 1
- the passed save_path is not a valid checkpoint :model.cpkt-136750
- the passed save_path is not a valid checkpoint :model.cpkt-136750
- No box
- The links for pretrained models are expired.
- Different output between .pb and .ckpt file
- 论文中conv6/7/8/9/10是conv+pool?代码里好像只有conv没有下采样
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from seglink.