Verbs that form their compound tenses with avoir can have a direct object. If this direct object stands before the participle, the participle is inflicted according to gender and number of this direct object.
Examples
L'
homme que tu as vu est
mon copain.
The man that you have seen is my friend.
Les
hommes que tu as vus sont
mes copains.
The men that you have seen are my friends.
La femme
que tu a vue est
ma copine.
The woman that you have seen is my friend.
Les
femmes que tu as vues sont
mes copines.
The women that you have seen are my friends.
The devil is - as always - in the detail, which means that it might sometimes be difficult to recognize the direct object, because it can appear with many different faces.