diff --git a/README.md b/README.md index 0df6d04..02c442a 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,15 @@ # ODM_Pro -无人机三维重建 +无人机三维重建。 ## Install ```bash -conda install fiona pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple ``` -Centos7安装open3d失败执行 +## 制作exe -```bash -conda install -c conda-forge open3d -``` +1. odm_monitor.py docker run要记得改 +2. osgconv的compressed参数去掉,会报错 +3. 运行指令`pyinstaller main.spec` +4. 测试执行指令`uav.exe --image_dir E:\datasets\UAV\134\project\images --output_dir G:\ODM_output\134` diff --git a/check_version.py b/check_version.py new file mode 100644 index 0000000..f0652fa --- /dev/null +++ b/check_version.py @@ -0,0 +1,24 @@ +import importlib +import pkg_resources + +def check_versions(requirements_file): + with open(requirements_file, 'r', encoding='utf-8') as f: + packages = [line.strip() for line in f if line.strip() and not line.startswith('#') and not line.startswith('//')] + + print(f"{'Package':<20} {'Installed Version':<20}") + print('-' * 40) + for pkg in packages: + try: + # 有些包名和import名不同,优先用pkg_resources + version = pkg_resources.get_distribution(pkg).version + print(f"{pkg:<20} {version:<20}") + except Exception: + try: + mod = importlib.import_module(pkg) + version = getattr(mod, '__version__', 'Unknown') + print(f"{pkg:<20} {version:<20}") + except Exception: + print(f"{pkg:<20} {'Not Installed':<20}") + +if __name__ == "__main__": + check_versions("requirements.txt") \ No newline at end of file diff --git a/main.spec b/main.spec new file mode 100644 index 0000000..5193e00 --- /dev/null +++ b/main.spec @@ -0,0 +1,47 @@ +# -*- mode: python ; coding: utf-8 -*- + + +a = Analysis( + ['main.py'], + pathex=[], + binaries=[], + datas=[], + hiddenimports=[ + 'rasterio.sample', + 'rasterio.vrt', + 'rasterio._io', + 'rasterio.enums', + 'rasterio.errors', + 'rasterio.transform', + 'rasterio.crs', + 'rasterio.warp' + ], + hookspath=[], + hooksconfig={}, + runtime_hooks=[], + excludes=[], + noarchive=False, + optimize=0, +) +pyz = PYZ(a.pure) + +exe = EXE( + pyz, + a.scripts, + a.binaries, + a.datas, + [], + name='main', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + upx_exclude=[], + runtime_tmpdir=None, + console=True, + disable_windowed_traceback=False, + argv_emulation=False, + target_arch=None, + codesign_identity=None, + entitlements_file=None, +) diff --git a/requirements.txt b/requirements.txt index e4f8dee..315ed38 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,14 +1,14 @@ -numpy -pandas -scikit-learn -matplotlib -piexif -geopy -psutil -docker -tqdm -pyproj -rasterio -edt -opencv-python -fiona \ No newline at end of file +numpy==1.26.4 +pandas==2.2.3 +scikit-learn==1.6.1 +matplotlib==3.10.0 +piexif==1.1.3 +geopy==2.4.1 +psutil==6.1.1 +docker==7.1.0 +tqdm==4.66.5 +pyproj==3.7.0 +rasterio==1.4.3 +edt==3.0.0 +opencv-python==4.11.0.86 +fiona==1.9.5 \ No newline at end of file