Caffe Cifar 10
lazyFrogLOL/Harness_Engineering
Guidance for building and training with the Caffe deep learning framework on CIFAR-10 dataset.
Computer vision for bio-image preprocessing, feature detection, real-time microscopy.
$ npx skills add jaechang-hits/SciAgent-Skills --skill opencv-bioimage-analysis -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install jaechang-hits/SciAgent-Skills opencv-bioimage-analysis --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/jaechang-hits/SciAgent-Skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/cell-biology/opencv-bioimage-analysis .claude/skills/opencv-bioimage-analysis && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "opencv-bioimage-analysis" agent skill from https://github.com/jaechang-hits/SciAgent-Skills/tree/main/skills/cell-biology/opencv-bioimage-analysis into .claude/skills/opencv-bioimage-analysis/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "opencv-bioimage-analysis", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/jaechang-hits/SciAgent-Skills/tree/main/skills/cell-biology/opencv-bioimage-analysisType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add jaechang-hits/SciAgent-Skills --skill opencv-bioimage-analysis -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install jaechang-hits/SciAgent-Skills opencv-bioimage-analysis --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jaechang-hits/SciAgent-Skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/cell-biology/opencv-bioimage-analysis .agents/skills/opencv-bioimage-analysis && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "opencv-bioimage-analysis" agent skill from https://github.com/jaechang-hits/SciAgent-Skills/tree/main/skills/cell-biology/opencv-bioimage-analysis into .agents/skills/opencv-bioimage-analysis/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "opencv-bioimage-analysis", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add jaechang-hits/SciAgent-Skills --skill opencv-bioimage-analysis -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install jaechang-hits/SciAgent-Skills opencv-bioimage-analysis --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jaechang-hits/SciAgent-Skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/cell-biology/opencv-bioimage-analysis .cursor/skills/opencv-bioimage-analysis && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "opencv-bioimage-analysis" agent skill from https://github.com/jaechang-hits/SciAgent-Skills/tree/main/skills/cell-biology/opencv-bioimage-analysis into .cursor/skills/opencv-bioimage-analysis/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "opencv-bioimage-analysis", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/jaechang-hits/SciAgent-Skills.git --path skills/cell-biology/opencv-bioimage-analysis--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add jaechang-hits/SciAgent-Skills --skill opencv-bioimage-analysis -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install jaechang-hits/SciAgent-Skills opencv-bioimage-analysis --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jaechang-hits/SciAgent-Skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/cell-biology/opencv-bioimage-analysis .gemini/skills/opencv-bioimage-analysis && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "opencv-bioimage-analysis" agent skill from https://github.com/jaechang-hits/SciAgent-Skills/tree/main/skills/cell-biology/opencv-bioimage-analysis into .gemini/skills/opencv-bioimage-analysis/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "opencv-bioimage-analysis", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install jaechang-hits/SciAgent-Skills opencv-bioimage-analysisInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add jaechang-hits/SciAgent-Skills --skill opencv-bioimage-analysis -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/jaechang-hits/SciAgent-Skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/cell-biology/opencv-bioimage-analysis .github/skills/opencv-bioimage-analysis && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "opencv-bioimage-analysis" agent skill from https://github.com/jaechang-hits/SciAgent-Skills/tree/main/skills/cell-biology/opencv-bioimage-analysis into .github/skills/opencv-bioimage-analysis/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "opencv-bioimage-analysis", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add jaechang-hits/SciAgent-Skills --skill opencv-bioimage-analysis -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install jaechang-hits/SciAgent-Skills opencv-bioimage-analysis --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jaechang-hits/SciAgent-Skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/cell-biology/opencv-bioimage-analysis .opencode/skills/opencv-bioimage-analysis && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "opencv-bioimage-analysis" agent skill from https://github.com/jaechang-hits/SciAgent-Skills/tree/main/skills/cell-biology/opencv-bioimage-analysis into .opencode/skills/opencv-bioimage-analysis/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "opencv-bioimage-analysis", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
opencv-bioimage-analysisComputer vision for bio-image preprocessing, feature detection, real-time microscopy.
Opencv Bioimage Analysis is an agent skill from jaechang-hits/SciAgent-Skills. Computer vision for bio-image preprocessing, feature detection, real-time microscopy. Color conversion, morphology, contour/blob detection, template matching, optical flow on fluorescence/brightfield. 10-100× faster than pure Python via C++. Use scikit-image for scientific morphometry/regionprops; OpenCV for real-time, video, classical feature extraction.
Its SKILL.md is about 3.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in AI & LLM Engineering, covering Computer vision. It works with OpenCV, Python and C++. The repository describes itself as: 197 bioinformatics & life science skills for Claude Code and AI agents — BixBench 92.0% accuracy. RNA-seq, single-cell, drug discovery, proteomics, and more. Powers OmicsHorizon. The licence is Apache-2.0.
Read from SKILL.md and the folder at commit 82c862c. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
pippythonFrom the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
docs.opencv.orggithub.compyimagesearch.comFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Opencv Bioimage Analysis loads about 3.9k tokens when it runs. Until then it costs about 96 tokens; SKILL.md has 588 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from jaechang-hits/SciAgent-Skills at commit 82c862c, republished under its Apache-2.0 licence (© jaechang-hits). 588 words, ~3,938 tokens.
.claude/skills/opencv-bioimage-analysis/SKILL.md (or your agent's skills folder).OpenCV (cv2) provides optimized C++-backed image processing routines for preprocessing, segmentation, feature extraction, and video analysis of biological images. In life sciences, OpenCV is used for fluorescence image enhancement (background subtraction, CLAHE), morphological segmentation (watershed, contour detection), brightfield cell detection, and real-time microscopy stream processing. Unlike scikit-image (which emphasizes scientific measurement), OpenCV prioritizes computational speed and video support — making it ideal for preprocessing pipelines and real-time imaging applications.
opencv-python, numpy, matplotlibopencv-contrib-python for extra modules (SIFT, SURF, optical flow)# Install OpenCV
pip install opencv-python
# Install with extra contributed modules (SIFT, SURF, etc.)
pip install opencv-contrib-python
# Verify
python -c "import cv2; print(cv2.__version__)"
# 4.10.0import cv2
import numpy as np
# Read and display image info
img = cv2.imread("cells.tif", cv2.IMREAD_GRAYSCALE)
print(f"Shape: {img.shape}, dtype: {img.dtype}")
print(f"Min: {img.min()}, Max: {img.max()}")
# Apply Gaussian blur and threshold
blurred = cv2.GaussianBlur(img, (5, 5), 0)
_, binary = cv2.threshold(blurred, 0, 255, cv2.THRESH_BINARY + cv2.THRESH_OTSU)
print(f"Cells detected (rough): {np.sum(binary > 0)} foreground pixels")Read, write, and convert images between color spaces.
import cv2
import numpy as np
# Read image (GRAYSCALE, COLOR, or UNCHANGED for 16-bit)
img_gray = cv2.imread("cells.tif", cv2.IMREAD_GRAYSCALE) # uint8
img_color = cv2.imread("rgb.tif", cv2.IMREAD_COLOR) # BGR order!
img_16bit = cv2.imread("16bit.tif", cv2.IMREAD_UNCHANGED) # uint16
print(f"Grayscale shape: {img_gray.shape}, dtype: {img_gray.dtype}")
print(f"Color shape: {img_color.shape}")
# Color space conversions
img_rgb = cv2.cvtColor(img_color, cv2.COLOR_BGR2RGB) # BGR → RGB
img_hsv = cv2.cvtColor(img_color, cv2.COLOR_BGR2HSV) # BGR → HSV
img_gray2 = cv2.cvtColor(img_color, cv2.COLOR_BGR2GRAY) # BGR → gray
# Write image
cv2.imwrite("output.png", img_gray)
cv2.imwrite("output_16bit.tif", img_16bit)
print("Images written.")Apply filters and contrast enhancement for image preprocessing.
import cv2
import numpy as np
img = cv2.imread("cells.tif", cv2.IMREAD_GRAYSCALE)
# Gaussian blur (noise reduction)
blurred = cv2.GaussianBlur(img, (7, 7), sigmaX=1.5)
# Median blur (salt-and-pepper noise)
median = cv2.medianBlur(img, 5)
# CLAHE: Contrast Limited Adaptive Histogram Equalization (for microscopy)
clahe = cv2.createCLAHE(clipLimit=2.0, tileGridSize=(8, 8))
clahe_img = clahe.apply(img)
# Top-hat filter for bright spots on dark background
kernel = cv2.getStructuringElement(cv2.MORPH_ELLIPSE, (15, 15))
tophat = cv2.morphologyEx(img, cv2.MORPH_TOPHAT, kernel)
print(f"CLAHE range: [{clahe_img.min()}, {clahe_img.max()}]")
cv2.imwrite("clahe_enhanced.tif", clahe_img)Convert grayscale images to binary masks using various thresholding methods.
import cv2
import numpy as np
img = cv2.imread("nuclei.tif", cv2.IMREAD_GRAYSCALE)
# Otsu's thresholding (automatic threshold selection)
thresh_val, otsu_mask = cv2.threshold(img, 0, 255,
cv2.THRESH_BINARY + cv2.THRESH_OTSU)
print(f"Otsu threshold: {thresh_val:.0f}")
# Adaptive thresholding (handles uneven illumination)
adaptive = cv2.adaptiveThreshold(
img, 255,
cv2.ADAPTIVE_THRESH_GAUSSIAN_C,
cv2.THRESH_BINARY,
blockSize=11, # neighborhood size (odd)
C=2, # constant subtracted from mean
)
# For 16-bit images: normalize first
img_16 = cv2.imread("16bit_nuclei.tif", cv2.IMREAD_UNCHANGED)
img_8 = cv2.normalize(img_16, None, 0, 255, cv2.NORM_MINMAX, dtype=cv2.CV_8U)
_, mask_16 = cv2.threshold(img_8, 0, 255, cv2.THRESH_BINARY + cv2.THRESH_OTSU)
print(f"Otsu mask foreground: {mask_16.sum() / 255} pixels")Find and measure cell contours from binary masks.
import cv2
import numpy as np
import pandas as pd
img = cv2.imread("cells.tif", cv2.IMREAD_GRAYSCALE)
blurred = cv2.GaussianBlur(img, (5, 5), 0)
_, binary = cv2.threshold(blurred, 0, 255, cv2.THRESH_BINARY + cv2.THRESH_OTSU)
# Remove small objects with morphological opening
kernel = np.ones((3, 3), np.uint8)
cleaned = cv2.morphologyEx(binary, cv2.MORPH_OPEN, kernel, iterations=2)
# Find contours
contours, hierarchy = cv2.findContours(cleaned, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
print(f"Objects detected: {len(contours)}")
# Measure each contour
records = []
for i, cnt in enumerate(contours):
area = cv2.contourArea(cnt)
if area < 50: continue # skip tiny objects
perimeter = cv2.arcLength(cnt, True)
x, y, w, h = cv2.boundingRect(cnt)
(cx, cy), radius = cv2.minEnclosingCircle(cnt)
records.append({"cell_id": i, "area": area, "perimeter": perimeter,
"x": x, "y": y, "w": w, "h": h, "radius": radius})
df = pd.DataFrame(records)
print(f"Cells > 50 px²: {len(df)}")
print(df[["area", "perimeter", "radius"]].describe())Refine segmentation masks with morphological operations.
import cv2
import numpy as np
# Load binary mask (from thresholding or Cellpose)
mask = cv2.imread("rough_mask.png", cv2.IMREAD_GRAYSCALE)
_, mask = cv2.threshold(mask, 127, 255, cv2.THRESH_BINARY)
# Structural elements
ellipse = cv2.getStructuringElement(cv2.MORPH_ELLIPSE, (7, 7))
rect = cv2.getStructuringElement(cv2.MORPH_RECT, (5, 5))
# Opening: remove small bright noise
opened = cv2.morphologyEx(mask, cv2.MORPH_OPEN, ellipse, iterations=1)
# Closing: fill small holes inside cells
closed = cv2.morphologyEx(opened, cv2.MORPH_CLOSE, ellipse, iterations=2)
# Dilation: expand cell boundaries slightly
dilated = cv2.dilate(closed, ellipse, iterations=1)
# Distance transform for watershed seed generation
dist = cv2.distanceTransform(closed, cv2.DIST_L2, 5)
_, seeds = cv2.threshold(dist, 0.5 * dist.max(), 255, 0)
seeds = seeds.astype(np.uint8)
print(f"Potential cell centers: {cv2.connectedComponents(seeds)[0] - 1}")Process video streams from time-lapse microscopy.
import cv2
import numpy as np
# Process a time-lapse video file
cap = cv2.VideoCapture("timelapse.avi")
fps = cap.get(cv2.CAP_PROP_FPS)
n_frames = int(cap.get(cv2.CAP_PROP_FRAME_COUNT))
print(f"Video: {n_frames} frames at {fps} FPS")
# Background subtraction (remove static background)
bg_subtractor = cv2.createBackgroundSubtractorMOG2(
history=50, varThreshold=25, detectShadows=False
)
frame_counts = []
frame_idx = 0
while cap.isOpened():
ret, frame = cap.read()
if not ret: break
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
fg_mask = bg_subtractor.apply(gray)
# Count moving objects in this frame
contours, _ = cv2.findContours(fg_mask, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
moving = [c for c in contours if cv2.contourArea(c) > 100]
frame_counts.append(len(moving))
frame_idx += 1
cap.release()
print(f"Processed {frame_idx} frames. Mean moving objects: {np.mean(frame_counts):.1f}")| Parameter | Module | Default | Effect |
|---|---|---|---|
sigmaX | GaussianBlur | auto from ksize | Gaussian standard deviation; larger = more smoothing |
clipLimit | createCLAHE | 40.0 | Maximum contrast amplification; 2.0–4.0 for microscopy |
tileGridSize | createCLAHE | (8,8) | Tile size for local histogram equalization |
blockSize | adaptiveThreshold | required | Neighborhood size for adaptive threshold (must be odd, ≥ 3) |
C | adaptiveThreshold | required | Constant subtracted from mean; positive to subtract |
iterations | morphologyEx | 1 | Number of erosion/dilation cycles; higher = stronger effect |
history | BackgroundSubtractorMOG2 | 500 | Frames to model background; lower = faster adaptation |
varThreshold | BackgroundSubtractorMOG2 | 16 | Pixel variance threshold; higher = less sensitive |
minArea | contour filter | — | Minimum cv2.contourArea(cnt) to keep; filter noise |
cv2.IMREAD_UNCHANGED | imread | — | Preserve bit-depth (16-bit, 32-bit); required for scientific images |
import cv2
import numpy as np
import pandas as pd
def detect_nuclei(image_path: str, min_area: int = 200) -> pd.DataFrame:
"""Detect DAPI-stained nuclei from a fluorescence image."""
img = cv2.imread(image_path, cv2.IMREAD_UNCHANGED)
# Normalize 16-bit to 8-bit
if img.dtype == np.uint16:
img = cv2.normalize(img, None, 0, 255, cv2.NORM_MINMAX, dtype=cv2.CV_8U)
# Preprocess: CLAHE → Gaussian blur
clahe = cv2.createCLAHE(clipLimit=2.0, tileGridSize=(8, 8))
enhanced = clahe.apply(img)
blurred = cv2.GaussianBlur(enhanced, (5, 5), 1.5)
# Segment: Otsu threshold → morphological opening
_, binary = cv2.threshold(blurred, 0, 255, cv2.THRESH_BINARY + cv2.THRESH_OTSU)
kernel = cv2.getStructuringElement(cv2.MORPH_ELLIPSE, (5, 5))
cleaned = cv2.morphologyEx(binary, cv2.MORPH_OPEN, kernel, iterations=1)
# Find and measure contours
contours, _ = cv2.findContours(cleaned, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
records = []
for cnt in contours:
area = cv2.contourArea(cnt)
if area < min_area: continue
M = cv2.moments(cnt)
if M["m00"] == 0: continue
cx = int(M["m10"] / M["m00"])
cy = int(M["m01"] / M["m00"])
records.append({"area": area, "cx": cx, "cy": cy,
"perimeter": cv2.arcLength(cnt, True)})
return pd.DataFrame(records)
df = detect_nuclei("dapi.tif", min_area=300)
print(f"Nuclei detected: {len(df)}")
print(df.describe())import cv2
import numpy as np
import pandas as pd
from pathlib import Path
def process_image(path: str) -> dict:
img = cv2.imread(path, cv2.IMREAD_GRAYSCALE)
if img is None:
return {}
blurred = cv2.GaussianBlur(img, (5, 5), 0)
_, binary = cv2.threshold(blurred, 0, 255, cv2.THRESH_BINARY + cv2.THRESH_OTSU)
contours, _ = cv2.findContours(binary, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
cells = [c for c in contours if cv2.contourArea(c) > 200]
return {"file": Path(path).name, "cell_count": len(cells),
"mean_area": np.mean([cv2.contourArea(c) for c in cells]) if cells else 0}
results = [process_image(str(p)) for p in sorted(Path("images").glob("*.tif"))]
df = pd.DataFrame([r for r in results if r])
print(df)
df.to_csv("batch_results.csv", index=False)
print("Saved: batch_results.csv")import cv2
import numpy as np
img = cv2.imread("cells.tif", cv2.IMREAD_GRAYSCALE)
img_color = cv2.cvtColor(img, cv2.COLOR_GRAY2BGR)
blurred = cv2.GaussianBlur(img, (5, 5), 0)
_, binary = cv2.threshold(blurred, 0, 255, cv2.THRESH_BINARY + cv2.THRESH_OTSU)
contours, _ = cv2.findContours(binary, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
for i, cnt in enumerate(contours):
if cv2.contourArea(cnt) < 200: continue
# Draw contour outline
cv2.drawContours(img_color, [cnt], -1, (0, 255, 0), 2)
# Label with cell number
M = cv2.moments(cnt)
if M["m00"] > 0:
cx, cy = int(M["m10"] / M["m00"]), int(M["m01"] / M["m00"])
cv2.putText(img_color, str(i), (cx - 5, cy), cv2.FONT_HERSHEY_SIMPLEX,
0.4, (255, 255, 0), 1)
cv2.imwrite("annotated_cells.png", img_color)
print(f"Annotated {len(contours)} cells. Saved: annotated_cells.png")import cv2
import numpy as np
def rolling_ball_background(img: np.ndarray, radius: int = 50) -> np.ndarray:
"""Estimate and subtract background using a blur approximation."""
kernel_size = 2 * radius + 1
background = cv2.GaussianBlur(img, (kernel_size, kernel_size), radius / 3)
corrected = cv2.subtract(img, background)
return corrected
img = cv2.imread("uneven_fluorescence.tif", cv2.IMREAD_GRAYSCALE)
corrected = rolling_ball_background(img, radius=50)
cv2.imwrite("background_corrected.tif", corrected)
print(f"Background corrected. Range: [{corrected.min()}, {corrected.max()}]")| Problem | Cause | Solution |
|---|---|---|
imread returns None | File not found or unsupported format | Use absolute path; verify with Path(path).exists(); for TIFF use cv2.IMREAD_UNCHANGED |
| 16-bit image shows as black | IMREAD_GRAYSCALE clips to uint8 | Use cv2.IMREAD_UNCHANGED and normalize: cv2.normalize(img, None, 0, 255, cv2.NORM_MINMAX) |
| BGR vs RGB color mismatch | OpenCV uses BGR, matplotlib uses RGB | Convert: rgb = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) before plt.imshow() |
| Contours split one cell into many | Binary mask has holes or noise | Apply cv2.MORPH_CLOSE before contour detection; increase Gaussian blur sigma |
GaussianBlur requires odd kernel | Even kernel size provided | Always use odd kernel sizes: 3, 5, 7, 9; ksize=(5,5) not (4,4) |
| CLAHE makes image worse | clipLimit too high | Reduce clipLimit to 1.5–2.0; increase tileGridSize to (16,16) |
| Background subtraction removes cells | History too short for MOG2 | Increase history parameter; use static frame subtraction for microscopy |
| Performance slow on large images | Python loop over pixels | Use vectorized NumPy operations or CUDA-accelerated cv2.cuda module |
© jaechang-hits, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skills/cell-biology/opencv-bioimage-analysis of jaechang-hits/SciAgent-Skills.
Open the folder on GitHubat commit 82c862c
We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in jaechang-hits/SciAgent-Skills, which our catalogue first saw on October 7, 2026.
Opencv Bioimage Analysis next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Opencv Bioimage Analysis this skilljaechang-hits/SciAgent-Skills | 374 | 1 repos | ~3.9k | Automated safety check: Pass | Apache-2.0 | |
| Caffe Cifar 10lazyFrogLOL/Harness_Engineering | 128 | — | ~1.7k | Automated safety check: Pass | None | |
| Generating Python Installeraffaan-m/ECC | 276k | 1 repos | ~6.1k | Automated safety check: Pass | MIT | |
| Paddle BuildPaddlePaddle/Paddle | 24k | — | ~1k | Automated safety check: Pass | Apache-2.0 | |
| Onnxtxtonnx/onnx | 22k | — | ~1.3k | Automated safety check: Pass | Apache-2.0 | |
| UAV Trajectory Overlay from VideoXXLiu-HNU/visualize_uav_trajectory | 242 | — | ~535 | Automated safety check: Pass | GPL-3.0 |
lazyFrogLOL/Harness_Engineering
Guidance for building and training with the Caffe deep learning framework on CIFAR-10 dataset.
affaan-m/ECC
Commercial-grade Python installer expert for Windows: Nuitka extreme compilation, dist slimming, DLL footprint analysis, and Inno Setup packaging to ship the smallest, fastest installers.
PaddlePaddle/Paddle
A skill your agent uses when needing to compile, rebuild, or install Paddle from source after code changes.
onnx/onnx
Read or write ONNX text format ("onnxtxt"). An agent skill from onnx/onnx.
XXLiu-HNU/visualize_uav_trajectory
Composites several moments from real drone footage into one still with ghost trails, then lays out paper figures and an editable PowerPoint file.
ConstantineB6/comfy-pilot
Helps an agent write ComfyUI custom nodes in Python, including wrapping an existing script, mapping data types and handling image batches.
jaechang-hits/SciAgent-Skills
NEB-IRC activation energy pipeline for reaction barriers using GFN2-xTB and pysisyphus.
jaechang-hits/SciAgent-Skills
3Dmol.js WebGL molecular visualization emitted as self-contained HTML.
jaechang-hits/SciAgent-Skills
Constraint-based (COBRA) analysis of genome-scale metabolic models: FBA, FVA, knockouts, flux sampling, production envelopes, gapfilling, media optimization.
jaechang-hits/SciAgent-Skills
Read, write, and edit ChemDraw CDX/CDXML files with RDKit's rdkit.Chem.rdChemDraw plus direct XML editing, always paired with a rendered PNG.
jaechang-hits/SciAgent-Skills
Programmatic PubMed access via NCBI E-utilities REST API. An agent skill from jaechang-hits/SciAgent-Skills.
jaechang-hits/SciAgent-Skills
Scaffold a new SciAgent-Skills entry. An agent skill from jaechang-hits/SciAgent-Skills.
Categories
Computer vision for bio-image preprocessing, feature detection, real-time microscopy. Opencv Bioimage Analysis is an agent skill from jaechang-hits/SciAgent-Skills. Computer vision for bio-image preprocessing, feature detection, real-time microscopy.
Opencv Bioimage Analysis fits situations like: tasks that involve Computer vision.
Run `npx skills add jaechang-hits/SciAgent-Skills --skill opencv-bioimage-analysis -a claude-code`. Or copy the skill folder (skills/cell-biology/opencv-bioimage-analysis in jaechang-hits/SciAgent-Skills) into .claude/skills/opencv-bioimage-analysis in your project. Claude Code loads it when a task matches its description.
Run `npx skills add jaechang-hits/SciAgent-Skills --skill opencv-bioimage-analysis -a codex`. Or copy the skill folder (skills/cell-biology/opencv-bioimage-analysis in jaechang-hits/SciAgent-Skills) into .agents/skills/opencv-bioimage-analysis in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jaechang-hits/SciAgent-Skills --skill opencv-bioimage-analysis -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/opencv-bioimage-analysis, .gemini/skills/opencv-bioimage-analysis, .github/skills/opencv-bioimage-analysis and .opencode/skills/opencv-bioimage-analysis in your project.
Going by SKILL.md and its folder, Opencv Bioimage Analysis needs the command-line tools its instructions call (pip and python). Our summary lists: Python 3.
SKILL.md names 3 domains. As links in the text: docs.opencv.org, github.com and pyimagesearch.com. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Opencv Bioimage Analysis is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 3.9k tokens (SKILL.md is roughly 16k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Opencv Bioimage Analysis: Caffe Cifar 10 (lazyFrogLOL/Harness_Engineering, 128 stars), Generating Python Installer (affaan-m/ECC, 276k stars), Paddle Build (PaddlePaddle/Paddle, 24k stars) and Onnxtxt (onnx/onnx, 22k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
jaechang-hits (a GitHub user) maintains it in jaechang-hits/SciAgent-Skills, which has 374 GitHub stars. The repository holds 169 skills in this directory. The repository was last updated on September 29, 2026.
Source: jaechang-hits/SciAgent-Skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.