We are talking about making an array with unique elements here. You cannot know the correct capacity for that without overallocating.
If overallocating is indeed OK for your usecase, then you can do so yourself
uniq := make([]MyObject, 0, len(my_objects))