Skip to content

About

Neuromorphic-inspired network to count and classify takeoffs, landings, and touch & goes at untowered airports from video. Aims to achieve high accuracy and elite energy efficiency while providing airports with the information they need for grant applications to improve safety.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

aircraft_counter

Ayman Aghel - 9/14/2026

V1 = aircraft_counter.py - Custom LIF network coded manually in Python V2 = ac_superneuromat.py - SuperNeuroMAT spiking neural network

video1-10 - YouTube Link

Neuromorphic-inspired network to count and classify takeoffs, landings, and touch-and-goes at untowered airports from video. Aims to achieve high accuracy when counting & classifying aircraft movements at airports for grant applications to improve safety and maintainence. Initially a manually coded custom system of five leaky integrate-and-fire (LIF) neurons coded with NumPy and OpenCV with a heavy dependency on if statements, currently an SNN coded with the SuperNeuroMAT simulator in Python.

Latest changes (11/9) - Converted most all possible static variables to neurons, began test for reversed traffic Identified noticable gap in which logic based architecture was, plainly, neurons tied to if statements in Python. Considering the fact that a real chip would not have Python, converted most all static variables and all booleans into neurons, eliminated un-essential if statements and replaced with synapses. Created definitions for easier creating of neurons, including gate, time, and other types of neurons to be created with simple calls of designated functions. Tested model with reversed footage, 0s across, planning to troubleshoot in the next session. Began considering future dynamic zones for long term implementation due to camera shifting and possible obstruction of view.

License

PolyForm Noncommercial 1.0.0: free for personal, educational, and research use. Commercial use requires permission. Contact: aymanaghel@gmail.com

Changelog

Initial commit - 9/14/2026:

Currently with a working, accurate landing neuron (neuron_1a), but takeoff neuron (neuron_1b) is faulty, so is touch and go (neuron_2). In next commit, will fix these neurons and begin working on a constantly working leak mechanic. Currently, neurons only leak when calling .step(), will include a working leak mechanic at end to accurately and continuously decrease voltage. Current leak mechanic does not work.

Future changes: landing has extremely larger takeoff voltages due to higher delta values. Likely due to the fact that landing is significantly closer, therefore has larger delta values. Will try decreasing tau and dt, increase threshold?

Fixed leak mechanism - 9/18/2026:

Fixed the leak mechanism. Was originally fluctuating up between 1 and 10, fixed by changing the math in leak() and including a "round" feature by defaulting self.V to 0 when below a certain voltage (0.001). Tau and dt changed, dt decreased to 0.01 (1.0 / 100.0). Added the video2 to the repository.

Future changes: Fix the go around neuron (neuron2), test on new footage. Also, may include a limit on time between events if necessary--like a minimum of 60 seconds between each takeoff, landing, and touch/go.

Added touch & go mechanism, new neuron - 9/22/2026:

Added a go-around mechanism, added another neuron (neuron_4), and re-named all of the neurons to be neuron 1-4. The go-around architecture I imagine is first an ascent neuron (neuron_4) being fired, then running electricity to the descent neuron (neuron_3), and only passing if neuron_3 has any charge from a recent descent. If there is no charge, it won't pass. I chose this architecture because my initial approach was flawed and would not have held up under pressure. Initially, I was going to use neuron_2 (the previous, sole touch/go neuron) and have it build charge exclusively on the descent (when -25 < delta < -1) and count a go-around when any positive delta was detected. This approach would not have held up due to noise, so I decided to use the alternative architecture. Minor changes: changed takeoff neuron (neuron_1) thresh.

Future changes: Test the touch/go neurons (neuron_3 + neuron_4) on touch/go footage and change parameters as necessary. Still considering a time limit between events; likely with a dedicated neuron that charges when any activity is occurring (or counted). Very likely.

Added new time neuron to prevent bursts of events - 9/23/2026

Major improvements: Added neuron_5: a time neuron from the LIF_neuron class dedicated to ensuring no events happen abnormally close together. When an event occurs, the neuron is reset to 1, where it then leaks for around 80 seconds until reaching below 0.1. Once below 0.1, events can be triggered and counted. This allows for a decreased threshold in the future; repeated triggers will be much less common.

Future changes: Set touch/go neuron's parameters. Looked at footage today, but found no usable footage of go-arounds, especially at GA airports. Will still continue looking for footage of go-arounds, takeoffs, and landings to test syntax + concept. Also: polish code and improve syntax, readability (especially in the repeated if statements before neurons are fired) of aircraft_counter.py. Fix grammar, organize thoughts in this README.

Improved readability of code, explored other videos - 9/30/2026

Created a within_parameters function to improve readability. Function passes minimum and maximum delta_y values to filter blobs by location and delta to determine which blobs should trigger a step() for their respective neuron. Function currently fit to video2, but allows for easy changing between videos. Investigated other videos to determine accuracy of custom LIF network, resulted in a fairly high accuracy yet an issue with camera focus. Video would blur in certain videos at random times, trigger neuron_5, and thus prevent actual movements from triggering; like counting a landing during a takeoff, etc. In addition, landings would be too distant from the camera in certain videos for OpenCV to detect a plane as a moving object (a blob). This can likely be fixed by camera placement during field testing rather than code.

Future changes: implement a fix for blobs on screen: debris on camera, focus, etc. Go to local airfields to self-film footage to determine optimal location for deployment and to evaluate what changes are needed to the system.

Added smoothing to inputs, further organized code - 10/2/2026

Added a smoothing feature to inputs to combat issue with blur and noise in footage. Seems to be effective in initial testing, but definitely could use fixing later and with new footage. Still consistently receiving a good score on the test footage. Minor changes: improved readability of code, changed parameters of landing neuron.

Future changes: film footage at a GA field to fit parameters to. Find new ways to combat blurring issue, possibly with more neurons.

Began work with SuperNeuroMAT - 10/4/2026

SuperNeuroMAT is a Python package widely used by the neuromorphic community to get weights for neuromorphic models, like SNNs. Although aircraft_counter.py is comprised of just five neurons, SuperNeuroMAT makes it possible to replace the singular neurons used with layers of neurons for superior accuracy. The primary purpose of this project, initially, was to further my understanding in neuromorphic computation, LIFs, and SNNs, but now this project is allowing me to learn how to use common neuromorphic libraries in the neuromorphic community like SuperNeuroMAT. SuperNeuroMAT will allow for the testing of parameters and training of neurons. An initial commit can be found at superNM.py.

Changes to aircraft_counter.py: Removed several lines of unnecessary code. Fixed bug in go_around block of code; incorrect indentation.

Future changes: Film footage at GA fields to train SuperNeuroMAT layers of neurons on, further understanding of SuperNeuroMAT.

Fundamental changes to aircraft_counter.py & repository - 10/5/2026

Renamed superNM.py to ac_superneuromat.py for readability. "ac", short for aircraft_counter. Added teacher spike, synapses, and initialized STDP to prepare for test run with fake values. Added comments throughout for context when coming back to project (new library + concept).

Important changes to aircraft_counter.py (fundamental): While working through the conversion from aircraft_counter.py to ac_superneuromat.py, it became evident that in the event of a go-around, under current architecture, a go-around would never been counted and instead be counted as a landing due to the fact that neurons act independently of each other. Resulted in all neurons being repurposed in some way, like neuron_1 and 2 being changed to ascent/descent, and neuron_3-4 becoming time neurons. Furthermore, while doing independent reading on SNNs, I came to the realization that aircraft_counter.py is not a manually coded SNN and is instead a custom system of LIFs with a heavy dependency on if statements with Python. This means that aircraft_counter.py will be used as reference in the future and likely will not be used for testing of parameters both due to the lack of synapses and of neurons (singular neurons rather than systems of neurons). Furthermore, this repository, aircraft_counter, will now have a heavy focus on ac_superneuromat.py for this reason.

Trained & tested ac_superneuromat.py on fake values successfully - 10/6/2026

Added input spike to training and completed successfully, wrote full test and completed successfully. During training, synapse weights would change on average by 0.0319 for descent-landing synapses and ascent-takeoff neurons but remain the same for descent-takeoff and ascent-landing neurons; an expected result. For testing, manually fed correct input neuron layers spikes within given ranges of takeoffs and landings, spiked 212 times for landing-landing and 243 for takeoff-takeoff, while neuron layers without correlation (takeoff-landing, landing-takeoff) would have no spikes. These are the first real results to come from ac_superneuromat.py; aircraft_counter coded with SuperNeuroMAT.

Notes: Untaught output neurons were firing on their own during training, so initial weights were lowered to 0.01-0.02 to keep input per frame below leak. Test input was identical to training input (a constant 2.0 input w/o noise), confirming that the pipeline works, not that it has real-world accuracy. Aneg was draining every synapse for every step, so it was disabled in STDP setup. For add_spike, time was relative to the current step, so testing frames had to be set to frame - 5500; 5500 time steps during training already occurred.

Future changes: Will begin testing on video and train as needed. Plans to film at local GA field set, expecting to film as many aircraft as possible with a goal of filming 30 movements and at least 10 touch & goes. Will log start_time, end time, and type of movement for each movement.

Tested SuperNeuroMAT model on onlne footage, minor changes to LIF - 10/7/2026

Copied the OpemCV initialization from aircraft_counter to ac_superneuromat.py with changes as needed. Connected delta_y to input neurons and copied over within_parameters (footage is online with graphics on right-hand side). After running, discovered large differences between takeoff and landing spikes: 19 takeoff spikes and 117 landing spikes. Then, changed synapses' weights to a new range: 0.0035 - 0.0084 to ensure that neurons firing do not overpower leak (more neurons firing for descent layer with new training). With new weights, although accomodating the descent_layer, leak was over-powered in ascent_layer neurons. To fix, I trained with more synthetic data. Worked, then tested to make sure neuron layers were spiking on correct layers (they were), and wrapped up.

Notes: Output neurons have a large imbalance: 19 takeoff spikes v. 117 landing spikes. Calculated avg. delta for ascent & descent (abs. value), set as static input during synthetic training and testing. After changing, though, a similar issue from yesterday, intial weights lowered to prevent leaking from overpowering input. Trained with more synthetic data to fix, then made sure neurons spiking on correct events (correct times). All systems green!

Future changes: Will be filming footage tomorrow at airfield for new test footage at a target site for implementation of aircraft_counter, allowing for more fitting, real training AND testing data, and footage of touch & goes.

Filmed footage at DKX, created frame_check.py - 10/8/2026

Filmed footage at Knoxville Downtown Island airport from Island Home Park in Knoxville, Tennessee. 40 movements recorded, exactly 10 touch & goes recorded, and 2 go-arounds recorded. Landings and takeoffs are near-even. While filming, I realized that due to the distance from the camera to the takeoofs, OpenCV will likely not recognize takeoffs as blobs to detect centroids. Therefore, a new feature of the SNN will be implemented: a split set of input neurons for a zoomed in area above the runway where takeoffs fly, and one for a certain portion of the screen where takeoffs land. This also means seperate OpenCV uses. Although not implemented, this is worth noting. Furthermore, created frame_check.py to accurately label and match events to frame number. However, there is no CSV due to bugs during code and limited time available to me.

Notes: Helicopters flying above, not sure how I will count those in the future, worth noting. Go-around will be tricky to train against touch/goes, two go-arounds can be used to train as "nothing" category, also geese? Could crop touch/goes to get more training and testing data in half to just show as landing or takeoff, although likely not needed due to abundance of events. Required counting actually fluctuates airport to airport and for different grant ptojects, planning to send email to DKX airport manager reguarding future projects at airport.

Future changes: Use frame_check or different method to get frame #s for training spikes. Upload some of the filmed videos to YouTube or other file saving platform. Get usable audio and consider using to train model on acoustic signs for helicopters? Further investigate what needs to be counted at airports.

Full training loop, matched inputs, additional input layers, seperate on-screen zones of interest, "reverse" mechanism - 10/9/2026

Wrote the full training loop for video9. While changing blocks from online/synthetic to the video filmed, it became apparent that more input neurons will be needed now and in the future. The first would be size neurons that are spiked by the size of a blob on screen. In the future, these neurons could be replaced by growing/shrinking neurons to determine direction of traffic; more on this later. Additionaly, OpenCV would not detect the small, distant aircraft taking off. This led to the implementation of a "dual" screen system, defined as "track" which takes the mask, box, minimum area and maximum area to zoom in on certain areas to count aircraft. In the future, layers of neurons could bridge the two layers to determine if an event was a touch & go, as the two seperate regions allow for distinct ascent/descent detection. For instance, the two seperate areas each are currently exclusively allowed to charge designated input neurons, since all footage filmed (as of now) was in a singular direction of traffic: away from the camera. This means that when there is a change in direction of traffic, the counter would be at a disadvantage to count aircraft, having to rely on the small intersection of the layers. This supports the idea of a shrinking/growing input layer which can fire a "reverse" layer of neurons which would reverse the direction of traffic and change the on-screen zones to only be able to charge the opposite input layer (although, only that layer).

Notes: Fundamental change from synthetic to video training required a lot of replacing, significantly more than when synthetic data was changed to the median delta_y of an online video. More input layers could be very beneficial to the accuracy of the model. Initially considered growing/shrinking neuron layer, but realized that it would be useless under current architecture; all events shrink (one direction). Would be useful for a reverse-traffic feature, although not yet possible due to lack of footage. Perhaps reversing videos? Additionally, a time_off_screen neuron layer that recieves input during the time neither zone has spikes would be beneficial to a touch_go mechanism, especially considering it would not accidentally count go-arounds. Ran tests to get optimal minimum and maximum areas, deltas for blobs to be counted and spike input layers, added synapses to match the two additonal input layers (just size, not shrinking/growing currently).

Future changes: Write a test on a different video filmed, determine if a size neuron is worth keeping or if a filter is enough, add growing/shrinking for "reverse" traffic (trained/tested on videos reversed?), consider implentation of aircraft classification in the future, needed for large grants. Consider outputs as popular aircraft make/model and then automatically classify, train on the models themselves, perhaps tail # capturing? Upload video to YouTube.

Replaced size layers with growing & shrinking layers for both near and far zones, notes organized - 10/10/2026

Realized that under current architecture, size layers only provided insight on if a blob was detected or not due to lack of scaling of sizes & lack of variety. Furthermore, size neurons had little influence now and would likely have not have any influence in the future on the accuracy on the model. Therefore, replaced size neurons with growing & shrinking neurons to prepare for a reverse function in the future. Matched the input neurons to inputs from video, added a "direction" column to the csv for future use when training for away or torwards the camera to reverse traffic. Not yet tested due to the long compile time of the code, so likely prone to errors. Reorganized notes in code, changed to be more up-to-date, and began considering the additon of a time_since or touch_go dedicated input layer, although not yet implemented. Leaning torwards a layer "time_since_descent" that charges on descent with a 15 second leak to zero, serving as a roadblock for ascents. When ascents plan to fire, if time_since_descent still has charge, it gets charged by the ascent squared, triggering spikes and thus spikes in touch_go neuron. This architecture is not yet implemented nor tested.

Notes: Size layers have no purpose; only serve as an is_blob function. Could scale to make it usable for the model, but still would have very little influence on takeoffs & landings and could cause overfitting due to the constant direction of traffic in footage filmed. Changing size layer to a growing/shrinking layer, as discussed in last changelog update, to prepare for a reverse. Fully implemented growing/shrinking layer with filtering parameters to prevent noise. Not yet tested.

Future changes: test on footage filmed, complete the addition of "reverse" traffic function, consider aircraft classification inputs + outputs, upload video9 to YouTube or other platform.

Made recent_descent and vanished input layers for touch & go - 10/11/2026

Tested new features from yesterday and made fixes to make them fully operational, began considering coding test layer, but chose instead to first make touch & go input layers. Opted for recent_descent, a true or false layer of just one neuron that spikes if a descent happened recently enough (within 18 seconds). Additionally, a vanished input layer that is comprised of 20 neurons, each representing the amount of time there have been no aircraft detected in neither the near nor far zone. Includes certain parameters to ensure no noise causes since_vanished to fire, like a requirement of a blob needing to be on screen for three frames before spiking the neuron, and vice-versa for off-screen. Additonally, troubleshot vanish-touch_go layer because it's weigjt did not change after training. Ultimately, I discovered that it only worked when there was no minimum for near_zone's area. Will do further analysis tommorow. As of now, it looks like testing is very possible from here and that training looks great!

Notes: Percent change for vanish_touch/go and ascent_landing are 0. Ascent_landing is likely due to the fact that the current far zone is inside of the near zone, so there is no way that an ascent could be mischaracterized as a landing, and the opposite can be said about descent_takeoff; descents come directly through the far zone. Ran test for a random touch & go, found that no blobs were being detected (near_y, far_y, and all blob related variables were None, False, or 0) except for a singular line. Ran training with no parameters on area, vanish-touch/go working. To limit noise from landings flying over far zone, set a max area exclusively for far zone, vanish-touch/go still works. Although, if setting a min for near zone, vanish-touch/go is 0, no matter what you set # of neurons to.

Future changes: test on footage filmed, add reverse traffic function, classification inputs + outputs, upload video9 to YouTube. Investigate why vanish-touch/go is 0 when a minimum near value is set.

Wrote video test on a seperate video (video10), added decision layers for counting of events - 10/12/2027

Wrote a full video test on a new video, different from the training video: video10. After running, I realized that it would be best to add decision layers and begin coding the counting of events. Chose to make decision layers, kind of like the neurons in aircraft_counter.py. Each decision layer is "charged" by spikes from output layers, synapses connect them with fixed weights of 1.0. When a certain number of outputs spike their designated "bucket" (decision layer), that decision layer spikes and triggers a count. The concept is fully coded, but general bug fixes and adjustments to thresholds are yet to be completed.

Notes: Code requires lots of computational power to run, not only draining my CPU but also my battery in additon to taking several minutes to run due to the long video times (30 minutes for each test and training) and the requirement for the model to check every framd (around 30 frames per second). Perhaps something to save weights in the future to decrease run time if this becomes a bigger problem.

Future changes: Adjust thresholds of decision layers, add reverse traffic function (likely to the decision and/or output layer), classification input & output layers, and upload both video 9 and video 10 to YouTube. Before progressing further, reveiw past future changes noted in changelog and apply those changes to ac_superneuromat.py as needed.

Made a run_model() function, set framework for a future reverse traffic function - 10/16/2026

Noticed a redundancy in repeated identical code, so I made the run_model() function that takes the video you are running the model on and sets the input layers' spike times. The function does not include a simulation. Furthermore, I wrote the reverse output and decision layers and set their IDs in lists to prepare for future reverse traffic implementation.

Notes: Decision thresholds need to be adjusted, but current parameters set all three at 13 movements. More than needed, but planning to run tests and "train" to find ideal thresholds.

Future changes: Solidify thresholds of decision layers, finish implementation of reverse traffic function, and upload video9 and video10 to YouTube. Reverse both videos for training and testing on reverse traffic in the future.

Significant progress with decision layers, replaced reverse layers with two traffic direction layers (away or torwards) - 10/17/2026

Made threshold test for video9, achieved theoretical results but did not implement due to fluctuating parameter code in the run_model() loop: min and max areas for near and far zones. Replaced the reverse output and decision layers with traffic direction layers: 'torwards' or 'away' from camera. Mapped inputs, set training spikes (currently all 'away'), awaiting minor training and testing on reversed video, and decision layer implementation. Expecting full implementation tomorrow. Additonally, minor fixes to readability of ac_superneuromat.

Notes: Threshold issues likely caused by something changed in synapse creation. Consider reviewing past commits prior to 10/17 to identify the issue.

Future changes: Finish implementation of decision layers, upload video9 and video10 to YouTube, reverse both videos to train reverse function & make chanegs as needed. Begin classification input, output, and decision layers.

Refined decision layers, added parameters in run_model() - 10/18/2026

Continued troubleshooting decision layers for future counting. Tests show that the model can distinguish events near-perfectly in testing footage when told that an event is happening, but struggle to find events in continous footage without false or missing counts. Adjusted recent_descent layer and takeoff layer synapses to a -0.2 weight to further penalize false takeoffs in touch & goes. Added additonal delta parameters for traffic departing torwards and away from camera, not yet filtered based on reverse traffic neuron layers.

Notes: Consider additonal fixed positive synapse with recent_descent on landings. Additionally, consider an event layer to first detect if an event is ongoing, then add a max function to determine which event the model is most certain is occuring.

Future changes: Finish implementation of decision layers, upload video9 and video10 to YouTube, reverse both videos to train reverse function & make chanegs as needed. Begin classification input, output, and decision layers.

Added blob detection input, output, and decision layers, new method to determine event type - 10/20/2026

In past changelogs, decision layers' spikes fluctuated greatly throughout events. Choosing a single threshold was nearly impossible and would not have held up in long-term testing on unseen footage. Therefore, it would be significantly better to designate a neuron layer to determining if an event/aircraft is detected, then recording the start / end frames of the determined event, and then counting whichever decision layer had the most spikes. This is supported by evidence in prior tests in video9 revealing that events' correct decision layer would have the most spikes of any decision layer for all events except for takeoff events, although this is expected to be fixed in the next session. Although, this approach would require for the training of a "nothing" layer to prevent things like birds and other noise from being "forced" into being counted. To make a nothing layer, additonal input layers would need to be made. Today, all blob layers were created and mapped in run_model(), although troubleshooting is needed.

Notes: Vanish spikes at 0, troubleshoot needed. Consider some type of negative weight on touch/go to prevent decision layer from having more spikes than takeoff layer, perhaps increase thresh?

Future changes: Find video sharing platform capable of storing video9 and video10 (too big for YouTube), troubleshoot vanish layer and touch/go on takeoffs. Work on the new event classifier's counting and recording.

Added segment logging for frames where aircraft detected, fixed vanish layer - 10/21/2026

To prepare for the future recording-count feature, added segement logging for the model to identify aircraft to then identify event type. Currently, the model is counting 36 movements in video9 (18 movements). This supports the idea of adding a "nothing" classification based on absolute size/area, speed, and other input layers. Additionally, touch & goes still dominate in tests, demonstrating significantly output layer spikes than landing and takeoff output layers on landing and takeoff events. Although, landing and takeoff input layers typically have more spikes than touch & goes do. This means that de-bugging this would not be hard, as you would just have to weaken the synapses from touch & go output to decision layers and strengthen landing and takeoff synapses. Also, fixed vanish layer after finding variable inconsistency making it impossible for vanish_layer to spike. Now demonstrating 18% change for vanish-landing synapses.

Notes: Decrease synapse weight manually from touch & go output to decision, increase landing and takeoff. "Nothing" classification can be comprised of speed and area to filter birds, perhaps paired with future classification of aircraft?

Future changes: Upload video9 and video10 to a video sharing platform, continue work on classifier counting & recording for final layer event classification

Added return state, landing, touch & go, and feature neurons, and refined decision layers - 10/27/2026

After minor bug fixes on 10/26 (not in changelog; minor), it grew evident that current architecture would simply not work for classification. On takeoff events, for instance, takeoff and touch & goes would recieve the exact same inputs from ascents, yet touch/go would get inputs from additional layers. This led to the creation of new architecture which can be imagined as a table. On touch & go events, an ascent happens after a plane descented, disappeared, and then appeared. On takeoffs, an ascent happens and nothing before it happened. On landings, a descent happens and the plane never returns. This is the simplest way to describe takeoffs, touch & goes, and landings. So, for the neural layer, I created new layers referred to as takeoff_feat, landing_feat, and touch_go_feat. These layers represent those representations, each charged by the simplest description of each designated event. Some inputs need to be fixed, though, like recent descent window. Additionally, adjusted decision layers with custom leaks and refractory periods based on tests, set landing decision to smaller thresh in part due to shorter average event length.

Notes: Biggest issue is window length, perhaps change to when_left or when_plane_left? Change python logic to neuron(s) where possible to maximize neuromorphic-icity of model.

Future changes: Test on video10, upload videos to video sharing platform, add a very small Aneg for STDP. Consider future uses of STDP, including during real deployment. Refer to past "Future changes" sections for more.

Added accumulator and gate neurons, initial commit of video10 csv, testing with video10 pending - 10/28/2026

Added accumulator and gate neurons for more logic in the neural network. Accumulator neurons, like output neurons, accumulate evidence of certain events, then pushing to decision layers. These are different from output layers because of the very slow leak on the evidence layers. When decision layers fire, this triggers a "gate" layer which prevents additional firing while an aircraft is detected. Contrary to prior proposed architecture in which layers "record" and then get max, new architecture is a "first-come first-serve" style counting system. When plane_seen is True, the model looks for aircraft to determine if an event is ongoing. If it is, it considers that an unclassified event as long as the gate is open. When the gate closes, no more events can fire, even if there was a huge spike to a decision layer. This allows for improved accuracy and more logic in the neural network. Furthermore, used frame_check.py for video10 csv to get frames of layers and events. Initially, it wasn't working because landings would be marked as ended as soon as they were off-screen, meaning that vanish layers would never charge. Additionally, I forgot to change the scoring mechanism to video10_labels.csv. Testing on video10 and video9 hasn't been conducted yet due to potential concerns with thresholds to be fixed tommorow (when there is more time).

Notes: Not yet tested on video9 nor video10. Video10 has 8 events, video9 has 18. Consider cleaning up code with classes, or with loops for things like IDs.

Future changes: Attempted to upload video9 to YouTube, but was faced with an error. Planning to look into it and consider other video sharing platforms for video9 and video10.

100% accuracy in testing footage; changed training to teacher spikes only, seperate blob tracking for each zone, uploaded video9, video10 to YouTube, more - 10/31/2026

After testing on both video9 and video10, found 100% accuracy on both videos. Video10 was an absolute 100% accuracy on landings, touch/goes, takeoffs, and total operations counts (including * 2 for touch/go due to FAA regulations). Video9 does not show as 100% in scoring report at end, although this is just due to the way scoring happens; close events look like miscounted events. Furthermore, on video9, a landing at the end of the video does not have enough time for vanish layer nor landing accumulator to accumulate charge, so it goes uncounted. This would not be an issue in actual implementation. Recieved 100% accuracy on both videos after changing synapse weights, area size parameters, and frames of events. Reverted frames of events back to absolute frames, as in training buffers (lag) were added automatically and in testing were instead added in the front (lead). Added seperate blob detection for near and far zones, something planned in the initial implementation of zones yet just added now. Turned test_video into a function, and started converting booleans in model to neurons. Also, uploaded video9 and video10 to YouTube, linked at the top of this README.md

Notes: Stable version, awaiting video1-8 further testing.

Future changes: Running model live rather than scheduling spikes, aircraft classification.

Correctly identified 41/41 movements, live implementation of model after splitting into three files - 11/3/2026

Tested model on video1-8, recieved an absolute 100% accuracy on unlabled videos that had only been labeled the day of with plain aircraft counts per-video rather than frame labels like those of video9 and video10. This means that live implementation is a clear next step, resulting in a planned trip to a local airfield for further testing, live. In order to create the model with live implementation, I split the file up into three files: ac_init, ac_train, and ac_live. I left ac_superneuromat alone to be used for future training and testing of new features, including future aircraft classification. Also, since both files use ac_init, adding new features to ac_live from ac_superneuromat should not be very hard. ac_init represents neural initialization, including neuron layers and their IDs. Then, I moved the training pipeline from ac_superneuromat to ac_train for training weights to be saved to a file (trained_weights.npy) rather than locally, thus cutting down startup time of model drastically, with some instances taking over 5 minutes to get test results in ac_superneuromat. Then, in ac_live, completely changed structure of previous run_model (now schedule_model) from ac_superneuromat to become a live model, with neurons reacting in real time rather than to scheduled spikes. Many failed attempts at running the model on my local webcam led to an extreme amount of safeguards for cv2 being created, including mismatch frame and incorrect version printed warnings.

Notes: Play video of video10 on a device placed in front of ac_live to test? Also, consider testing webcam on camera used at airfield. Consider removing grow/shrink layers; not needed? Test on reversed video!

Note to reader: For FAA grants, aircraft event counts are required in addition to aircraft type counts (piston, jet, etc). Additionally, in official reporting, touch & goes are counted as two movements rather than one. This is why final_ops in ac_live and operations in ac_superneuromat include (2 * touch_gos).

Future changes: Test ac_superneuromat on reversed video, investigate the 100% accuracies, consider fate of grow/shrink layers, upload video1-8 to YouTube? Begin classification input layers, investigate ways to distinguish aircraft with exclusively cv2 (maybe size ratio?). Also, consider using grow/shrink layers as gauge for speed to further classify aircraft type.

Complete overhaul of ac_superneuromat (test file) to convert standard booleans & static var. to neurons, began writing test for reversed video - 11/9/2026

To reduce reliance of model on Python, converted all booleans in ac_superneuromat (expierimental/test code) to neurons for less if statements; Python. Created definitions for different types of neurons for easier creation including latch, counter, etc. To eliminate almost all un-essential if statements, created synapse from the new neurons to designated layers for more neuromorph-icity. Also, some changes to initialization of neuron layers to match the new 'creation' architecture. During conversion, I realized that the shrinking & growing layers are still there, idle, so I began testing the model without them on reversed video to test. Although, results came back with 0s across the board on reversed testing footage. Planning to troubleshoot next session, confirm that the near and far dy parameters are capable, and perhaps consider using the grow/shrink layer again. Also, while on the chapter of enhancing neuromorph-icity, I began considering an evolving system for far and near zones in contrast to current static zones. I feel that this is essential for the long term success of the model, as the camera will definitely shift. Considering a tile system in which if a plane is detected, the preset tiles it flies over are added to a heatmap over time. Although, not yet tested.

Notes: Double check near & far dy parameters to confirm not adjusted to away traffic. Don't remove grow/shrink layer, may be essential for future zone dynamics, perhaps traffic direction for event classification in general. Also, maybe for speed in aircraft type classification?

Future changes: Troubleshoot and fix reversed traffic! Create an evolving heatmap of hidden on screen tiles that planes 'hit' as they land/takeoff for dynamic zone switching, perhaps tie neurons into it? Research possible ways to elinate need for CV2, including manual backsub??

Acknowledgements:

@inproceedings{date2023superneuro,
  title     = {SuperNeuro: A fast and scalable simulator for neuromorphic computing},
  author    = {Date, Prasanna and Gunaratne, Chathika and Kulkarni, Shruti R. and Patton, Robert and Coletti, Mark and Potok, Thomas},
  booktitle = {Proceedings of the 2023 International Conference on Neuromorphic Systems},
  pages     = {1--4},
  year      = {2023}
}

@misc{date2026superneuromat,
  title         = {SuperNeuroMAT: An Efficient Matrix-based Simulator for Spiking Neural Networks},
  author        = {Date, Prasanna and Zhu, Kevin and Kulkarni, Shruti and Gautam, Ashish and
                   Gunaratne, Chathika and Patton, Robert and Nitzsche, Tyler and Mulet, Ian and
                   Johnson-Scott, Zachary and Helms, Addison and Rowden, Duncan and
                   Weston, Simon and Parsa, Maryam and Schuman, Catherine and Potok, Thomas},
  year          = {2026},
  eprint        = {2608.08479},
  archivePrefix = {arXiv},
  primaryClass  = {cs.NE},
  doi           = {10.48550/arXiv.2608.08479}
}

About

Neuromorphic-inspired network to count and classify takeoffs, landings, and touch & goes at untowered airports from video. Aims to achieve high accuracy and elite energy efficiency while providing airports with the information they need for grant applications to improve safety.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages