Diodes to protect against a reverse voltage....a good idea.
The resistor size is going to depend on the amount of current needed throught the base of your h-bridge BJTs. You should find that out and then use Ohm's Law to figure out the rest.
I don't see any reason why the attached circuit won't work, except that you will need a resistor in series with the diode of the photocoupler in order to limit the current.
As for connecting the base of the photocoupler, there is no base connection on a photocoupler. The base is optically connected to the diode which is why it's a photocoupler. And, NC stands for No Connect so you don't want to connect that to anything.
I'm not sure what you're talking about with the inverter, but I don't see one anywhere.