-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
For faster NMS #144
Comments
Yes. Thank you so much for the contribution! |
Hello naoe1999 I have tried to make the follow up on training through this repository, and tried to train res18 without 064.cpkt, and I found the training loss is not decreasing. Kindly please can you share with me your data.py and main.py files? |
This is part of main.py file I have changed def train(data_loader, net, loss, epoch, optimizer, get_lr, save_freq, save_dir):
Based on the above changes, as well in the layer.py file I have done changes at the following parts: def hard_mining(neg_output, neg_labels, num_hard): class Loss(nn.Module):
And in the data.py file, there are alot of int issues. |
Dear @SirMwan, I think the changes you have made ( .data to .item() ) have no problem. I guess some other changes have effected.
Thus, when you make change you have to review the code line by line. After those changes, my data.py has 20 "//"s, and split_combine.py has 2 "//"s. I hope it helps. |
Dear @naoe1999 Kindly help me to cross check the lines I have changed here below: In changes I put # then number of changes class DataBowl3Detector(Dataset): .....
def len(self): .......
.....
|
Then, when I am trying to visualize images with bounding boxes after prepare.py (preprocessing):-
|
Dear @SirMwan , I checked it as below : #1 ~ #2: #9: int(len(self.bboxes) / (1 - self.r_rand)) # this would be as intended without any error or warning. #10: I didn't change this. "s" and "e" will be int by the following lines. : r = target[3] / 2 #11 ~ #14: OK Not-displaying image problem can happen by a bunch of reasons. You'd better look into the values in those images. |
Dear @naoe1999 Then let me ask this last question. In the model res18, there is "two MaxUnpool layers" but no where have been used in the code. self.unmaxpool1 = nn.MaxUnpool3d(kernel_size=2,stride=2) Thank you very much. |
Dear @SirMwan, Congrats!!! Pleasure to hear it's going well. For your question of self.unmaxpool1 ..., I didn't find its usage either. |
I also encountered the same problem, can you share your code with me: [email protected], thank you very much |
1 similar comment
I also encountered the same problem, can you share your code with me: [email protected], thank you very much |
First, thank you for your code sharing, it helps me a lot.
To make your code even better, I would like to suggest much faster NMS code below.
This code is to replace both nms() and iou() functions.
I referred to the nms algorithm by "Malisiewicz et al", and modified it to fit LUNA16's 3d data format.
Speed acceleration is achieved by:
limiting maximum number of candidates before nms (to 3000 for example). This is extremely helpful when detector is not trained enough as it is producing millions of predictions over the certain threshold (such as -0.5). This would not be happening when the detector is properly trained.
removing inner loop and utilizing numpy vectorization. You know the numpy vectorization is much much faster than python iteration loop.
The text was updated successfully, but these errors were encountered: