Both are ok but proprietary and need frames to fit them. The Bafang BBS02 that is adaptable to almost all bike frames including fat bikes, legal 750w, can be run either PAS (although not as sophisticated), throttle or both with a non proprietary type battery will do everything either Bosch, Yamaha, Brose or any of the other mid drives being sold by the big manufacturers will at a much lower price. They have proven to be quite reliable if run at their recommended voltage also.
And NZPeter you are right that Yamaha made mid drives long ago. I had a Trek with one over 10 years ago. Panasonic had a similar drive but those systems, although robust, were limited by the battery technology of that time which matched with the 250w power restrictions of the EU made for a less than inspiring and short range ride. They did wet the appetite for what is on the plate these days however.
Like my BBS02, but it lacks a torque sensor the Bosch system incorporates. Accordingly, (FOR ME) the consequence is that tight uphill switchbacks are more difficult since I need to keep pedaling smoothly to get power from the BBS02, while with the Bosch the power keeps being generated as long as there is pressure on the pedals. Limited experience with the Yamaha, but I'll take the Bosch.
We have a brand new Giant Liv Rove with the Yamaha, which is back in the shop after less than 100 miles... the Giant diagnostic software can not see a problem so the shop has sent for new stuff from Giant which is, you guessed it, backordered.....