← ProjectsResearch / Computer vision + Robotics

OCTOPAS

Oil spill Cleanup Through an Optimized Pragmatic Automated System

Most oil-spill research goes into better sorbents. OCTOPAS works on where the sorbent goes. A photo of the spill is converted to HSV and split into oil and water with k-means. Contours outline every oil patch, one convex hull wraps the whole spill, and a planner orders the patches so the boat seals the edge before it works inward, sizing the sorbent to each patch. In 60 tank trials, the same sorbents recovered 3.2 times as much oil when OCTOPAS placed them.

seed ····

Hover the frame to read a pixel.

Running the pipeline…

The OCTOPAS pipeline running in your browser. This is a JavaScript port of the app’s steps, using the same HSV scaling and k = 2 as the Python original. The aerial frame is generated on this page, not taken from the trials. Timings are measured on your device.
Trials
60, in four arms of 15
Tank spill
80 mL motor oil on 18.9 L of water
Image processing
About 5 s per image, against a goal of under 15 s
Stack
Python, OpenCV, scikit-learn, Arduino Nano

Placement mattered more than material

The tank experiment crossed two deployment methods with two sorbents. The conventional method spreads the sorbent evenly by hand. Peat moss spread that way is the control, because that’s the combination used on real spills.

Oil recovered by deployment method and sorbent Conventional deployment recovered 29.3% with silica aerogel and 24.2% with peat moss. OCTOPAS recovered 92.8% with aerogel and 77.5% with peat moss. Whiskers are 95% intervals of plus or minus 1.8 points. 100%7550250 Oil recovered, % of 70 g ConventionalOCTOPAS +216% +220% 92.8% 65.0 g silica aerogel 77.5% 54.2 g peat moss 29.3% 24.2% +5.1 +15.3 Oil recovered by deployment method and sorbent Conventional deployment recovered 29.3% with silica aerogel and 24.2% with peat moss. OCTOPAS recovered 92.8% with aerogel and 77.5% with peat moss. 100%7550250 Oil recovered, % of 70 g ConventionalOCTOPAS 92.8% 65.0 g aerogel +216% 77.5% 54.2 g peat +220% 29.3% 24.2%
Group means of 15 trials each. Whiskers are 95% intervals (±1.8 points) computed from the pooled within-group variance in the paper’s ANOVA. Brackets show the gap between sorbents within each method.

With peat moss, OCTOPAS raised recovery from 24.2% to 77.5%. With silica aerogel, from 29.3% to 92.8%. Changing only the sorbent, with conventional deployment, moved recovery by 5.1 points. The 217.9% headline is the average of the two gains: +216.3% for aerogel and +219.6% for peat moss.

Splitting the four group means as a 2 × 2 design, the deployment method accounts for 96.3% of the between-group sum of squares. The sorbent accounts for 3.0% and their interaction for 0.7%. The interaction is positive: aerogel’s lead over peat moss grows from 5.1 points to 15.3 when OCTOPAS places it. This breakdown is computed from the published means. It is not in the paper.

Tank protocol

Experimental arms: deployment method by sorbent, 15 trials each
Silica aerogelPeat moss
OCTOPASAn = 15Bn = 15
ConventionalCn = 15Dn = 15 · control
  1. Fill18.9 L (5 gal) of water in a tank at least 3 × 2 ft.
  2. Spill80 mL (70 g) of motor oil, then 10 minutes for it to spread.
  3. ProcessPhotograph the spill, run it through the OCTOPAS app, record its analytics.
  4. Deploy10 g of sorbent. The boat follows the computed route in A and B, and the sorbent is spread evenly by hand in C and D.
  5. MeasureNet out the sorbent and weigh it three times. The trial’s value is the mean.
  6. ResetEmpty the tank and repeat. 15 trials per arm, 60 in total.

Statistics

One-way ANOVA, four arms, as published
SourceSSdfMSFp
Between25,970.2938,656.761,478.741.1102 × 10−16
Within327.83565.85
Total26,298.1259
  • The table is in grams of oil recovered out of 70 g, not percent. Converting the four means to grams and recomputing 15 × Σ(x̄i − x̄)² gives 25,971, against the published 25,970.3. The Tukey q values below reproduce the same way.
  • η² = 0.988. The arm a trial belonged to explains 98.8% of the variance across all 60 trials. The pooled within-arm SD is 2.42 g (3.5 points).
  • The reported p of 1.1102 × 10−16 equals 2−53, the smallest value you can get by computing 1 − CDF in double precision. The true p for F(3, 56) = 1,478.7 is far smaller.
Tukey HSD, studentized range q for each pair
ABC
B OCTOPAS · peat17.18
C Conv. · aerogel71.0953.91
D Conv. · peat76.8159.635.72

Every pair separates at α = 0.01, where the critical q for four groups and 56 df is about 4.6. That includes the two conventional arms, at q = 5.72.

Planning the route

The sorbent-release logic from the paper: go to the patch closest to the boat first. Then keep moving to the nearest patch on the spill’s edge until the whole perimeter is covered, because oil at the edge is what keeps spreading. Only then work inward, nearest patch first, releasing sorbent according to each patch’s size.

In the paper, the amount for each patch depends on four things: how much oil it holds, which aerogel is loaded, whether that aerogel is being reused (reused aerogel absorbs less), and how viscous the oil is. The browser port above models only patch size, and counts a patch as on the edge when it comes within 6 px of the hull.

oil_spill.pyPython · OpenCV · scikit-learn · excerpt
  1. class oilSpillImage:
  2. def findOil(self, img, number=2):
  3. # Convert image to HSV and normalize
  4. img = cv.cvtColor(img, cv.COLOR_BGR2HSV) / 255
  5. h, w, c = img.shape
  6. img2 = img.reshape(h * w, c)
  7. # Quantize to N colors using K-Means clustering
  8. kmeans_cluster = cluster.KMeans(n_clusters=number)
  9. kmeans_cluster.fit(img2)
  10. # Reshape image back to original dimensions
  11. img3 = cluster_centers[cluster_labels].reshape(h, w, c) * 255
  12. return img3.astype('uint8')
  13. def makePerimeters(self, real_img, reduced_img):
  14. # Create a single, unified hull around all detected spills
  15. all_points = np.vstack(oil_contours)
  16. unified_hull = cv.convexHull(all_points)
  17. cv.drawContours(real_img, [unified_hull], -1, (165, 255, 0), 4)
  18. return real_img
Excerpt from the app source. Some lines between these are omitted.

App and boat

  1. Image

    Phone camera in the tank trials. In the deployment design, a drone photographs the spill.

  2. OCTOPAS App

    Python, OpenCV, scikit-learn. Segments the oil, outlines patches, plans the route, and shows the spill’s analytics. About 5 s per image.

  3. Link

    The design sends the route to the boat over Bluetooth. In the trials, the boat was driven along it by remote control.

  4. OCTOPAS Boat

    FDM-printed PLA hull carrying the sorbent, an Arduino Nano, two DC motors, and three AA cells.

The system is designed to be stowed on a tanker and launched as soon as a spill happens. Response time matters, since oil that spreads is harder to recover.

Three years of work

  1. Year 1

    Tested ferrofluid, a candidate oil sorbent, for side effects on ocean acidification. It had no measurable effect.

  2. Year 2

    Compared silica aerogel and ferrofluid against traditional cleanup. Both did better, and aerogel absorbed the most oil at equal amounts.

  3. Year 3

    Moved from the material to the method. I built OCTOPAS and tested it against conventional deployment in 60 trials.

Limits and next steps

Every result here is at tank scale: 18.9 L of still water and 70 g of oil per trial. The app plans the route automatically, but in the trials the boat followed that route under remote control. Closed-loop autonomous navigation hasn’t been built yet.

Coordinated multi-boat paths, reloading the boat by drone, automatic return, and automatic sorbent recovery are proposed in the paper but not built. The next proposed scale is a 3 × 2 ft boat on a 15 × 30 ft simulated spill, estimated at $1,100–1,300, with aerogel as the largest single cost.

For a sense of the problem: tanker incidents alone released about 15,000 tonnes of oil in 2022, according to ITOPF ↗.