Skip to main content

Drone Flight Log Entity Recognizer

Project description

DFLER: Drone Flight Log Entity Recognizer

DFLER is an open-source tool developed to perform named entity recognition on drone flight log data to support forensic investigations. It uses a fine-tuned BERT model to identify entities (like Actions, Components, Issues) in log messages and constructs a forensic timeline.

Features

  • Forensic Timeline Construction: Merges and sorts logs from Android and iOS devices.
  • Entity Recognition: Uses a BERT model to highlight key entities in log messages.
  • Forensic Report Generation: Generates a PDF report with statistics and the highlighted timeline.

Installation

Prerequisites

  1. Python 3.7+
  2. wkhtmltopdf: Required for report generation.
    • Windows: Download and install from wkhtmltopdf.org. Default path: C:\Program Files\wkhtmltopdf\bin\wkhtmltopdf.exe.
    • Linux: sudo apt-get install wkhtmltopdf. Default path: /usr/bin/wkhtmltopdf.

Install DFLER

You can install DFLER directly from PyPI (coming soon) or from source.

From Source:

git clone https://github.com/DroneNLP/dfler.git
cd dfler
pip install .

Model

DFLER uses a fine-tuned BERT model (dronenlp/DroNER). By default, the tool will automatically download and cache the model from Hugging Face on its first run.

If you prefer to use a locally downloaded model or an offline environment, you can point to your local directory containing pytorch_model.bin using the --model argument.

Usage

DFLER provides a Command Line Interface (CLI).

Structure:

dfler [arguments]

Arguments

Argument Description
--evidence <path> Path to the directory containing input flight logs (must have android and/or ios subfolders).
--output <path> Path to the directory where results will be saved.
--model <path> Path to the directory containing the BERT model (pytorch_model.bin).
--config <path> Path to a custom config.json file.

Examples

1. Run Pipeline (Recommended):

dfler --evidence "./flight_logs" --output "./results/case_001"

2. Run Pipeline with Custom Model:

dfler --evidence "./flight_logs" --output "./results/case_001" --model "./local_model_dir"

Output Structure

Running dfler will create the following structure in your output directory:

output_dir/
├── raw_list.json             # List of detected log files
├── forensic_timeline.csv     # Merged and sorted timeline of all logs
├── ner_result.json           # Timeline with detected entities (JSON format)
├── statistics.json           # Counts of detected entity types
├── forensic_report_.html     # Intermediate HTML report
├── forensic_report_.pdf      # Final PDF Forensic Report
└── parsed/                   # Intermediate parsed CSVs
    ├── android/
    └── ios/

Configuration

You can optionally use a config.json file instead of passing long arguments.

Example config.json:

{
    "source_evidence": "./flight_logs",
    "output_dir": "./results/test_run",
    "model_dir": "./model",
    "wkhtml_path": {
        "windows": "C:\\Program Files\\wkhtmltopdf\\bin\\wkhtmltopdf.exe",
        "linux": "/usr/bin/wkhtmltopdf"
    },
    "use_cuda": true
}

Run with config:

dfler --config my_config.json

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dfler-0.1.0.tar.gz (15.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dfler-0.1.0-py3-none-any.whl (14.0 kB view details)

Uploaded Python 3

File details

Details for the file dfler-0.1.0.tar.gz.

File metadata

  • Download URL: dfler-0.1.0.tar.gz
  • Upload date:
  • Size: 15.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dfler-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ffa1f61eda98d6ccfd760bd1aaa28da2d99056647debca08b268fdd339a8826e
MD5 0b62fdbce2705cdd24b40e3675a14db5
BLAKE2b-256 dd7d2d4dcb9926c640d687d61379e6395570c96677aee39473bfdb52d44994d5

See more details on using hashes here.

File details

Details for the file dfler-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: dfler-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dfler-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eb1ab9e817b0ee572b40fccbc03f9a410c1bc5da6a94ffde1fb47f2a0a0893b0
MD5 c3753f80b9a9a5213fd33e33447dbe6f
BLAKE2b-256 b0befce3102e8a19755f7f169faa120109bed578d52c24e8417db3623deeb460

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page