Well when we had that problem with a neighborhood dog I just watched and finally found out who's dog it was and then I cleaned up the mess and took it to their house and placed it on their porch and rang the doorbell. Then when they answered I said in a very nice manner...
"Excuse me...but while you were walking your dog you left something of your dog's in front of my home. I just wanted to let you know that I was returning it to it's rightful owner and I placed it right here for you so it wouldn't get taken"
whats funny is that neighbor and I have become great friends since then and have never had a problem since then....(maybe the thought of me taking all of my Husky's (the one's I had back then) over to his house to "doo" their duty" in his yard he probably figured it would be a battle he would end up losing!