'No Trespassing' signage is a must. I like the 'Baby On Board', too. I don't know if they are a deterrent or not, but you have communicated.
We have a large-medium sized dog that barks when someone approaches. She stays in the cockpit
and has free range of the decks. She is a big deterrent for up-to-no-gooders. A dog doesn't have to be vicious or prone to eating small children
to be a good watchdog. I worry sometimes that in a marina she might irritate other kind marina folks with her barking. No one ever seems to mind and we get a lot of "she's just doing her job".
About taking a photo
of the intruder... we took a photo
once of 2 young guys stealing another cruiser's dinghy
in La Paz
and it backfired. Guess what? They came back to our boat!! They didn't like the fact we took the photo... proof that would put them jail... at least here in Mexico
. Nearby cruisers came to the rescue
Last but not least, you have a deterrent that many of us do not...
Lob one of those bad boys in the face of a uninvited and I'll bet they leave... fast!... never to return!