Looks like your model expects 640x640 input size, while you are sending in 416. You can solve this by setting (i assume setPreviewSize function was used originally) previewSize to (640, 640).
When you convert the model using luxonis tools, you should have received a json file which has the necessary mask and anchor information.
I'm not sure about the IMU problem. Are you trying to obtain IMU data anywhere in the code?