The Japanese converted a large number of merchant vessels into gunboats and patrol ships. Given the reluctance of the IJN to give up it's destoyers and frigates for ASW duties, there simply weren't enough purpose built escort vessels available to meet the growing demand. Armament would vary from 2 to 4 small guns, like 3-inchers, and some light AA. It's possible that they were equipped with sub detection devices. I've read that the Japanese produced a hydrophone that was designed for installation into a merchant ship hull. Some of them appear to have carried depth charges, but whether that capability was any more advanced than a provision for dumping them over the side is hard to say. I doubt if the Japanese ever thought of these vessels as Q-ships, as no attempt was made to hide their aramament from view. They were converted mostly just to fend off an easy surface attack by a submarine or PT-Boat and to provide a modicum of air defense.
Throughout the war, the Japanese mounted depth charges on the most unlikely platforms. Even the carrier Unryu was armed with 30 depth charges, which would have been almost unthinkable for an Allied carrier.
Here's a model from a Japanese site of what one of these converted marus would have looked like. Not too different from the Grenfell sketch above.