This tutorial will walk through how to set up and use the ShipwreckFinder QGIS plugin. For the best performance, we highly recommend using a custom Conda environment on a Linux machine with CUDA installed, however, the plugin may also be run on MacOS, as well as machines without CUDA.
PLEASE NOTE: ShipwreckFinder is NOT currently compatible with Windows.
Install the ShipwreckFinder plugin
The source code for the ShipwreckFinder plugin can be found here, if you would like to take a look. However, the steps to set up the plugin will be covered on this page, along with links to relevant files.
Install Anaconda and set up Conda virtual environment
The most effective way to set up the plugin is to use a Conda virtual environment. Download Miniconda here. Next, create a Conda environment and install QGIS via Conda to prevent library conflicts and ensure the smoothest possible performance. Then install the plugin's required libraries. To do this, run these commands in your terminal:
conda create --name qgis_env python=3.11
conda activate qgis_env
conda install qgis -c conda-forge
conda install torchmetrics wandb matplotlib pillow shapely fiona rasterio scipy -c conda-forge
conda install opencv -c conda-forge
pip install tqdm yacs
Next step for Linux
For the last step on Linux there are two options. Option one installs the complete torch and torchvision packages, and option two installs a smaller version of both libraries. Option one is highly recommended, as the plugin's runtime increases drastically with option 2, however, note that installing the complete packages will take longer.
pip install torch torchvision (recommended)
OR
pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu
Next step for Mac
On Mac, you need to run the following commands:
pip install "numpy<2"
conda install pytorch torchvision torchaudio -c conda-forge
At this point, all of the required libraries should be installed.
Install the ShipwreckFinder plugin via .zip file
The entire plugin has been compressed into a single .zip file, which can be found here. Download this .zip file, and then run the following command in the terminal that has your Conda environment active:
qgis
This will open an instance of QGIS, running through your Conda environment so all the necessary Python libraries are installed.
Next, locate the Plugins menu in the top menu bar. Select this menu and choose the Manage and Install Plugins... option. This should bring up the menu seen to the right.
Simply select the three dots, navigate to the .zip file downloaded from earlier, and select that file. Then, click the Install Plugin button.
When the plugin is successfully installed, a bright green success banner will show at the top of the menu. At this point you can safely close out of the installation menu. The next steps are to download some test data and try running the plugin on GEOTIFF files containing real wreck sites.
Download and place the model weights
There are four different models available in the ShipwreckFinder plugin, each trained with a different backbone, and each with their own strengths and weaknesses. Any of these models can be selected when using the plugin, depending on the desired output. The model weights can be found here. Only one of these files is required to run the plugin, but only the corresponding model can be selected. To run the model that is selected by default, download the unetaux_rosy-elevator-246_best.pt file.
These files need to be placed in a specific location dependent on the operating system:
Linux: ~/.local/share/QGIS/QGIS3/profiles/default/python/plugins/qgisplugin/core
MacOS: ~/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/qgisplugin/core
Download bathymetric data and run ShipwreckFinder
Some example bathymetric data can be found here. There are two GEOTIFFs: One is a small portion of a publicly available NOAA survey of Thunder Bay in Lake Huron, and other is a clip of a publicly available INFOMAR survey of the Celtic Sea. Download both of these files. Next, create a new QGIS project and import the GEOTIFFs.
To run the ShipwreckFinder plugin, navigate to the Raster menu in the top menu bar. Then, select the ShipwreckFinder Menu, and from there select ShipwreckFinder. This will bring up the menu seen on the right.
From here, use the drop-down menu to select your bathymetric data raster. Select your Clipping Extent using the three dots next to the text box. Chose Use Current Layer to set the extent to be the entire raster layer you have chosen, or use Select Extent on Canvas to draw an area on the raster layer. Clicking the Other parameters arrow will open a menu with more advanced parameters. Next, set up your Output path by selecting the three dots next to the text box, navigating to wherever you want the output to be placed, and naming the file.
Finally, select a model from the Select model architecture drop-down, and click Run. The result will end up on top of the bathymetric raster layer you selected to analysis.