Skip to content

Releases: enzococca/pyarchinit-photogrammetry

1.0.0

Choose a tag to compare

@enzococca enzococca released this 19 Oct 16:45
58aa1f8

What's new in 1.0.0

Everything planned from 0.7 to 1.0 in the roadmap, and the research items.

Updates, speed and image quality (0.7)

  • Automatic update check (once a day and from Aiuto); on macOS the new application is downloaded and swapped in after quitting.
  • Native core in Rust (pyarchinit-photogrammetry-core, optional, numpy kept as fallback): depth fusion, projection with the COLMAP camera models, orthomosaic scores, confidence; CPU depth maps of several photos at once (the synthetic trench from 5.7 s to 0.9 s).
  • Seamless orthomosaic: every cell chooses among all the photos that frame it, two-band blending across the seams, exposure and vignetting corrected, ghosting filter, small holes filled.
  • Photo masks (drawn, imported, from background photos, a colour, the model or SAM) left out of matching, depth maps, orthomosaic and texture; elevations on the plane of a wall or a cylinder; DEM editing; reconstruction region.

Acquisition and precision (0.8)

  • Fisheye lenses recognised from the EXIF; 360-degree photos aligned as a camera rig.
  • Photos from a video, with the GPS of DJI drones; image quality.
  • Markers found on the other photos by image correlation; precision of cameras, markers and tie points from the bundle adjustment, vertical precision map of the DEM, spot heights with their precision; field check after the alignment (coverage map, blurred or unaligned photos).

Everyday work (0.9)

  • Batch processing over several chunks, resumed after an interruption; undo and redo of drawings, markers, patches and point edits.
  • Diagnostics of the alignment (matching graph, matches between two photos, residuals), camera calibration dialog, merging markers.
  • Measures: 3D area, slope, aspect and height above the ground.
  • Exports for the web: Cloud Optimized GeoTIFF, COPC, binary glTF, Cesium 3D Tiles, light models with a normal map, fly-through videos.
  • Laser scans (E57, PTX) registered on the photogrammetric chunk; sections, plan slices and markers in the 3D view; media of PyArchInit in its panel.
  • English interface (Vista > Lingua / Language).

Archaeology first (1.0)

  • Relief visualisations of the DEM: sky-view factor, openness, local relief model, multi-directional hillshade.
  • Excavation phases: chunks by date, volume removed for each US, relations suggested from the order of removal.
  • Stone-by-stone drawing with SAM; Munsell colour of an area, calibrated with a colour chart.
  • QField package for the trench and its edits back; paradata of every product as W3C PROV (JSON-LD).
  • Pottery: rim diameter and preserved arc from a sherd, search of similar forms in pottery_table.
  • US proposed for the Extended Matrix, with their relations, written into the US forms; IFC with the node_uuid of the US as GlobalId and the stratigraphic relations.

Research

  • PatchMatch multi-view stereo on the CPU in the native core (on the synthetic trench the DEM is about three times closer to the truth than with two-view SGBM).
  • Own bundle adjustment: scale bars as distances, GNSS bias, rolling shutter of drones.
  • Textures beyond 8192 pixels in pages, as in Metashape (also imported from it).
  • I3S scene layer package (.slpk) of the textured model for ArcGIS Pro, ArcGIS Online and CesiumJS.

Packaging

  • --run script.py runs Python scripts with the application's own Python and modules, without the window (as Metashape's -r).
  • Windows on ARM: the x64 application runs under the emulation of Windows 11 (checked on Windows 11 ARM64).
  • Linux on ARM (aarch64): wheels of pycolmap 4.2.1 and Open3D 0.19.0 for Python 3.10-3.12, which their projects do not publish, are attached below (built by packaging/arm/build-linux.sh and the arm-wheels workflow, tested with this project on arm64): pip install pycolmap-*.whl open3d-*.whl, then pip install "pyarchinit-photogrammetry[all]" (pye57 is compiled there and needs libxerces-c-dev).

Fixes

  • A plan slice above or below the model said that the plan was saved (an empty drawing): it now says that the plane does not cut the model.
  • Spot heights on the edge of a DEM, model cleaning with many small pieces and the I3S normals of degenerate faces were checked on more meshes.

Desktop applications for macOS (Apple Silicon) and Windows are attached below; with pip: pip install -U pyarchinit-photogrammetry. Documentation: README, interface, API.

v0.6.1

Choose a tag to compare

@enzococca enzococca released this 19 Oct 04:55
38fab5e

What's new in 0.6.1

A fix release of 0.6.0 (scale bars and markers as in Metashape: see the 0.6.0 notes).

Fixes

  • Poisson meshing failed often on several threads in Open3D 0.19 ("Failed to close loop", crashes) and fell back to a height field, wrong for objects (a bowl came out as a 5 cm surface instead of 16 cm). After a failure the reconstruction now runs again on one thread, which does not fail, then at a shallower depth, and only then uses the height field.

Desktop applications for macOS (Apple Silicon) and Windows are attached below; with pip: pip install -U pyarchinit-photogrammetry.

v0.6.0

Choose a tag to compare

@enzococca enzococca released this 17 Oct 08:42
c8cba5f

What's new in 0.6.0

Scale bars, as in Metashape

  • Choose two markers, give their distance in metres, and the whole chunk is scaled; every bar shows the distance measured on the model and its error. Several control bars are combined, each weighted by its accuracy; check bars only measure.
  • Works without coordinates: an object on a turntable, a find, a wall or a trench is scaled in local coordinates. The GPS of a phone or a drone over a few metres is left out as noise; over a site, photo positions, control points and bars are fitted together, each by its accuracy.
  • Scale bars take part in Ottimizza camere (two or more, or with control points): the block bends towards their lengths as far as the photos allow.
  • Bars from a CSV file, printable scale bars (two coded targets at a known distance, with a ruler and the CSV), drawn in the 3D view; command line ppg scalebar and ppg markers scalebar.
  • On a georeferenced chunk a new bar is proposed as a check; a control bar on a chunk georeferenced elsewhere (an imported project) scales it in place, in its CRS.

Markers, as in Metashape

  • A marker placed on one photo lies on the surface (dense cloud or tie points) at once: it has coordinates, shows on the model and on the orthophoto and can end a scale bar.
  • Markers can be added on the model or the cloud (Marker in the 3D view) and on the orthophoto or the DEM (Marker in the drawing bar).
  • Guided placement: a new marker gets blue flags (its estimated place) on the other photos that see it and the Foto pane is filtered on it, with badges (green: measured, blue: to confirm). Open a photo: it is centred on the marker; drag the blue flag onto the point or double click it, then Page Down for the next photo.
  • Photos filtered by marker, by point (orthophoto, 3D view) or by area; Coordinate stimate in the Reference pane shows the estimated X, Y, Z of the markers.

Imports

  • Metashape projects bring their scale bars (distance, accuracy, check bars) and the accuracy of the markers.
  • WebODM tasks bring the camera poses and calibrations and the GCPs as markers measured in the photos, triangulated at once with the errors ODM computed.

Fixes

  • Metashape projects in local coordinates scaled by scale bars came in 3 to 14 times too large: the scale of such chunks (a transform with the scale alone) was dropped.

Desktop applications for macOS (Apple Silicon) and Windows are attached below; with pip: pip install -U pyarchinit-photogrammetry. Documentation: README, interface, API.

v0.5.1

Choose a tag to compare

@enzococca enzococca released this 17 Oct 04:59
cce335a

What's new in 0.5.1

A fix release of 0.5.0: the new features (orthophotos at full resolution and patches, cleaning, confidence and cropping, excavation records, point classes, chunk alignment and merging, readable textures) are described in the 0.5.0 notes.

Fixes

  • The packaged macOS application did not start on macOS 15: the 0.5 start loads the libraries behind the splash first, and the crash log (faulthandler) could then be refused by the system. The crash log is now turned on before the libraries load - so it also records crashes while they load - and a system that refuses it no longer stops the start (a warning in the log instead).

Desktop applications for macOS (Apple Silicon) and Windows are attached below; with pip: pip install -U pyarchinit-photogrammetry.

v0.5.0

Choose a tag to compare

@enzococca enzococca released this 17 Oct 04:33
65fc744

The macOS application of 0.5.0 did not start on macOS 15 and is not attached here: download 0.5.1, with the fix, from v0.5.1.

What's new in 0.5.0

Orthophotos at full resolution, and patches

  • Large orthophotos and DEMs open from a reduced copy and, when you zoom in, the visible part is read again from the file up to the full resolution: the 45,000 x 46,000 px orthophoto of a tell opens in under a second and shows its 1.35 cm pixels in a fraction of a second.
  • Assign photos to an area (patches, as in Metashape): draw an area on the orthophoto (Patch in the drawing bar) or use a selected polygon; the photos that frame it are listed best first, each with the area as it would come out. Use only the chosen photos or every photo but them, on the DEM (a true orthophoto) or on the ground around the area: trees, vehicles and people come out as the photo shows them instead of swirls over a DEM that does not fit them, and holes of the DEM are filled. Only the patch is drawn again, with the overviews of that window (2 s on a tell instead of a minute); patches stay in the project as a layer and apply to later builds; an orthophoto of another program is copied first and never changed.
  • The same patch corrects the texture of the model, and the lasso in the 3D view offers Correggi la texture di queste facce. Command line: ppg patch.
  • Large orthophotos are built tile by tile, in parallel, with overviews (a tell at 1.35 cm/px in 4-6 minutes); cells seen only at grazing angles stay transparent instead of smearing the photos.

Cleaning, confidence and cropping

  • Confidence of the dense cloud and of the model (how many depth maps confirm each point or vertex), shown in the 3D view and kept in PLY and LAS files.
  • Cleaning of the dense cloud (confidence, isolated points, detached groups, classes, colour), of the model (unseen faces, detached pieces, stretched triangles, holes, smoothing, decimation) and of the tie points (gradual selection), with the points to remove shown in red first.
  • Crop with a box or a polygon drawn on the orthophoto or the DEM: DEM, orthophoto, model and dense cloud exported cut, or cut in the project with the originals kept as versions. Files of other programs are never changed.
  • Photos kept online only by Dropbox, iCloud or OneDrive are detected before every step that reads the photos, with Ricollega foto to another copy (e.g. an external disk).

Excavation records and point classes

  • One site per project; drawn units and spot heights carry the fields of pyunitastratigrafiche and pyarchinit_quote, are saved with the project and published to PyArchInit once.
  • Segment Anything 2.1 by tap, box, area or the whole orthophoto in tiles, with corrections; PyTorch for the graphics card (Apple GPU, CUDA) installed on demand.
  • Point classes shown, hidden and corrected with a lasso in the 3D view; a trainable point classifier with reusable models; one class per stratigraphic unit, with statistics.
  • DEM (a DTM from the ground alone), orthophoto, mesh, sections and exports from chosen point classes.

Engine

  • Mesh from the depth maps (TSDF fusion); camera optimisation constrained by the control points (ppg optimize).
  • Align and merge chunks by markers, photos in common or overlapping clouds (ppg align-chunks, ppg merge-chunks).
  • Versions of the dense cloud, model, DEM and orthophoto, kept to compare them (DEM differences in the view).

Textures and Metashape

  • Readable textures: for terrain seen from the air the texture of the model is its orthophoto, with cells of their own for walls and sections (adaptive orthophoto mapping); models keep their colours and texture through cleaning, cropping and confidence.
  • The Metashape import brings the model with its colours and texture, the internal DEM when the exported one is missing or empty, and File > Importa > Modello e texture dal progetto Metashape adds them to projects imported before.

Interface

  • A splash with a progress bar while the application starts (the window in about 1.3 s); projects open with a progress card and the photo thumbnails load in the background.
  • Points, faces or pixels in brackets next to every product; adjustable point size; millions of points on the graphics card.
  • Sections at an automatic scale with a readable preview; contour lines with a suggested interval, simplification and smoothing; the live QGIS link through a GeoPackage.

Fixes

  • The DEM view is lit from the north-west, like the exported hillshade (the relief could look inverted).
  • A fork after a PyArchInit (SpatiaLite) database no longer crashes or hangs the process.
  • Numbers are read in the C locale after Qt starts (the IFC preview was empty on an Italian macOS).
  • Depth maps of imported Metashape projects; the sam extra installs huggingface_hub.
  • Chunk alignment by points without an initial position keeps the alternative fits of a symmetric scene (a rectangular trench could be registered turned by 180 degrees).

Desktop applications for macOS (Apple Silicon) and Windows are attached below; with pip: pip install -U pyarchinit-photogrammetry. Documentation: README, interface, API.

v0.4.1

Choose a tag to compare

@enzococca enzococca released this 15 Oct 18:45
2e4c09a

What's new in 0.4.1

Drawing and editing vectors

  • Select, delete and merge: Seleziona in the drawing toolbar (click, Shift/Cmd+click, rubber band; hidden layers are not selectable), Elimina (Delete/Backspace or right click) and Unisci for stratigraphic units (choose which attributes to keep) and for touching lines. Units loaded from PyArchInit are written back with Salva modifiche in PyArchInit, which asks before deleting.
  • Freehand drawing: press, trace and release; the line is simplified (0.5 px) keeping the original points.
  • Snapping to the vertices and segments of the visible layers (tolerance 6, 12 or 20 px); a magenta marker shows the snap, and units traced along a shared boundary share it exactly.

PyArchInit and QGIS

  • Reduced US tables: databases created by the 0.2 demo (or by older PyArchInit versions) have a us_table without relationships, characteristics, elevations and measures. The US form now says so, and Aggiorna struttura del database (also in the PyArchInit menu) adds the missing columns after a backup copy (<file>.backup_<date>), without touching the records.
  • QGIS live link: fixed AttributeError: 'tuple' object has no attribute 'get' when exporting the drawn layers.

Metashape import of large projects

  • The mesh is extracted in streaming and the 3D view uses a display copy of about 600,000 faces: a whole tell no longer loads gigabytes into memory, and the view no longer shows a random subset of faces that looked like a mesh full of holes.
  • Projects without a dense cloud (Metashape 2 builds the mesh from depth maps) get one from the coloured mesh vertices.
  • Cameras inside camera groups are read; alignment components keep their own transformation and the points of deleted components are dropped; coordinates are converted exactly, point by point; exported DEMs and orthomosaics are linked only when they cover the project.
  • Tested on real projects: Tell Dlamah (659 photos) imports in about 6 s, with tie points and mesh within a few millimetres of Metashape's DEM.

Interface

  • The window fits a laptop screen: it could not be narrower than about 1940 px. The buttons of the panes wrap, a pane that is too short scrolls, and a toolbar that does not fit drops its texts (the drawing bar from its last buttons, so the drawing tools keep their names longest). The >> button of a full toolbar is visible again.

Engine

  • Alignment with square pixels: photos are aligned with one focal length unless their sensor carries a calibration with fx ≠ fy or tangential distortion. Fitting fx and fy separately occasionally converged to a degenerate solution (on the turntable test scene 1 alignment in 6: a folded camera ring and a scale wrong by up to 10×). The sensor keeps its OPENCV model with fx = fy; Ottimizza camere refines every parameter.

Development

  • The tests no longer write into the user's preferences (QSettings(organization, application) ignored the test redirection).
  • The macOS build retries hdiutil create when the volume is busy.

Downloads

Platform File
macOS 15 or newer (Apple Silicon) PyArchInit-Photogrammetry-0.4.1-macos-arm64.dmg
Windows 10/11 (64 bit) PyArchInit-Photogrammetry-0.4.1-windows-x64.zip

The builds are unsigned: on macOS right-click > Open the first time, on Windows More info > Run anyway. With Python: pip install "pyarchinit-photogrammetry[all]".

Full Changelog: v0.4.0...v0.4.1

v0.4.0

Choose a tag to compare

@enzococca enzococca released this 15 Oct 15:30
9563873

What's new in 0.4.0

Stratigraphic units, PyArchInit and BIM

  • US forms: open, edit and create us_table records from the interface, with the stratigraphic relationships stored in PyArchInit's own format (its Harris matrix reads them).
  • 3D proxies of stratigraphic units: each unit polygon becomes a closed solid between the DEM and a base (plane, later DEM, constant thickness or lowest point), with volume, plan area and elevations; Extended Matrix OBJ export; publication as a 3D media linked to the US.
  • IFC export with progress and preview; proxy solids carry quantities for take-off (Qto_PyArchInit_US: volume, area, height, elevations), materials, period/phase groups and the stratigraphic relationships (IfcRelConnectsElements). See docs/bim.md.
  • Layer attributes are editable; changes to PyArchInit units are written back.

Integrations

  • Live QGIS project: orthophoto, DEM and every drawn layer, refreshed in QGIS while you draw.
  • Imports: Metashape .psx projects (cameras, calibration, markers, tie points, model, DEM/orthomosaic), WebODM/ODM tasks, Photo3D sessions; ppg photo3d-job runs as a Photo3D engine.
  • Segment Anything 2.1 in the packaged application: installed on first use in a separate environment.

Fixes

  • Cut/fill volumes: excavated and filled volumes were swapped when a reference surface was given; edge cells are now weighted by polygon coverage.
  • The PyPI packages now include the PyArchInit schema and the logo: pip installs could not create the demo database.
  • Qt's standard buttons are in Italian like the rest of the interface.

Downloads

Platform File
macOS 15 or newer (Apple Silicon) PyArchInit-Photogrammetry-0.4.0-macos-arm64.dmg
Windows 10/11 (64 bit) PyArchInit-Photogrammetry-0.4.0-windows-x64.zip

The builds are unsigned: on macOS right-click > Open the first time, on Windows More info > Run anyway. With Python: pip install "pyarchinit-photogrammetry[all]".

Full Changelog: v0.3.0...v0.4.0

v0.3.0

Choose a tag to compare

@enzococca enzococca released this 15 Oct 13:31
fb896c3

Full Changelog: v0.2.0...v0.3.0

v0.2.0

Choose a tag to compare

@enzococca enzococca released this 15 Oct 09:06
e6f5ca3

Full Changelog: v0.1.0...v0.2.0

0.1.0

Choose a tag to compare

@enzococca enzococca released this 15 Oct 07:59
a621644