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
incorrect tiny_yolov2 predictions #6730
Comments
do I understand correctly that you use your imported model here, too? just want to narrow down the source of error. |
Yes |
@sjaiswal25
how does that compare to your single example? if you build a mini-batch of examples from your working example, does it suddenly fail? |
@maxpumperla I have not checked that. I will check and get back to you. |
@maxpumperla Following are the outputs you had asked for: Also, if I give getPredictedObjects a minibatch of examples, it doesnot fail. |
@sjaiswal25 thanks, I'd need to look closer into this. @saudet have you encounter this or have a clue what might be going on? you've been worker closer on the actual yolo implementation. |
This stands out as an important detail. |
So I started to look at this, and I can't work out how to run your code using the provided trained weights. I assume these weights are the original darknet weights? |
@AlexDBlack I've attached the model links. please have a look into it. |
@sjaiswal25 thanks. I'll take a look and will post here once I've worked out what's happening. |
@sjaiswal25 so I still can't make any progress at all debugging this Can you please provide a complete example I can run (perhaps adapted from my gist above if that helps) along with at least one test image/file to reproduce this? Also post your DL4J/ND4J version, backend used, and GPU (if applicable). |
@AlexDBlack The network is trained for pedestrian detection only.I will also share link to one of the videos we have tested it on. Please find the link below: The same model was tested on single image with the link to the codes below: The gpu that is being used is nvidia gtx 1050Ti. |
@sjaiswal25 OK, I was finally able to reproduce this problem on 1.0.0-beta3 using a modified version of your code/models/data |
@sjaiswal25 So, it wasn't exactly what I thought, but it is fixed here: #6774 A workaround that should work for 1.0.0-beta3 is to add an As for what was happening here: in simple terms, a race condition between asynchronous CUDA execution of normalization (CUDA op execution is tied to specific threads) and passing the input array between threads. That's why it was PI + CUDA only. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I have trained a custom pedestrian detection tiny_yolov2 model using the instructions provided in https://github.com/AlexeyAB/darknet/tree/47c7af1cea5bbdedf1184963355e6418cb8b1b4f#how-to-train-pascal-voc-data
The model configuration file can be found in the link : https://gist.github.com/sjaiswal25/df6c1b6b0a87f3cab8e663d22c8fb771 .
The weights are then converted to keras weights using the information provided in here : https://github.com/allanzelener/YAD2K.
I used the keras weight to create a .zip file using the code in the link https://gist.github.com/sjaiswal25/fb3c0eb1fcb425856dfa4c5b479b4c28
When I try to use the converted model with the parallel inference framework as in the code here: https://gist.github.com/sjaiswal25/06ab93868542212d0c07e8a9e8e264ed ,
the output of the getpredictedobjects method is weird: DetectedObject(exampleNumber=0, centerX=0.8525803685188293, centerY=4.001579834730364, width=0.6479467153549194, height=89.76138305664062,...).
Since the input to the model is a 224x224 image, it will result in output predictions of dimension 7x7x30.Hence, it is must that the height cannot be greater than 7.
What could be the cause to this behaviour? Also, I have tried using the same model. weights with python and there are no issues there. I guess I am missing out on something.
Also I would like to bring to your knowledge that if i use my model with the computationalgraph.outputsingle method followed by the yoloutils.getpredicted objects on a single image, this problem doesnot persist, and the results are absolutely ok.
The link to my trained weights : https://drive.google.com/file/d/1qkOwZccVFeZ73jvYVVBPcbnadlX77vSg/view?usp=sharing
The text was updated successfully, but these errors were encountered: