Thread Tools
Oct 07, 2019, 09:00 AM
Registered User
barney-NG's Avatar
Thread OP
Quote:
Originally Posted by SimonWatts
I had a chance to try piCAMTracker for F3B speed today. Using a Standard V2 camera and sited at Base B. The testing was very short as it was between rounds in a contest, but the results were promising. In the first flight it picked up all turns at Base B correctly. The second flight it was not so good.

So has anyone worked out good picam settings for F3B? What sort of results have you had?

Simon
Hi Simon,

Jeroen and Soren did a lot of testing.

Here are some points I remember by heart. (unordered)
  • MinArea: 2 eliminates a lot of flies and far away birds. (see pic1)
  • piCAM is usable for speed training. In distance only the last laps can be detected.
  • Camera looking straight up improves a bit for distance. (Danish setup)
  • The start line gives a lot of false positves. (see pic2)
  • Jeroen is using two cameras. (I gave him one with 6mm focal length which detects better in distance. camera)

Cheers

Barney

Cheers
Sign up now
to remove ads between posts
Oct 07, 2019, 06:41 PM
Registered User
SimonWatts's Avatar
Thanks Barney

I'll get an opportunity to try again in a couple of weeks. Flies are definitely a problem here in Australia right now. Looking at the snapshot pics, most detections were flies!

Cheers
Simon
Oct 08, 2019, 05:51 PM
Registered User
So I got my pi 4. I will probably start working on it next week. After looking at the code and doing research it would be neat to do some image classification to eliminate false positives but it doesn't look like it would work fast enough. The other thing I was thinking about is why not send the time it passes the other base and build some probability curve based on eta. This could eliminate a lot of false positives.
Oct 09, 2019, 08:50 AM
Registered User
Maybe image classification is possible: https://hackernoon.com/building-an-i...w-dc3e0c4410d4
Oct 09, 2019, 10:21 AM
Registered User
So my idea is going to try this .... try to see if image classification is possible on the pi 4 at a reasonable rate of speed. Rather that "track" the plane, I will use background separation on each frame and create an additive picture that creates a swept area. If the the swept area touches the other side of the base (or half of picture) then I know I have a crossing. The reason swept area is critical because it ensures classification happens only once at the beginning. At least this is the idea, let me know if you there are any gotchas in my thinking.
Oct 10, 2019, 03:53 AM
Registered User
barney-NG's Avatar
Thread OP
Quote:
Originally Posted by funkyfreestyler
So my idea is going to try this .... try to see if image classification is possible on the pi 4 at a reasonable rate of speed. Rather that "track" the plane, I will use background separation on each frame and create an additive picture that creates a swept area. If the the swept area touches the other side of the base (or half of picture) then I know I have a crossing. The reason swept area is critical because it ensures classification happens only once at the beginning. At least this is the idea, let me know if you there are any gotchas in my thinking.
Cool! Thank you for thinking to improve the system!

Image Classification:
In the past I had some tries with the Intel Movidius Compute Stick on the RPi3 (see here ) I also tried the Yolo V3 network. (comparision see here)
I stopped further investigations because I had to scale the frames down to 224x224 (or less). This left me just some pixels to classify. In your example they use MobileNet with an input of 128x128...
Here is a very nice tutorial of Adrian Rosebrock!
Currently I am trying with the NVIDIA Jetson Nano. I am getting 25 frames/s on a 412x412 ResNet. (This thing is very cute but it needs some power to do the magic )

False Positive Suppression:
I would prefer to give the responsibility to suppress false positives to the central race management because:
a) the management knows about the race situation. (F3B differs from F3F for example)
b) moving any race management to the camera makes the detection logic much more complicated.
If you want to have it suppressed by the camera we can create an "enable" input on an arbitrary GPIO pin which may be controlled from an outside logic.

My 5 C

Barney
Oct 10, 2019, 04:41 AM
Registered User
Barney,

Are you doing image classification on the whole frame or just the part where movement was detected? This would be critical and why it would be important to detect movement through background separation or pimotion first then do classification on only that part of the image. At least this my thinking you are much further a long than me.

25 fps on the Jetson nano is pretty impressive!
Oct 10, 2019, 09:54 PM
Team USA F3F Member
ttraver's Avatar
Hey Barney!

Has there been any work on the issues with very close planes traveling really fast?

Cause actually, the cameras work really good if the plane is a certain size, but close and fast doesn't seem to catch a detection.

Tim
Oct 11, 2019, 06:52 AM
Registered User
barney-NG's Avatar
Thread OP
Quote:
Originally Posted by ttraver
Hey Barney!

Has there been any work on the issues with very close planes traveling really fast?

Cause actually, the cameras work really good if the plane is a certain size, but close and fast doesn't seem to catch a detection.

Tim
Hi Tim,

Please set trackMaturity:5 if that doesn't help trackMaturity:3.

I fear the root cause is an internal sanity check called "maxMovements". I reject frames where more than 40% of the pixels are moving. (value is fixed in the code )
I will remove it or make it configurable this weekend...
If you want to check it earlier put a comment sign (#) in front of line #344 in piCAMTracker/picamtracker/MotionAnalyser.py
it should read like:

#return

Cheers

Barney
Last edited by barney-NG; Oct 11, 2019 at 07:07 AM.
Oct 11, 2019, 07:05 AM
Registered User
barney-NG's Avatar
Thread OP

Pi 4


I tested the Raspberry Pi 4 yesterday. (Thanks to all the donators to make it possible that I can buy hardware for tests!)

Summary: It is too slow right now
  1. Install the new Raspberry Buster Image
  2. Update the firmware
  3. Update the software
  4. Install all development packages
  5. Compile opencv-4.1.1 (That was very fast for a Raspberry!)
  6. Copy my development tree for the piCAMTracker
  7. Compile the h264 library (needed for decomposition of frames)

The first start failed completely with an error in the picamera module.
A deeper investigation showed that the callback I use to work on the motion vectors is more than a factor 5 slower than on the Rpi3.
On the Rpi3 the callback takes 2-5ms on the Rpi4 it takes 25-80ms.
I will raise an issue at the Raspberyy community but I fear we have to wait a bit longer until we can use the Rpi4.

Cheers

Barney
Oct 11, 2019, 07:29 AM
Registered User
barney-NG's Avatar
Thread OP
Quote:
Originally Posted by barney-NG
I fear the root cause is an internal sanity check called "maxMovements". I reject frames where more than 40% of the pixels are moving. (value is fixed in the code )
I will remove it or make it configurable this weekend...
Commenting myself

Setting the limit to something higher than 50% should be sufficient if the turn plane stays in the middle of the screen.
This check shall prevent the Raspberry from running mad once you start to move the camera.

Cheers

Barney
Oct 12, 2019, 01:21 PM
Registered User
barney-NG's Avatar
Thread OP
Quote:
Originally Posted by barney-NG
Summary: It is too slow right now
I have to regret. I did some more tests and now I have a running configuration.
The Rpi4 is usable and it is a good step faster!
The slowness came from a changed opencv interface. (I am using opencv-4.1.1 currently)
We clearly have to use a completely new image and I have to check if the new image is running on the old hardware or if we have to maintain two images in future...

Cheers

Barney
Oct 12, 2019, 02:19 PM
Registered User
Awesome Barney. Thanks for beating me to my project : ) I am pleased that you're jumping in on this as I was about to start working on this. I will be doing the exact same thing shortly, shooting for next week.
Last edited by funkyfreestyler; Oct 12, 2019 at 02:31 PM.
Oct 22, 2019, 08:31 AM
Registered User
barney-NG's Avatar
Thread OP
Quote:
Originally Posted by ttraver
Has there been any work on the issues with very close planes traveling really fast?
Hi Tim,

I did some work the last week on that topic.
... Maybe I have to create a special tracker for "nearby".
The actual tracker is too sophisticated for big moving blocks :-/

Cheers

Barney
Oct 29, 2019, 07:00 AM
Registered User
Brett82's Avatar
Managed to do some testing with our camera system on the weekend. We have a battery powered wifi dongle in the middle creating a hotspot, the two cameras linked to it and an android tablet running Gerhard's app.

It all connected well and we seemed to have a decent detection rate. Although we sometimes had missed detection's when flying below the horizon or with smaller models. That we should be able to sort out with the configiration settings.

Something we noticed though was latency. We had Gerhard's app in beep mode, so any detection would trigger a beep. flying off the course there was a slight delay, but for practice it wasn't too bad.

The problem was when you turned and were heading back towards the centre. the camera would detect the model crossing again but the beeper would only go off when the plane was halfway back to the centre of the course. I cant work out if the delay is in the signal being sent by the camera or in the app sounding the beep.

I tried setting each baser to only left or right and saving it using the web configuration but it didn't seem to actually do anything. It was like the camera didn't register the change and kept buzzing both directions.

Any ideas?

I think the best option would be a raspberry pi in the centre creating a hotspot (like Peirre's set up) but having an app running on the pi similar to Gerhard's android app that waits for the detection signal and its the pi that beeps through the audio port that can be connected to a portable speaker. I wonder if that would help with latency.


Quick Reply
Message:

Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
New Product Valenta Model Mini Twister 3m F3F/B Plane concreteman Slope 3 Jan 16, 2019 12:04 PM
Discussion iMax B6AC detecting 2 cells of 3. Buzzer detects all 3. FromHell Batteries and Chargers 21 Jul 04, 2017 07:56 AM
Discussion F3B/F3F planes timmig Multi Task F3X 0 Jul 07, 2016 10:35 PM
Alert Great Planes Triton Charger does not detect battery! guapoman2000 Batteries and Chargers 38 Feb 07, 2008 09:01 PM
Berg 5 DSP auto detect not detecting rickyblaze Radios 2 Oct 29, 2004 04:29 PM