# No predictions when running my trained model on OAK devices

**URL:** <https://discuss.roboflow.com/t/no-predictions-when-running-my-trained-model-on-oak-devices/2809>\
**Category:** 🤝  Community Help\
**Created:** [July 30, 2023, 10:22pm UTC](https://discuss.roboflow.com/t/no-predictions-when-running-my-trained-model-on-oak-devices/2809 "2023-07-30T22:22:36Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![KoKonutZzz](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/kokonutzzz/32/2511_2.png) [@KoKonutZzz](https://discuss.roboflow.com/u/KoKonutZzz)\
**Post date:** [July 30, 2023, 10:22pm UTC](https://discuss.roboflow.com/t/no-predictions-when-running-my-trained-model-on-oak-devices/2809/1 "2023-07-30T22:22:36Z")

</div>

Hi all,

I’ve trained an object detection model for measuring if the dirt is overflowing or not in a truck’s bucket at a construction site. However, it shows empty predictions all the time when running this model on my oak-d s2/oak-d lite device. I double-checked many times, packages are all installed, but still not sure what’s going on.

This is me code block, which is just like how it recommends to do:

```auto
from roboflowoak import RoboflowOak
import cv2
import time
import numpy as np

if __name__ == ' __main__':
    # instantiating an object (rf) with the RoboflowOak module
    rf = RoboflowOak(model="dirt-overflowing", confidence=0.05, overlap=0.5,
    version="2", api_key=" *******", rgb=True,
    depth=False, device=None, blocking=True)
    # Running our model and displaying the video output with detections
    while True:
        t0 = time.time()
        # The rf.detect() function runs the model inference
        result, frame, raw_frame, depth = rf.detect()
        predictions = result["predictions"]
        #{
        # predictions:
        # [ {
        # x: (middle),
        # y:(middle),
        # width:
        # height:
        # depth: ###->
        # confidence:
        # class:
        # mask: {
        # ]
        #}
        #frame - frame after preprocs, with predictions
        #raw_frame - original frame from your OAK
        #depth - depth map for raw_frame, center-rectified to the center camera

        # timing: for benchmarking purposes
        t = time.time()-t0
        print("INFERENCE TIME IN MS ", 1/t)
        print("PREDICTIONS ", [p.json() for p in predictions])

        # setting parameters for depth calculation
        # max_depth = np.amax(depth)
        # cv2.imshow("depth", depth/max_depth)
        # displaying the video feed as successive frames
        cv2.imshow("frame", frame)

        # how to close the OAK inference window / stop inference: CTRL+q or CTRL+c
        if cv2.waitKey(1) == ord('q'):
            break

```

Not sure if it is caused by a simple factor, or I encounter some critical technical problem as I am just a newbie about this. Appreciate it if you could have any ideas 🙂

Many thanks,  
Austin

---

<div class="post-metadata">

**Author:** ![KoKonutZzz](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/kokonutzzz/32/2511_2.png) [@KoKonutZzz](https://discuss.roboflow.com/u/KoKonutZzz)\
**Post date:** [July 30, 2023, 10:26pm UTC](https://discuss.roboflow.com/t/no-predictions-when-running-my-trained-model-on-oak-devices/2809/3 "2023-07-30T22:26:35Z")

</div>

![Screen Shot 2023-07-31 at 10.25.32 AM](https://canada1.discourse-cdn.com/flex029/uploads/roboflow1/original/2X/5/59bd578e661193ad5c22c8a43f1a53af445f1e53.png)  
And this is a screenshot for this case.

---

<div class="post-metadata">

**Author:** ![Ghulam\_Ali](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/ghulam_ali/32/2556_2.png) [@Ghulam\_Ali](https://discuss.roboflow.com/u/Ghulam_Ali)\
**Post date:** [August 5, 2023, 5:37am UTC](https://discuss.roboflow.com/t/no-predictions-when-running-my-trained-model-on-oak-devices/2809/4 "2023-08-05T05:37:01Z")

</div>

Did you find any solution? I am also facing the same problem.

---

<div class="post-metadata">

**Author:** ![KoKonutZzz](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/kokonutzzz/32/2511_2.png) [@KoKonutZzz](https://discuss.roboflow.com/u/KoKonutZzz)\
**Post date:** [August 6, 2023, 10:16pm UTC](https://discuss.roboflow.com/t/no-predictions-when-running-my-trained-model-on-oak-devices/2809/5 "2023-08-06T22:16:42Z")

</div>

Not yet, they told me to update the package but still failed running.

---

<div class="post-metadata">

**Author:** ![leo](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/leo/32/2228_2.png) [@leo](https://discuss.roboflow.com/u/leo)\
**Post date:** [August 7, 2023, 11:34pm UTC](https://discuss.roboflow.com/t/no-predictions-when-running-my-trained-model-on-oak-devices/2809/6 "2023-08-07T23:34:02Z")

</div>

@KoKonutZzz @Ghulam_Ali

> [@Luxonis OAK-D Lite Deployment Failure](https://discuss.roboflow.com/t/luxonis-oak-d-lite-deployment-failure/2874/2):
>
> We believe the issue was caused by a breaking change to the Depthai API. We have pushed v0.0.12 to PyPi which uses the updated API. You can update with `pip install roboflowoak==0.0.12`.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex029/uploads/roboflow1/original/1X/bb6edbfa56d0cf2ee603f061e9e09103502cc8cc.png) [@system](https://discuss.roboflow.com/u/system)\
**Post date:** [August 14, 2023, 11:34pm UTC](https://discuss.roboflow.com/t/no-predictions-when-running-my-trained-model-on-oak-devices/2809/7 "2023-08-14T23:34:31Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
