matthewearl / deep-anpr

Using neural networks to build an automatic number plate recognition system
MIT License
1.84k stars 698 forks source link

not able to obtain pixel coordinates, the window coordinates #68

Open DIpakbhagat26 opened 7 years ago

DIpakbhagat26 commented 7 years ago

Hi, I am a newbie, I have trained my model. and Now I am executing the detect.py code. It doesn't give me any output as you mentioned in your blog. Like it will highlight the number plate and will tell the predicted plate number. when I traced the code I found that this part of the code is not even executing. I tried to put some print statement under that function but no print I am able to see. Under detect function

    for i, (scaled_im, y_val) in enumerate(zip(scaled_ims, y_vals)):
        print("1st for")
        for window_coords in numpy.argwhere(y_val[0, :, :, 0] > -math.log(1./0.99 - 1)):
            print ("gggg")
            letter_probs = (y_val[0,
                              window_coords[0],
                              window_coords[1], 1:].reshape(
                                7, len(common.CHARS)))
            letter_probs = common.softmax(letter_probs)
            print(letter_probs)

            img_scale = float(im.shape[0]) / scaled_im.shape[0]

            bbox_tl = window_coords * (8, 4) * img_scale
            bbox_size = numpy.array(model.WINDOW_SHAPE) * img_scale

            present_prob = common.sigmoid(
                           y_val[0, window_coords[0], window_coords[1], 0])

            yield bbox_tl, bbox_tl + bbox_size, present_prob, letter_probs
            print(bbox_tl)

I am able to print("1st for") but in the next for loop I am not able to see any print.

please help me I in big trouble.

Thank You. Dipak Kumar dipakbhagat26@gmail.com

nuh-sikander commented 6 years ago

Same here. Were you able to bypass this point? @DIpakbhagat26