[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-1702":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":15,"stars7d":16,"stars30d":17,"stars90d":14,"forks30d":14,"starsTrendScore":18,"compositeScore":19,"rankGlobal":9,"rankLanguage":9,"license":9,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":22,"hasPages":20,"topics":23,"createdAt":9,"pushedAt":9,"updatedAt":24,"readmeContent":25,"aiSummary":26,"trendingCount":14,"starSnapshotCount":14,"syncStatus":27,"lastSyncTime":28,"discoverSource":29},1702,"DRISH-X-Satellite-powered-freight-intelligence-","sparkyniner\u002FDRISH-X-Satellite-powered-freight-intelligence-","sparkyniner","Detect, count, and track truck traffic on any highway on Earth using nothing but free Sentinel-2 imagery and a browser.",null,"Python",266,43,4,0,31,33,91,93,87.53,false,"main",true,[],"2026-06-12 04:00:11","\u003Cdiv align=\"center\">\n\n# DrishX\n\n**See what's moving. Anywhere. For free.**\n\nAutomated vehicle traffic intelligence from Sentinel-2 satellite imagery.\n\n[![Python](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPython-3.10+-3776AB?style=flat-square&logo=python&logoColor=white)](https:\u002F\u002Fpython.org)\n[![FastAPI](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FFastAPI-0.100+-009688?style=flat-square&logo=fastapi&logoColor=white)](https:\u002F\u002Ffastapi.tiangolo.com)\n[![Sentinel-2](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FSentinel--2-Copernicus-003399?style=flat-square&logo=europeanunion&logoColor=white)](https:\u002F\u002Fdataspace.copernicus.eu)\n[![License](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-green?style=flat-square)](LICENSE)\n[![LinkedIn](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FSairaj_Balaji-0A66C2?style=flat-square&logo=linkedin&logoColor=white)](https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Fsairaj-balaji-7295b2246\u002F)\n\n[Quick Start](#quick-start) | [Use Cases](#use-cases) | [How It Works](#how-it-works) | [Targets](#interesting-targets)\n\n---\n\n\u003C\u002Fdiv>\n\u003Cimg width=\"1714\" height=\"1070\" alt=\"Image\" src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F5ddbc0d3-05d8-4058-bde1-3e2f60572e02\" \u002F>\n\n## What is this?\n\nDrishX answers a simple question for any road on Earth: **how much traffic is on it, and how has that changed over time?**\n\nIt works by exploiting a quirk in how the Sentinel-2 satellite captures imagery. The sensor records red, green, and blue light 1.01 seconds apart. Anything stationary looks normal. But a vehicle moving at highway speed shifts position between those captures, leaving a distinctive blue-green-red spectral smear across a few pixels. DrishX finds those smears, counts them, estimates their speed and direction, and tracks how volume changes across weeks and months.\n\nThe output is a traffic activity time-series for any major road corridor on the planet. Built on completely free Copernicus data, runs locally in a browser, and requires zero ground infrastructure.\n\n## Why this matters\n\nTraffic on roads is one of the most reliable observable indicators of what is actually happening in a place. More useful than official statements. Harder to fake than statistics. And until now, getting systematic road traffic data for an arbitrary location required either expensive commercial providers or physical access to install sensors.\n\nDrishX changes that. Point it at any road, anywhere, and get months of traffic trend data in minutes.\n\nThe applications are as broad as the question \"what's moving on this road\" is broad. Anywhere that vehicle activity tells you something meaningful, DrishX can give you a data-driven answer from orbit.\n\n## Use Cases\n\n### Economic Intelligence\n\nTruck traffic is one of the most honest economic signals that exists. When a port's throughput drops, you see it in the vehicles leaving the gate before any press release. When trade routes shift, road traffic moves before the official statistics do. DrishX gives you a proxy for economic activity that updates every 5 days and covers any corridor on Earth, from the Shahid Rajaee port highway in Bandar Abbas to the Mombasa-Nairobi A109 in Kenya.\n\n### Supply Chain and Logistics\n\nMonitor corridor congestion without relying on your own fleet data. Validate traffic projections for new facility locations by checking 6 months of satellite data instead of trusting a consultant's estimate. Benchmark seasonal patterns across competing routes. Identify bottlenecks by comparing volume across segments of the same corridor.\n\n### Trade and Sanctions Monitoring\n\nWhen sanctions take effect or tariffs change, the impact shows up on road corridors before it shows up in trade databases. Watch the Laredo-Nuevo Laredo I-35 crossing for US-Mexico rerouting signals. Monitor port feeder roads for throughput changes. Compare parallel corridors to spot where traffic is diverting.\n\n### Security and Defense Intelligence\n\nVehicle movement on roads near sensitive facilities, military installations, border crossings, and restricted zones is a meaningful observable. DrishX can detect changes in traffic volume and patterns on access roads, supply routes, and perimeter corridors over time. This includes roads serving military bases, nuclear facilities, missile test sites, naval ports, and border staging areas.\n\nTo be clear about what this means in practice: DrishX can tell you that vehicle activity on a specific road increased by 40% over the past two weeks, or that a normally busy corridor has gone quiet. It cannot identify what the vehicles are. At 10m resolution, a military truck looks identical to a civilian truck. You cannot distinguish a tank transporter from a logging truck. You cannot read markings, count axles, or determine cargo. What you get is volume, speed, heading, and trend. That is a useful signal when combined with other sources and context, but it is not a surveillance system and should not be presented as one.\n\nThe same limitations apply to nuclear or WMD monitoring. You can observe whether traffic patterns on access roads to known facilities have changed. You cannot determine what is being transported. The intelligence value is in the pattern and the change, not in the individual detection.\n\n\n### Disaster and Crisis Response\n\nAfter floods, earthquakes, or conflict, which roads are actually operational? DrishX can compare current vehicle activity against a historical baseline to identify corridors that have gone quiet (blocked, damaged) or corridors carrying unusual volume (diversion routes, evacuation flows). Especially useful in areas with poor real-time reporting infrastructure.\n\n\n### Journalism and Investigations\n\nNeed evidence that does not come from a press release? DrishX gives you satellite-derived, timestamped, independently verifiable data. When officials claim a trade corridor is thriving, you can check. When a new road is supposedly complete, you can see if anyone is actually using it. The data comes from a European Space Agency satellite, not from any government or corporation with a stake in the answer.\n\n## Quick Start\n\n### Prerequisites\n\n- Python 3.11 (other verisons might not work)\n- A free [Copernicus Data Space](https:\u002F\u002Fdataspace.copernicus.eu\u002F) account (takes 2 minutes)\n- The trained RF model file (in the drishx sub directory)\n- Be patient it takes time soemtimes pinging mirrors for the road data\n\n### Install and run\n\n```bash\n# Clone the repository\ngit clone https:\u002F\u002Fgithub.com\u002Fsparkyniner\u002FDRISH-X-Satellite-powered-freight-intelligence-.git\ncd DRISH-X-Satellite-powered-freight-intelligence-\n \n# Create and activate a virtual environment\npython3.11 -m venv venv\n \n# On macOS \u002F Linux:\nsource venv\u002Fbin\u002Factivate\n \n# On Windows:\nvenv\\Scripts\\activate\n\ncd DrishX\n \n# Install dependencies\npip install -r requirements.txt\n \n# Start the server\npython drishx.py\n```\n \nThe server starts on port 8000. Open your browser and go to:\n \n```\nhttp:\u002F\u002Flocalhost:8000\n```\n\nOpen `http:\u002F\u002Flocalhost:8000`. Click the **Copernicus Link** tab in the sidebar and enter your Client ID and Client Secret to connect the satellite API. That is it. No config files needed.\n\nIf you prefer environment variables instead of the UI, you can copy `.env.example` to `.env` and fill in your keys there. Both methods work. The UI tab is just easier for most people.\n\n## Using the Interface\n\nDrishX is designed to be used directly from the browser with minimal setup.\n\n### Selecting an Area of Interest (AOI)\n\n- Right-click anywhere on the map  \n- Click **“Draw AOI”**  \n- Drag to define your analysis region  \n\nThe system will automatically:\n- detect road corridors in the selected area  \n- fetch satellite data  \n- begin analysis  \n\n---\n\n### Recommended Settings\n\nFor best results:\n\n- **Mode:** Use **Dense Mode** for maximum data coverage  \n- **Timeline:** Adjust based on your use case:\n  - Short (1–2 weeks) → quick signals  \n  - Medium (1–3 months) → trend detection  \n  - Long (3–6 months) → strong baseline + anomaly detection  \n\nDense mode increases the number of images processed, improving detection reliability, especially in regions with cloud cover.\n\n\n\n### Data Storage\n\nBy default, all cached data and detection outputs go to `drishx_data\u002F` in the project directory. To redirect (for example, to an external drive with more space):\n\n```bash\nexport DRISHX_DATA_DIR=\u002Fpath\u002Fto\u002Fyour\u002Fstorage\n```\n\n### Environment Variables\n\n\u003Cimg width=\"1702\" height=\"1073\" alt=\"Image\" src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F4a131e82-db54-474d-829e-1e4582eed27d\" \u002F>\nThese are optional if you use the Copernicus Link tab in the UI instead.\n\n| Variable | Required | Description |\n|---|---|---|\n| `COPERNICUS_CLIENT_ID` | Yes (or use UI) | Copernicus Data Space OAuth client ID |\n| `COPERNICUS_CLIENT_SECRET` | Yes (or use UI) | Copernicus Data Space OAuth client secret |\n| `RF_MODEL_PATH` | No | Path to trained RF model (defaults to `.\u002Frf_model.pickle`) |\n| `DRISHX_DATA_DIR` | No | Root directory for all data (defaults to `.\u002Fdrishx_data`) |\n\n## How It Works\n\nBased on [Fisser et al. (2022)](https:\u002F\u002Fui.adsabs.harvard.edu\u002Fabs\u002F2022RemS...14.1595F\u002Fabstract), adapted for real-time web streaming.\n\n### The Physics\n\nSentinel-2's sensor captures spectral bands at slightly different times, about 1.01 seconds between blue (B02) and red (B04). A vehicle at 80 km\u002Fh moves roughly 22 meters in that interval. At 10m pixel resolution, it shows up at different positions in each band, creating a blue to green to red smear that DrishX is trained to find.\n\n### The Pipeline\n\n```\nSentinel-2 Image (10m resolution, 5-day revisit)\n    |\n    +-- 1. Feature Stack (7 features per pixel)\n    |     Variance of RGB, Normalized ratio R\u002FB, Normalized ratio G\u002FB,\n    |     Mean-centered B04, B03, B02, B08\n    |\n    +-- 2. Random Forest Classification\n    |     Each pixel classified as: background, blue, green, or red\n    |     Post-process: threshold background confidence at 0.75\n    |\n    +-- 3. Recursive Object Extraction\n    |     Start at blue pixels, grow through green, then red\n    |     Validate: all 3 colors present, 3-5 pixel extent\n    |     Score: mean_max_prob + mean_prob > 1.2\n    |\n    +-- 4. Per-Detection Output\n          Lat\u002Flon, heading, speed estimate, confidence score\n```\n\n### Capabilities and Limits\n\n\u003Cimg width=\"1700\" height=\"1075\" alt=\"Image\" src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002Fc9c32a92-9fe8-4bc9-b728-9e997096f456\" \u002F>\nYou can also compare trends and historical data between areas\n\n\n**What it does well:**\n\n- Count large vehicles (trucks, buses) on major highways, roughly 70-80% detection rate with the trained model on European motorways\n- Track volume trends over weeks and months\n- Estimate speed (plus or minus 15 km\u002Fh) and heading (plus or minus 22.5 degrees) per detection\n- Cover anywhere on Earth with Sentinel-2 imagery\n- Process multi-month archives in minutes with parallel analysis\n\n**What it cannot do:**\n\n- Detect cars (they are smaller than one pixel at 10m resolution)\n- Distinguish vehicle types. A military convoy looks the same as a line of delivery trucks. A fuel tanker looks the same as a water tanker. You get \"large vehicle,\" nothing more.\n- See through clouds (optical satellite limitation)\n- Provide real-time monitoring. Sentinel-2 revisits every 5 days, and imagery is available with a delay. This is a trend analysis tool, not a live feed.\n- Guarantee uniform accuracy globally. Best results on dark asphalt in clear conditions. Weaker on light-colored or unpaved roads, and in frequently cloudy regions.\n\n\n## Interesting Targets\n\n### Built-in Validation Sites\n\nPre-configured from the original S2TruckDetect research:\n\n| Site | Highway | Bbox | Notes |\n|---|---|---|---|\n| Braunschweig | A7 | `52.25, 10.45, 52.32, 10.55` | Research-grade validation |\n| Frankfurt | A3 | `50.05, 8.55, 50.12, 8.65` | High-density corridor |\n| Karlsruhe | A5 | `48.95, 8.35, 49.05, 8.45` | Standard benchmark |\n\n### Worth Investigating\n\nUse \"Draw AOI\" on the map view. Not built-in, but they produce strong results.\n\n**Chokepoints and disruption indicators:**\n- Shahid Rajaee Highway, Bandar Abbas, Iran. 70% of Iran's container trade.\n- Bandar Abbas to Sirjan Road (Highway 71). Primary northbound artery from Iran's main port.\n- Rotterdam A15. Europe's busiest port feeder highway.\n- Laredo I-35, Texas. Largest US-Mexico freight crossing.\n\n**Rerouting and diversion signals:**\n- Durban N3, South Africa. Captures Cape of Good Hope rerouting traffic.\n- Chabahar port roads, Iran. Alternative that bypasses Hormuz. Inverse signal to Bandar Abbas.\n\n**Economic proxies:**\n- Mombasa-Nairobi A109, Kenya. Carries nearly all East African imports.\n- UAE E11, Abu Dhabi to Dubai. Excellent imaging conditions, high traffic, good accuracy benchmark.\n- Gwadar-Quetta M8, Pakistan. CPEC corridor activity.\n\n**Activity pattern monitoring:**\n- Access roads to any facility, installation, or zone where changes in vehicle volume over time are a meaningful signal. Historical comparison is the key capability here. A single observation tells you little. A trend over 6 months tells you a lot.\n\n## Project Structure\n\n```\ndrishx\u002F\n+-- drishx.py              # Backend: API + detection engine\n+-- rf_model.pickle        # Trained RF model (not in repo)\n+-- .env                   # Credentials (not in repo, optional if using UI)\n+-- requirements.txt       # Dependencies\n+-- frontend\u002F\n|   +-- index.html         # Dashboard\n|   +-- app.js             # Frontend logic\n|   +-- styles.css         # Styling\n+-- drishx_data\u002F           # Auto-created\n    +-- sentinel_data\u002F\n    |   +-- detections\u002F    # Vehicle crop images\n    +-- osm_cache\u002F         # OpenStreetMap cache\n    +-- sh_cache\u002F          # SentinelHub cache\n```\n\n### API\n\n| Method | Endpoint | Description |\n|---|---|---|\n| `POST` | `\u002Fapi\u002Fanalyze` | Run detection on an AOI (streaming progress) |\n| `GET` | `\u002Fapi\u002Froads` | Fetch road network for a bbox |\n| `GET` | `\u002Fapi\u002Fsites` | List preset and historical sites |\n| `GET` | `\u002Fapi\u002Ffeed` | Recent detection alerts |\n| `GET` | `\u002Fapi\u002Fanalytics\u002Ftrends` | Daily counts aggregated across missions |\n| `GET` | `\u002Fapi\u002Fdetections\u002F:id` | Detections for a specific mission |\n\n## Technical Notes\n\n### Resolution\n\n10m pixels. A truck (roughly 18m) spans about 2 pixels. The motion smear extends it to 3-5 pixels, which is enough for reliable detection. Cars (roughly 4.5m) are sub-pixel and invisible. If you need smaller vehicles, the upgrade path is PlanetScope at 3.7m, which uses the same spectral physics but requires a Planet Labs API key.\n\n### Cloud Cover\n\nDrishX uses the Sentinel-2 cloud mask to exclude cloudy pixels. Overcast frames show zero detections. That is correct behavior. Focus on the moving average trend rather than individual days.\n\n### Regional Accuracy\n\nTrained on German autobahns. In practice:\n\n- European motorways: roughly 70-80% detection, 5-10% false positives\n- Middle East and North Africa: strong, arid, high-contrast roads, rarely cloudy\n- South and Southeast Asia: mixed, monsoon season limits usable frames\n- Sub-Saharan Africa: good on paved trunk roads, weak on unpaved\n\n\n\n## References\n\nFisser, H., Rahimi, E., Tetteh, M., Hoeser, T., Mayer-Gurr, T., and Kunzer, C. [Detecting Moving Trucks on Roads Using Sentinel-2 Data](https:\u002F\u002Fui.adsabs.harvard.edu\u002Fabs\u002F2022RemS...14.1595F\u002Fabstract). Remote Sensing of Environment, 2022.\n\nReference implementation: [S2TruckDetect](https:\u002F\u002Fui.adsabs.harvard.edu\u002Fabs\u002F2022RemS...14.1595F\u002Fabstract) by Henrik Fisser.\n\nSatellite data: [Copernicus Data Space Ecosystem](https:\u002F\u002Fdataspace.copernicus.eu\u002F) (free, ESA).\nRoads: [OpenStreetMap](https:\u002F\u002Fwww.openstreetmap.org\u002F) via Overpass API.\n\n## License\n\nMIT.\n\n\n\n---\n\n\u003Cdiv align=\"center\">\n\n\n\n*DrishX, from the Sanskrit drishti: sight, vision, perspective.*\n\n[Sairaj Balaji](https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Fsairaj-balaji-7295b2246\u002F)\n\n\u003C\u002Fdiv>\n","DrishX 项目利用免费的 Sentinel-2 卫星图像，在任何地球上的高速公路上检测、计数和跟踪卡车流量。其核心技术在于通过分析卫星传感器捕捉到的红、绿、蓝光之间1.01秒的时间差，识别出高速移动车辆留下的独特光谱痕迹，从而估算车速与方向，并监测交通量随时间的变化趋势。此工具基于Python开发，采用FastAPI框架提供高效的服务接口，完全依赖于公开可得的Copernicus数据集运行，无需实地安装任何设备即可在浏览器中操作。适用于需要了解特定区域道路使用情况的场景，如经济活动监测、物流规划等。",2,"2026-06-11 02:45:29","CREATED_QUERY"]