ASV notes on the Genesis 6:5-8
God saw the wickedness on earth performed by men, women and children, but the worst was that everyone had a pervert imagination and intent of thoughts deep in their hearts. When people are depraved in their way of thinking there is no way back to normal healthy way of reasoning. That is why the devil wants God away from schools and the upbringing of children. What we are thinking about, is leading our life. Concerning the people around Noah, they had gradually changed their mind and locked their thinking on the autopilot of the devil set on disaster.
God saw that the words of Noah did not get through to any of those who he preached to, so God decided to destroy mankind, because they were possessed by demonic thinking, but possession did not only occupy the humans but also animals and birds, only the maritime life seems not to be affected.
Noah and his family was accepted by God, they were not perfect but their intent and mind of their hearts was on God’s side so they were saved by grace, they were credited for what Jesus was going to do for them later.