0
$\begingroup$

I'm relatively new to Deep Learning, and trying various models and datasets using Keras. I'm starting to love it!

Through-out my experimentations, I have come into some semantic questions that I don't know how they can affect the overall accuracy of my trained model. My target application is fire detection in videos (fire vs non-fire). So I'm trying to get tips and tricks from those well experienced on Deep learning, and here are my semantic questions:

  1. Given that I have to do detection on videos, I've been mostly adding actuall frames of videos to my dataset, and less photos. Does adding photos from Google ever help (as we largen our dataset) or it's actually more considered noises and shall be removed?

  2. I've trained a deep model (ResNet50) as well as a shallow 5-layer model. I realized the ResNet50 model is more sensitive and has a high recall (all fires are definitely detected), but has false positives as well (strong source of lights like sunlight or lamps are identified as fire). While the shallower model is 10x faster, it can miss fires if it is smaller in the image, so it's less sensitive. But also has low false positives. Is it always true? So what are techniques and tips to fix these issues in each of these models?

For instance, the shallow model doesn't see this fire. Shall I think it's not complex enough to work well when the scene has many objects inside?

enter image description here

  1. The sample code I saw resizes photos to 256x256 for training. What's the effect of bigger sizes vs smaller ones say 300x300? Can I expect while bigger sizes increase computation time, they provide higher accuracy?

  2. The sample code also converts photos to grayscale and uses Antialiasing before passing. Does it have good effects? What if I pass the colored version as fire is mostly about colors?

  3. When I see the model is doing bad on certain scenes (say those sun lights or lamps), I take multiple of those frames and add them to my non-fire dataset. Does it have any positive effects and being taken care of? And is it better to add multiple successive frames or just one frame is enough?

  4. My fire dataset has 1800 images and my non-fire dataset has 4500 images. As a rule of thumb, the bigger each class, the better? Of course the non-fire data should be bigger, but we can not add whatever on earth as non-fire so what should be the distribution of the sizes?

| improve this question | | | | |
$\endgroup$
  • $\begingroup$ Hi Tina. You're asking too many questions on this post. You should try asking one question per post. See meta.stackexchange.com/a/39224/287113. $\endgroup$ – nbro Nov 21 '19 at 23:18
  • $\begingroup$ @nbro no they are all semantically related and are essentially one thing. I'm sure if this get a proper answer, it will end up being a very popular post! $\endgroup$ – Tina J Nov 21 '19 at 23:30
  • $\begingroup$ If they are essentially one thing, then ask just one question. However, I really think you're asking multiple distinct questions here. $\endgroup$ – nbro Nov 23 '19 at 15:57
2
$\begingroup$

I try to answer the things I know for sure:

  1. One effect of bigger images is the increasing computation time due to more pixels (input to your training)

4.Grayscaling reduces the information, which might decrease training time, but also model performance (accuracy, precision, recall). What I have seen is that grayscaling is used in for example face detection where structural information (shapes) is important and colors can be regarded as secondary. For your example you have to determine whether such structural differences between positives and negatives exist and if color is a valuable information.

  1. If possible, I would somehow alter these copies by clipping the objects (sun lights, lamps) and rotate, scale, make them transparent etc.

  2. In the end your training data should be representative of the data it should generalize to. If you would for example take my user icon as an additional non fire example, this wouldn't help your cause.

| improve this answer | | | | |
$\endgroup$
  • $\begingroup$ For 5, you mean keep multiple frames and plus, multiple each by keeping altered copies? $\endgroup$ – Tina J Nov 23 '19 at 19:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.