#FPV detector
This repo depends on:
- https://github.com/hcardwell/usb-vsp
- https://github.com/xdr940/fpv-cv
- https://github.com/AlexeyAB/darknet
Darknet Yolo (AlexeyAB version) is added as post-process module for detection.
You may need:
- laptop with a N-card and usb3.0 port
- Ubuntu 16/18
- CUDA, Cudnn, OpenCV
- DJI FPV Googles V1 and Air Unit Module (AUM) and a long usb cable (tested device)
DJI FPV Combo with Googles V2 may work, but no devices for test.
- Install darknet follow: Darknet
- Copy
libdarknet.so
to./lib
(the file depends on your local hardware and cuda version) bash ./install/envs.sh
- Use
pip
install python dependence, install whatever it needed.
-
open a terminal and run:
python stream.py
-
Plug in power for Googles and AUM
-
open another terminal and run:
3.1 For simple video
python play.py
3.2 For detector, generate some BBox on each frame
python detect.py
- The current detector is yolov4-tiny, for other models, you need copy related cfg and pre-trained weights files from darknet project to
./cfg
. - For local model training, you further need to label your own dataset, and may also need a GPU server. And all the related files in
./cfg
need to replace.
-
Run stream.py before power on Googles (leave AUM keep running). Each time you restarted, unplug, wait 5s, and then plug the power for Googles.
-
Because my AUM is not on the fly, cooling is import.
-
To confirm the detector, use
python ./lib/darknet_images.py --input hourses.jpg
- The video steam quality is terrible, and may lead to error detection results. Can ffmpeg fix this?
- Not try on the Combo.
- Calibrate camera.