<p>That's a fascinating project, but I'm not sure it's possible on a DJI drone. The firmware is closed source and not designed for easy modification.</p>
<p>I don't know if it's possible to replace the DJI firmware with an open source project like <a href="https://github.com/iNavFlight/inav" rel="nofollow noreferrer">iNav</a> or if you would need to build a new drone from scratch around an iNav capable flight controller.</p>
<p>You might also find that you need a more powerful processor to run real-time image analysis.</p>

CC BY-SA 4.0
2021-04-28T08:13:37.420Z
2021-04-28T08:13:37.420Z
Robin Bennett
<p>It is possible to do so.</p>
<p>Check this API <a href="https://developer.dji.com/onboard-api-reference/index.html" rel="nofollow noreferrer">reference</a>. They also provide this <a href="https://developer.dji.com/windows-sdk/" rel="nofollow noreferrer">Windows SDK</a> which can be of use to your needs. My experience is with an on-board SDK which I used to avoid objects using a custom ultrasonic transceiver. Knowing how popular python is I assume there is some C++ wrapper somewhere which can translate C++ functions to python somehow, but more research should be done here.</p>

CC BY-SA 4.0
2021-04-29T08:54:59.950Z
2021-04-29T08:54:59.950Z
andrew
<p>I have developed a model in python (pytorch)  for detecting specific kind of objects,
Now I'd  like to embed and load this model into the my DJI Mavic 2 pro,
According to posts I understand I need to to write code on the drone which should be c++,
Is there any suggestions how can I start capturing live footage and pass those frames into the model?</p>
<p>Any helpful resources/examples/github repos will be helpful</p>

CC BY-SA 4.0
2022-02-22T20:28:00.260Z
Were you able to achieve this? I am looking at using the Windows SDK as mentioned by @andrew
Chris Lang
<software><video><photography><dji-mavic-air-2>
Implementing object detection in DJI Mavic 2 pro in real time
JammingThebBits
# Implementing object detection in DJI Mavic 2 pro in real time

(Asked by: username_0 on 2021-04-26)

I have developed a model in python (pytorch) for detecting specific kind of objects,
Now I'd like to embed and load this model into the my DJI Mavic 2 pro,
According to posts I understand I need to to write code on the drone which should be c++,
Is there any suggestions how can I start capturing live footage and pass those frames into the model?

Any helpful resources/examples/github repos will be helpful

**Tags:** software, video, photography, dji-mavic-air-2

> **Comments:**
> **username_1**: Were you able to achieve this? I am looking at using the Windows SDK as mentioned by @username_3  

---

## 2 answers

### Answer by username_2 on 2021-04-28. Score: 3

That's a fascinating project, but I'm not sure it's possible on a DJI drone. The firmware is closed source and not designed for easy modification.

I don't know if it's possible to replace the DJI firmware with an open source project like [iNav](https://github.com/iNavFlight/inav) or if you would need to build a new drone from scratch around an iNav capable flight controller.

You might also find that you need a more powerful processor to run real-time image analysis.


---

### Answer by username_3 on 2021-04-29. Score: 3

It is possible to do so.

Check this API [reference](https://developer.dji.com/onboard-api-reference/index.html). They also provide this [Windows SDK](https://developer.dji.com/windows-sdk/) which can be of use to your needs. My experience is with an on-board SDK which I used to avoid objects using a custom ultrasonic transceiver. Knowing how popular python is I assume there is some C++ wrapper somewhere which can translate C++ functions to python somehow, but more research should be done here.


---

