Is it a sin if someone leaves his money on the ground and I spent it after not knowing who the owner of the money was?

If you were confident that the original owner would not come back to find it, and you do not know who the owner is, then you can take it. But if you know who the owner is you must give it back to the owner