-
Project Type: Object Detection
-
Operating System & Browser: Raspberry Pi 5, Raspberry Pi OS/MacOS, Chrome and Safari
-
Project Universe Link or Workspace/Project ID: https://universe.roboflow.com/science-research-ys1ki/large-dataset-drowning-detection
-
Do you grant Roboflow Support permission to access your Workspace for troubleshooting? (Yes/No): Yes
Hello! I’ve been following this tutorial ( Raspberry Pi (Legacy) | Roboflow Docs ) on how to perform inference on a single image on Raspberry Pi using Docker, but I keep getting this error when working with my custom model:
You have triggered an unhandledRejection, you may have forgotten to catch a Promise rejection:
TypeError: a.map is not a function
at t.<anonymous> (/inference-server/server/node_modules/roboflow-node/roboflow.js:2:81064)
at /inference-server/server/node_modules/roboflow-node/roboflow.js:2:79693
at Object.next (/inference-server/server/node_modules/roboflow-node/roboflow.js:2:79798)
at u (/inference-server/server/node_modules/roboflow-node/roboflow.js:2:78512)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
However, the whole system seems to work when I use the public construction site safety model by Roboflow (https://universe.roboflow.com/roboflow-universe-projects/construction-site-safety). I’m not sure if this is an issue with my specific model, especially because it seems that Docker is able to download the weights without an issue. Has anyone run into this before?
VSCode file:
from roboflow import Roboflow
rf = Roboflow(api_key="")
project = rf.workspace("science-research-ys1ki").project("large-dataset-drowning-detection")
model = project.version(2, local="http://localhost:9001/").model
#rf = Roboflow(api_key="")
#project = rf.workspace("roboflow-universe-projects").project("construction-site-safety")
#model = project.version(25, local="http://localhost:9001/").model
prediction = model.predict(
"drowningkidfromabovewater.jpg",
confidence=20,
overlap=30)
## get predictions on hosted images
#prediction = model.predict("YOUR_IMAGE.jpg", hosted=True)
data = prediction.json()
predictions = data.get("predictions") or []
print(predictions)
The code I use to start Docker:
sudo docker run --net=host roboflow/inference-server:cpu
Thanks!

