Open sriniwaas opened 6 years ago
were u able to find a solution on this?
I have the same issue. Does anybody have a solution or idea?
@jennyzu @walterwang I don't see any normalization (with imagenet_mean
and imagenet_std
values) in cam.py
since transform_batch_images
is not called. I think due to this test.py and cam.py return different predictions for same images hence the box doesn't fit right on heatmap. As I understand this normalization is a part of input pipeline during training, so this function should be called in cam.py, too. When you include transform_batch_images
in cam.py
output will be correct heatmap so you'll get correct bounding box.
In addition to @Sadam1195 comment I am afraid there is a bug here https://github.com/brucechou1983/CheXNet-Keras/blob/master/cam.py#L54 and class_weights[index] should be replaced by class_weights[:, index] in order to sum across all last conv layer filters (1024) for a given index. You can see an example here https://github.com/jacobgil/keras-cam/blob/master/cam.py#L34
In addition to @Sadam1195 comment I am afraid there is a bug here https://github.com/brucechou1983/CheXNet-Keras/blob/master/cam.py#L54 and class_weights[index] should be replaced by class_weights[:, index] in order to sum across all last conv layer filters (1024) for a given index. You can see an example here https://github.com/jacobgil/keras-cam/blob/master/cam.py#L34
By adding class_weights[:, index] my final grad cam is weird
@brucechou1983 : After training, using cam.py, I am getting the predicted cam output and bounding box mismatch. Please help.