Msc in popular field in less reputed university or not so popular field but in well recognized school Suppose someone can decide between:

doing a Master in a university that has low rank but has one very active Prof in Machine Learning for example where there are good number of PhD positions to apply for.

or

Attending a good rank school with multiple Profs doing research in almost all fields of Computer Architecture where there are not so many PhD positions available for.

If the goal is to apply for PhD in a good school after finishing Msc (in US or Canada), which one of these choices can help applicant's application better.
Just to make a question more general, for applying PhD in computer science which factor is more important, reputation of the previously attended university Or research done (quality and number of published papers) not considering the school?
A Master's should demonstrate a broad understanding, which goes beyond Machine Learning / Computer Vision. You need multiple Profs, not just one.
Rankings are subjective, but a well-ranked university is likely better than a low-ranked one.
So, (2) is better than (1), IMO.
That said, these surely aren't your only options: Perhaps look for a leading institute with excellent professors.