Catalog PyPI
PACKAGE EXPLORERView in registry

adaptive-milling

PyPI

Adaptive milling plugins for fibsemOS

Versions collected1
Direct dependencies18From release 0.4.2
Last observed20 Oct, 19:06 UTC

README

Version 0.4.2 documentation

Adaptive Milling

Ruff CI

Adaptive milling plugins for fibsemOS. This package currently contains:

  • AdaptivePolishing: a milling strategy that uses machine learning to determine when polishing is complete.
  • AsymmetricFiducial: a milling pattern that adds some asymmetry to the default Fiducial pattern.

Installation

Adaptive Milling is available from PyPI and can be installed via the following steps:

  1. Decide where you want to create your Python virtual environment and open a terminal in that location.

  2. Follow the one of the sets of instructions below. We recommend using 'uv' as it handles installing the appropriate torch backend automatically.

  3. Create a desktop shortcut for AutoLamella (fibsemOS GUI). With the virtual environment activated, run the appropriate command for you operating system:

    :: Windows Command Prompt (not PowerShell): creates AutoLamella.bat
    echo @echo off > AutoLamella.bat & where fibsem-autolamella-ui >> AutoLamella.bat
    
    # Linux / macOS terminal: creates AutoLamella.sh
    printf '#!/bin/bash\n%s' $(which fibsem-autolamella-ui) > AutoLamella.sh
    chmod +x AutoLamella.sh
    

    Then create a shortcut to the script and place it on your desktop.


# Create a virtual environment (Python 3.11 to match AutoScript's environment)
uv venv --python 3.11

# Activate the virtual environment (Windows)
.venv\Scripts\activate

# Install including AutoLamella from fibsemOS with the appropriate PyTorch backend for your machine
uv pip install adaptive-milling[ui] --torch-backend auto

To activate the virtual environment on Linux systems: source .venv/bin/activate


Install using miniforge

# Create a virtual environment (Python 3.11 to match AutoScript's environment)
conda create -p ./.venv python=3.11 pip

# Activate the virtual environment
conda activate ./.venv

# Install PyTorch (select appropriate compute platform, see table below)
python -m pip install torch torchvision --index-url <Index URL>

# Install including AutoLamella from fibsemOS
python -m pip install adaptive-milling[ui]

If using CUDA, the version must be below or equal to the the system CUDA version, which can be checked with the command nvidia-smi.


Usage

Please see the user guide.

Segmentation models

Models are available from zenodo: https://zenodo.org/records/21804785. We currently recommend using AM_SEM_All_V01.pth (download link).

If you wish to train your own segmentation models that are compatible with Adaptive Milling, or refine existing ones with new data, please use the package AM-model-training, also available on PyPI. We encourage you to contribute your models and training data back to the project so that others may share the benefit. To do this, please contact casper.berger@rfi.ac.uk.

Testing

You can run the package tests using pytest:

uv run pytest

Issues

Please use the GitHub issue tracker to submit bugs or request features.

Contributions

If you would like to help contribute to project, please read our contribution guide and code of conduct.

If you would like to contribute data towards training new segmentation models, please contact casper.berger@rfi.ac.uk.

License

Copyright Rosalind Franklin Institute, 2024.

Distributed under the terms of the Apache-2.0 license with "Commons Clause" License Condition v1.0, see the license for further details.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.4.225 Sept 202618

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
rosalindfranklininstitute/adaptive_milling

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 19:06 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:71371e6743bdb8eacd7dd9a6b3b3dc4e0c0d3d7b56f8ebc99b9f621f1fdc4b22