From r/AskHistorians
You are right in the sense that there was no conception of race as there was when the Atlantic Slave Trade began.
To start I would have to object a bit to how you framed your question. The Romans did not view the Persians, Libyans, and Celts the same so it would not be right to lump Black Africans into a category of essentially unlike things. We are talking about massive civilizations with both the Persians and the Carthaginians. Barbarian (Foreign) civilizations, but nonetheless civilized. The Celts however were the giant tribesmen to the north. Fierce, truly barbaric people half a foot taller than the average Roman.
What I think you are leaning to is the question: Were Blacks considered just another set of barbarians or were they considered less or more?
To this question I would say that we have no evidence of Blacks being considered sub-human in the time of the Romans. Contact with Africa outside of the Mediterranean was tenuous. It would be safe to assume that Blacks were viewed as lesser than the Greeks and Romans, but for no other reason than that they were not Greek or Roman.
There is not a ton of literature on the topic here's a bit of
further reading. It is kind of a painful read, but I figured I might put something explicitly academic to back me up.
----------------------------------------
'Race' as we understand it, is a modern construct that formed over the course of the modern period. It's a system of discourse that's very much historically situated in the experience of European colonialism, and in particular slavery, between 1500 and 1900. It wouldn't have existed to Romans.
Romans had their own ideas about classifying people based on their physical characteristics, cultural background, and parentage; it's not very rigorous to refer to those ideas using the word 'race.' A Roman for example wouldn't have grouped Gauls, Goths, and Latins together into a 'white race' that is binarily opposed to a Lybian 'black race,' for example.