lars76 / object-localization

Object localization in images using simple CNNs and Keras
MIT License
137 stars 60 forks source link

Program getting terminated after a particular error #11

Open NamburiSrinath opened 5 years ago

NamburiSrinath commented 5 years ago

Hi Lars,

I have tried running the code on a dataset for 100 epochs. After around 50 epochs, the error reduced from 2000(initially) to 25 but it stopped suddenly. How many times I have tried, I end up with same result. I couldn't figure out why it is stopping in between.

Could you help me in resolving this issue?

The exact error is placed in a screenshot. It is saying the val_iou didn't improve from 0.

screenshot from 2019-02-09 20-08-47

Also, how to use GPU to run the python script. Currently it has multi-threading options which use CPU but I have a GPU supported system. How to change the access?

Thanks in advance lars Srinath

lars76 commented 5 years ago

Hi Srinath,

example_1 and example_2 are easy to understand, but will often produce really bad results. example_3 and example_4 are much better (even for single object recognition) since they are based on actual papers. For example, I used example_1 for OCR and also got bad results but with example_4 I obtained >85% IoU.

If you still want to use example_1, try setting trainable=True and/or adding some Conv2D layers. The screenshot you sent is actually showing that the network is improving. You can see that val_mse is initially 141 and then goes down to 120, but the improvements are not big enough.

If you configured TensorFlow correctly, the GPU will be used automatically. Check tf.test.is_gpu_available().

-- Lars