CameronBodine / PINGMapper

Open-source interface for processing recreation-grade side scan sonar datasets and reproducibly mapping benthic habitat
https://cameronbodine.github.io/PINGMapper/
MIT License
43 stars 3 forks source link

Check code dependencies #18

Closed CameronBodine closed 2 years ago

CameronBodine commented 2 years ago

Need to check which libraries are absolutely necessary. The following lists the installed packages for the ping-tf environment:

(ping-tf) E:\NAU\Python\PINGMapper>conda list
# packages in environment at C:\Users\csb67\.conda\envs\ping-tf:
#
# Name                    Version                   Build  Channel
_tflow_select             2.3.0                       mkl
abseil-cpp                20210324.2           hd77b12b_0
absl-py                   0.13.0           py37haa95532_0
affine                    2.3.0                      py_0
aiohttp                   3.7.4            py37h2bbff1b_1
astor                     0.8.1            py37haa95532_0
astunparse                1.6.3                      py_0
async-timeout             3.0.1            py37haa95532_0
attrs                     21.2.0             pyhd3eb1b0_0
aws-c-common              0.4.57               ha925a31_1
aws-c-event-stream        0.1.6                hd77b12b_5
aws-checksums             0.1.9                ha925a31_0
aws-sdk-cpp               1.8.185              hd77b12b_0
blas                      1.0                         mkl
blinker                   1.4              py37haa95532_0
blosc                     1.21.0               h19a0ad4_0
bottleneck                1.3.2            py37h2a96729_1
brotli                    1.0.9                ha925a31_2
brotlipy                  0.7.0           py37h2bbff1b_1003
bzip2                     1.0.8                he774522_0
ca-certificates           2021.7.5             haa95532_1
cached-property           1.5.2                      py_0
cachetools                4.2.2              pyhd3eb1b0_0
certifi                   2021.5.30        py37haa95532_0
cffi                      1.14.6           py37h2bbff1b_0
cfitsio                   3.470                he774522_6
chardet                   3.0.4           py37haa95532_1003
charls                    2.2.0                h6c2663c_0
click                     7.1.2              pyhd3eb1b0_0
click-plugins             1.1.1                      py_0
cligj                     0.7.2            py37haa95532_0
cloudpickle               1.6.0                      py_0
coverage                  5.5              py37h2bbff1b_2
cryptography              3.4.7            py37h71e12ea_0
curl                      7.71.1               h86230a5_2
cycler                    0.10.0                   py37_0
cython                    0.29.24          py37hd77b12b_0
cytoolz                   0.11.0           py37he774522_0
dask-core                 2021.7.2           pyhd3eb1b0_0
expat                     2.4.1                h6c2663c_2
flatbuffers               2.0.0                h6c2663c_0
fonttools                 4.25.0             pyhd3eb1b0_0
freetype                  2.10.4               hd328e21_0
freexl                    1.0.6                h2bbff1b_0
fsspec                    2021.7.0           pyhd3eb1b0_0
gast                      0.4.0                      py_0
gdal                      3.0.2            py37hb978731_1
geos                      3.8.0                h33f27b4_0
geotiff                   1.6.0                h5770a2b_0
giflib                    5.2.1                h62dcd97_0
google-auth               1.33.0             pyhd3eb1b0_0
google-auth-oauthlib      0.4.1                      py_2
google-pasta              0.2.0                      py_0
grpcio                    1.36.1           py37hc60d5dd_1
h5py                      3.2.1            py37h3de5c98_0
hdf4                      4.2.13               h712560f_2
hdf5                      1.10.6               h7ebc959_0
icc_rt                    2019.0.0             h0cc432a_1
icu                       68.1                 h6c2663c_0
idna                      2.10               pyhd3eb1b0_0
imagecodecs               2021.6.8         py37h5da4933_0
imageio                   2.9.0              pyhd3eb1b0_0
importlib-metadata        3.10.0           py37haa95532_0
intel-openmp              2021.3.0          haa95532_3372
joblib                    1.0.1              pyhd3eb1b0_0
jpeg                      9b                   hb83a4c4_2
kealib                    1.4.14               hde4a422_0
keras-preprocessing       1.1.2              pyhd3eb1b0_0
kiwisolver                1.3.1            py37hd77b12b_0
krb5                      1.19.2               h5b6d351_0
lcms2                     2.12                 h83e58a3_0
lerc                      2.2.1                hd77b12b_0
libaec                    1.0.4                h33f27b4_1
libcurl                   7.71.1               h86230a5_2
libdeflate                1.7                  h2bbff1b_5
libgdal                   3.0.2                ha1b3edf_1
libiconv                  1.15                 h1df5818_7
libnetcdf                 4.6.1                hf59b723_4
libpng                    1.6.37               h2a8f88b_0
libpq                     12.2                 hb652d5d_1
libprotobuf               3.14.0               h23ce68f_0
libspatialite             4.3.0a               h7ffb84d_0
libssh2                   1.9.0                h7a1dbc1_1
libtiff                   4.2.0                hd0e1b90_0
libxml2                   2.9.12               h0ad7f3c_0
libzopfli                 1.0.3                ha925a31_0
locket                    0.2.1            py37haa95532_1
lz4-c                     1.9.3                h2bbff1b_0
m2w64-expat               2.1.1                         2
m2w64-gcc-libgfortran     5.3.0                         6
m2w64-gcc-libs            5.3.0                         7
m2w64-gcc-libs-core       5.3.0                         7
m2w64-gettext             0.19.7                        2
m2w64-gmp                 6.1.0                         2
m2w64-libiconv            1.14                          6
m2w64-libwinpthread-git   5.0.0.4634.697f757               2
m2w64-xz                  5.2.2                         2
markdown                  3.3.4            py37haa95532_0
matplotlib-base           3.4.2            py37h49ac443_0
mkl                       2021.3.0           haa95532_524
mkl-service               2.4.0            py37h2bbff1b_0
mkl_fft                   1.3.0            py37h277e83a_2
mkl_random                1.2.2            py37hf11a4ad_0
msys2-conda-epoch         20160418                      1
multidict                 5.1.0            py37h2bbff1b_2
munkres                   1.1.4                      py_0
networkx                  2.6.2              pyhd3eb1b0_0
numexpr                   2.7.3            py37hb80d3ca_1
numpy                     1.20.3           py37ha4e8547_0
numpy-base                1.20.3           py37hc2deb75_0
oauthlib                  3.1.1              pyhd3eb1b0_0
olefile                   0.46                     py37_0
openjpeg                  2.3.0                h5ec785f_1
openssl                   1.1.1l               h2bbff1b_0
opt_einsum                3.3.0              pyhd3eb1b0_1
packaging                 21.0               pyhd3eb1b0_0
pandas                    1.3.0            py37hd77b12b_0
partd                     1.2.0              pyhd3eb1b0_0
pillow                    8.3.1            py37h4fa10fc_0
pip                       21.2.2           py37haa95532_0
postgresql                12.2                 hb652d5d_1
proj                      6.2.1                h9f7ef89_0
protobuf                  3.14.0           py37hd77b12b_1
pyasn1                    0.4.8                      py_0
pyasn1-modules            0.2.8                      py_0
pycparser                 2.20                       py_2
pyjwt                     2.1.0            py37haa95532_0
pyopenssl                 20.0.1             pyhd3eb1b0_1
pyparsing                 2.4.7              pyhd3eb1b0_0
pyproj                    2.6.1.post1      py37h593ac45_1
pyreadline                2.1                      py37_1
pysocks                   1.7.1                    py37_1
python                    3.7.11               h6244533_0
python-dateutil           2.8.2              pyhd3eb1b0_0
python-flatbuffers        1.12               pyhd3eb1b0_0
pytz                      2021.1             pyhd3eb1b0_0
pywavelets                1.1.1            py37he774522_2
pyyaml                    5.4.1            py37h2bbff1b_1
rasterio                  1.1.0            py37h039b02d_0
requests                  2.25.1             pyhd3eb1b0_0
requests-oauthlib         1.3.0                      py_0
rsa                       4.7.2              pyhd3eb1b0_1
scikit-image              0.18.1           py37hf11a4ad_0
scipy                     1.6.2            py37h66253e8_1
setuptools                52.0.0           py37haa95532_0
six                       1.16.0             pyhd3eb1b0_0
snappy                    1.1.8                h33f27b4_0
snuggs                    1.4.7                      py_0
sqlite                    3.36.0               h2bbff1b_0
tensorboard               2.5.0                      py_0
tensorboard-plugin-wit    1.6.0                      py_0
tensorflow                2.5.0           mkl_py37h99b934d_0
tensorflow-base           2.5.0           mkl_py37h9201259_0
tensorflow-estimator      2.5.0              pyh7b7c402_0
termcolor                 1.1.0            py37haa95532_1
tifffile                  2021.7.2           pyhd3eb1b0_2
tiledb                    2.2.9                hf7ce2e6_0
tk                        8.6.10               he774522_0
toolz                     0.11.1             pyhd3eb1b0_0
tornado                   6.1              py37h2bbff1b_0
typing-extensions         3.10.0.0             hd3eb1b0_0
typing_extensions         3.10.0.0           pyh06a4308_0
urllib3                   1.26.6             pyhd3eb1b0_1
vc                        14.2                 h21ff451_1
vs2015_runtime            14.27.29016          h5e58377_2
werkzeug                  1.0.1              pyhd3eb1b0_0
wheel                     0.35.1             pyhd3eb1b0_0
win_inet_pton             1.1.0            py37haa95532_0
wincertstore              0.2                      py37_0
wrapt                     1.12.1           py37he774522_1
xerces-c                  3.2.3                ha925a31_0
xz                        5.2.5                h62dcd97_0
yaml                      0.2.5                he774522_0
yarl                      1.6.3            py37h2bbff1b_0
zfp                       0.5.5                hd77b12b_6
zipp                      3.5.0              pyhd3eb1b0_0
zlib                      1.2.11               h62dcd97_4
zstd                      1.4.9                h19a0ad4_0
CameronBodine commented 2 years ago

Imported packages for each script:

main.py::

from funcs_common import *
from pj_readFiles import read_master_func
from pj_rectify import rectify_master_func

import time
import datetime

pj_readFiles.py::

from funcs_common import *
from c_sonObj import sonObj
from joblib import delayed
import time
from scipy.signal import savgol_filter

c_sonObj.py::

from funcs_common import *
from funcs_bedpick import *
# from scipy.signal import savgol_filter

from skimage.filters import gaussian
from skimage.morphology import remove_small_holes, remove_small_objects
from skimage.measure import label, regionprops
from skimage.io import imsave

import matplotlib
matplotlib.use('agg')
import matplotlib.pyplot as plt

pj_rectify.py::

from __future__ import division
from funcs_common import *

from c_rectObj import rectObj

from rasterio.merge import merge
import gdal

c_rectObj.py::

from funcs_common import *
from c_sonObj import sonObj
from scipy.interpolate import splprep, splev
from skimage.transform import PiecewiseAffineTransform, warp
from rasterio.transform import from_origin
from PIL import Image

funcs_common.py::

import os, sys, struct, gc
from joblib import Parallel, delayed, cpu_count
from glob import glob

import numpy as np
from array import array as arr

import pyproj
import imageio # Scikit-image dep; need to update image manip w/ rasterio for consistency
import rasterio
from numpy.lib.stride_tricks import as_strided as ast

import pandas as pd

from collections import defaultdict
from copy import deepcopy
import pickle
import shutil

funcs_bedpick.py::

import os, time
import json
import tensorflow as tf
import numpy as np

from skimage.morphology import remove_small_holes, remove_small_objects
from skimage.transform import resize
from skimage.filters import threshold_otsu
from skimage.measure import label, regionprops

import tensorflow.keras.backend as K
CameronBodine commented 2 years ago

Looking at PINGMapper_TF.yml, required dependencies specified in the file are necessary, and other packages (such as imageio), are dependencies required by packages specified in the conda environment. Therefore, dependencies seem as straight forward as possible and no further removal of dependencies necessary at this time. Closing issue for now.