Chern-Simons-matter dualities with SO and USp gauge groups