Comments (2)
The random crop algorithm is inconsiderate. There could be no valid targets in its output. To fix this bug, modify the random crop code part or add some post processing code to loss calculating.
I simply added some post processing code. If there is no valid targets in an images, the offset loss and size loss shall be zero, the keypoints loss could be calculated the same way by avoiding division by zero.
random crop部分的数据增强代码有问题,会crop出没有valid targets的图片,修改这一部分的代码或者在计算loss时加入后处理。即使图片中没有valid targets,loss也是可以计算的,将size loss和offset loss设置为0,在计算keypoints loss时避免除0
Centernet.py line 207:
offset_loss = tf.reduce_mean(tf.abs(offset_gt - offset))
size_loss = tf.reduce_mean(tf.abs(size_gt - size))
offset_loss = tf.cond(tf.cast(slice_index, tf.bool), lambda: offset_loss, lambda: tf.zeros_like(offset_loss, tf.float32))
size_loss = tf.cond(tf.cast(slice_index, tf.bool), lambda: size_loss, lambda: tf.zeros_like(size_loss, tf.float32))
Centernet.py line 250:
num_g = tf.maximum(num_g, tf.ones_like(num_g, dtype=tf.int32))
keypoints_loss = tf.reduce_sum(keypoints_pos_loss) / tf.cast(num_g, tf.float32) + tf.reduce_sum(keypoints_neg_loss) / tf.cast(num_g, tf.float32)
from centernet-tensorflow.
training VOC2007 model, result is good
but i change the dataset, image set have one class, 950 images,
when training, the result 4~5 iters the loss is nan, i check the dataset no problem, and change the learning rate and batch_size, but can't help to loss, always loss nan, has anyone met it before? how can i fixed it? thx
yes, me too.
how are you now?
from centernet-tensorflow.
Related Issues (20)
- Grond truth calculation HOT 4
- Not good results HOT 4
- What is the mean of "pad_truth_to" please? HOT 4
- loss nan HOT 1
- I didn't understand this line, could you help me? If the shape of the ground_truth was [-1, 5], the operation of "tf.argmin(ground_truth, axis=0)[0]" got the minimum of y? HOT 2
- when executing under ubuntu import error HOT 4
- Pre trained weights HOT 5
- When I was using estimator with your model, Global step not increased,always was 0. HOT 12
- 442368 =384*384*3 Invalid argument: Input to reshape is a tensor with 442368 values, HOT 3
- Find output tensor name. HOT 3
- SparseTensor Error! Indices are not valid (out of bounds) HOT 1
- Training on COCO dataset HOT 2
- Specific conv bias init value (-2.19) for the keypoints in author's pytorch code. Line 132 in your code. HOT 3
- run extremely SLOW HOT 2
- Train more than 100 epochs on VOC 0712 but not convergent HOT 1
- Train on my own data,loss always NAN HOT 13
- Focal loss HOT 2
- How about the performance of you net? HOT 1
- Pose estimation HOT 3
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 centernet-tensorflow.