On an overall scale, IIT Madras is better. It is an old IIT with a great placement record.
IIT Madras campus used to be a part of Guindy national park. Spotting deers, monkeys, wildcats, and blackbucks running around the campus is an everyday event.
One of my cousins graduated from IIT Kanpur and highly recommends it. Here are the advantages and disadvantages of IIT Kanpur.
You should remain updated with the latest trends followed by either institute and choose one after doing thorough research.