deepforest 1.4.0.dev0__tar.gz → 1.5.1.dev0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. deepforest-1.5.1.dev0/.bumpversion.toml +41 -0
  2. deepforest-1.5.1.dev0/.github/ISSUE_TEMPLATE/bug_report.md +45 -0
  3. deepforest-1.5.1.dev0/.github/ISSUE_TEMPLATE/data_contribution.md +26 -0
  4. deepforest-1.5.1.dev0/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
  5. deepforest-1.5.1.dev0/.github/workflows/Conda-app.yml +73 -0
  6. deepforest-1.5.1.dev0/.github/workflows/automate-waiting-labels.yml +35 -0
  7. deepforest-1.5.1.dev0/.github/workflows/publish.yml +49 -0
  8. deepforest-1.5.1.dev0/.gitignore +23 -0
  9. deepforest-1.5.1.dev0/.pre-commit-config.yaml +22 -0
  10. deepforest-1.5.1.dev0/.readthedocs.yml +19 -0
  11. deepforest-1.5.1.dev0/.style.yapf +4 -0
  12. deepforest-1.5.1.dev0/.zenodo.json +51 -0
  13. {deepforest-1.4.0.dev0 → deepforest-1.5.1.dev0}/AUTHORS.rst +12 -8
  14. deepforest-1.5.1.dev0/CITATION.cff +43 -0
  15. deepforest-1.5.1.dev0/CONTRIBUTING.rst +184 -0
  16. deepforest-1.5.1.dev0/HISTORY.rst +121 -0
  17. deepforest-1.5.1.dev0/MANIFEST.in +21 -0
  18. deepforest-1.5.1.dev0/PKG-INFO +126 -0
  19. {deepforest-1.4.0.dev0 → deepforest-1.5.1.dev0}/README.md +2 -2
  20. deepforest-1.5.1.dev0/_config.yml +1 -0
  21. deepforest-1.5.1.dev0/deepforest_config.yml +60 -0
  22. deepforest-1.5.1.dev0/dev_requirements.txt +45 -0
  23. deepforest-1.5.1.dev0/environment.yml +54 -0
  24. deepforest-1.5.1.dev0/pyproject.toml +79 -0
  25. deepforest-1.5.1.dev0/pytest.ini +4 -0
  26. {deepforest-1.4.0.dev0 → deepforest-1.5.1.dev0/src}/deepforest/__init__.py +1 -0
  27. deepforest-1.5.1.dev0/src/deepforest/_version.py +2 -0
  28. deepforest-1.5.1.dev0/src/deepforest/data/2018_SJER_3_252000_4107000_image_477.csv +8 -0
  29. deepforest-1.5.1.dev0/src/deepforest/data/2018_SJER_3_252000_4107000_image_477.tif +0 -0
  30. deepforest-1.5.1.dev0/src/deepforest/data/2018_SJER_3_252000_4107000_image_477_truth.csv +8 -0
  31. deepforest-1.5.1.dev0/src/deepforest/data/AWPE Pigeon Lake 2020 DJI_0005.JPG +0 -0
  32. deepforest-1.5.1.dev0/src/deepforest/data/australia.cpg +1 -0
  33. deepforest-1.5.1.dev0/src/deepforest/data/australia.dbf +0 -0
  34. deepforest-1.5.1.dev0/src/deepforest/data/australia.prj +1 -0
  35. deepforest-1.5.1.dev0/src/deepforest/data/australia.shp +0 -0
  36. deepforest-1.5.1.dev0/src/deepforest/data/australia.shx +0 -0
  37. deepforest-1.5.1.dev0/src/deepforest/data/australia.tif +0 -0
  38. {deepforest-1.4.0.dev0 → deepforest-1.5.1.dev0/src}/deepforest/data/deepforest_config.yml +1 -1
  39. deepforest-1.5.1.dev0/src/deepforest/data/test_tiled.tif +0 -0
  40. {deepforest-1.4.0.dev0 → deepforest-1.5.1.dev0/src}/deepforest/dataset.py +67 -0
  41. {deepforest-1.4.0.dev0 → deepforest-1.5.1.dev0/src}/deepforest/main.py +327 -114
  42. {deepforest-1.4.0.dev0 → deepforest-1.5.1.dev0/src}/deepforest/model.py +2 -2
  43. {deepforest-1.4.0.dev0 → deepforest-1.5.1.dev0/src}/deepforest/predict.py +10 -1
  44. {deepforest-1.4.0.dev0 → deepforest-1.5.1.dev0/src}/deepforest/preprocess.py +0 -6
  45. {deepforest-1.4.0.dev0 → deepforest-1.5.1.dev0/src}/deepforest/utilities.py +14 -79
  46. deepforest-1.5.1.dev0/src/deepforest/visualize.py +585 -0
  47. deepforest-1.5.1.dev0/src/deepforest.egg-info/PKG-INFO +126 -0
  48. deepforest-1.5.1.dev0/src/deepforest.egg-info/SOURCES.txt +103 -0
  49. {deepforest-1.4.0.dev0 → deepforest-1.5.1.dev0/src}/deepforest.egg-info/requires.txt +2 -2
  50. {deepforest-1.4.0.dev0 → deepforest-1.5.1.dev0/src}/deepforest.egg-info/top_level.txt +0 -1
  51. deepforest-1.5.1.dev0/test.py +0 -0
  52. deepforest-1.5.1.dev0/version_switcher.json +23 -0
  53. deepforest-1.5.1.dev0/www/2019_YELL_2_528000_4978000_image.png +0 -0
  54. deepforest-1.5.1.dev0/www/2019_YELL_2_541000_4977000_image.png +0 -0
  55. deepforest-1.5.1.dev0/www/2019_YELL_2_541000_4977000_image_crop.png +0 -0
  56. deepforest-1.5.1.dev0/www/2019_YELL_2_541000_4977000_image_crop.tiff +0 -0
  57. deepforest-1.5.1.dev0/www/MEE_Figure4.png +0 -0
  58. deepforest-1.5.1.dev0/www/OSBS_sample.png +0 -0
  59. deepforest-1.5.1.dev0/www/QGIS_annotation.png +0 -0
  60. deepforest-1.5.1.dev0/www/Visualization1.png +0 -0
  61. deepforest-1.5.1.dev0/www/Visualization2.png +0 -0
  62. deepforest-1.5.1.dev0/www/Visualization3.png +0 -0
  63. deepforest-1.5.1.dev0/www/YELL_train.png +0 -0
  64. deepforest-1.5.1.dev0/www/annotated_example.png +0 -0
  65. deepforest-1.5.1.dev0/www/bgr_rgb.png +0 -0
  66. deepforest-1.5.1.dev0/www/bird_panel.jpg +0 -0
  67. deepforest-1.5.1.dev0/www/example_image.png +0 -0
  68. deepforest-1.5.1.dev0/www/example_patch1000.png +0 -0
  69. deepforest-1.5.1.dev0/www/example_patch400.png +0 -0
  70. deepforest-1.5.1.dev0/www/example_predictions_small.png +0 -0
  71. deepforest-1.5.1.dev0/www/getting_started1.png +0 -0
  72. deepforest-1.5.1.dev0/www/image.png +0 -0
  73. deepforest-1.5.1.dev0/www/label_studio.png +0 -0
  74. deepforest-1.5.1.dev0/www/livestock-example.png +0 -0
  75. deepforest-1.5.1.dev0/www/loss.png +0 -0
  76. deepforest-1.5.1.dev0/www/predict_tile.png +0 -0
  77. deepforest-1.5.1.dev0/www/rectlabel.png +0 -0
  78. deepforest-1.5.1.dev0/www/semi-supervised.png +0 -0
  79. deepforest-1.4.0.dev0/MANIFEST.in +0 -18
  80. deepforest-1.4.0.dev0/PKG-INFO +0 -84
  81. deepforest-1.4.0.dev0/deepforest/_version.py +0 -1
  82. deepforest-1.4.0.dev0/deepforest/visualize.py +0 -293
  83. deepforest-1.4.0.dev0/deepforest.egg-info/PKG-INFO +0 -84
  84. deepforest-1.4.0.dev0/deepforest.egg-info/SOURCES.txt +0 -65
  85. deepforest-1.4.0.dev0/deepforest.egg-info/not-zip-safe +0 -1
  86. deepforest-1.4.0.dev0/setup.py +0 -73
  87. deepforest-1.4.0.dev0/tests/__init__.py +0 -2
  88. deepforest-1.4.0.dev0/tests/conftest.py +0 -70
  89. deepforest-1.4.0.dev0/tests/profile_dataset.py +0 -27
  90. deepforest-1.4.0.dev0/tests/profile_evaluate.py +0 -33
  91. deepforest-1.4.0.dev0/tests/profile_predict_file.py +0 -46
  92. deepforest-1.4.0.dev0/tests/test_FasterRCNN.py +0 -59
  93. deepforest-1.4.0.dev0/tests/test_IoU.py +0 -35
  94. deepforest-1.4.0.dev0/tests/test_callbacks.py +0 -30
  95. deepforest-1.4.0.dev0/tests/test_data.py +0 -23
  96. deepforest-1.4.0.dev0/tests/test_dataset.py +0 -183
  97. deepforest-1.4.0.dev0/tests/test_download.py +0 -100
  98. deepforest-1.4.0.dev0/tests/test_environment.py +0 -6
  99. deepforest-1.4.0.dev0/tests/test_evaluate.py +0 -166
  100. deepforest-1.4.0.dev0/tests/test_main.py +0 -662
  101. deepforest-1.4.0.dev0/tests/test_model.py +0 -94
  102. deepforest-1.4.0.dev0/tests/test_multiprocessing.py +0 -48
  103. deepforest-1.4.0.dev0/tests/test_preprocess.py +0 -339
  104. deepforest-1.4.0.dev0/tests/test_retinanet.py +0 -78
  105. deepforest-1.4.0.dev0/tests/test_utilities.py +0 -505
  106. deepforest-1.4.0.dev0/tests/test_visualize.py +0 -93
  107. {deepforest-1.4.0.dev0 → deepforest-1.5.1.dev0}/LICENSE +0 -0
  108. {deepforest-1.4.0.dev0 → deepforest-1.5.1.dev0}/setup.cfg +0 -0
  109. {deepforest-1.4.0.dev0 → deepforest-1.5.1.dev0/src}/deepforest/IoU.py +0 -0
  110. {deepforest-1.4.0.dev0 → deepforest-1.5.1.dev0/src}/deepforest/callbacks.py +0 -0
  111. {deepforest-1.4.0.dev0 → deepforest-1.5.1.dev0/src}/deepforest/data/2019_YELL_2_528000_4978000_image_crop2.png +0 -0
  112. {deepforest-1.4.0.dev0 → deepforest-1.5.1.dev0/src}/deepforest/data/2019_YELL_2_528000_4978000_image_crop2.xml +0 -0
  113. {deepforest-1.4.0.dev0 → deepforest-1.5.1.dev0/src}/deepforest/data/2019_YELL_2_541000_4977000_image_crop.png +0 -0
  114. {deepforest-1.4.0.dev0 → deepforest-1.5.1.dev0/src}/deepforest/data/2019_YELL_2_541000_4977000_image_crop.xml +0 -0
  115. {deepforest-1.4.0.dev0 → deepforest-1.5.1.dev0/src}/deepforest/data/OSBS_029.csv +0 -0
  116. {deepforest-1.4.0.dev0 → deepforest-1.5.1.dev0/src}/deepforest/data/OSBS_029.png +0 -0
  117. {deepforest-1.4.0.dev0 → deepforest-1.5.1.dev0/src}/deepforest/data/OSBS_029.tif +0 -0
  118. {deepforest-1.4.0.dev0 → deepforest-1.5.1.dev0/src}/deepforest/data/OSBS_029.xml +0 -0
  119. {deepforest-1.4.0.dev0 → deepforest-1.5.1.dev0/src}/deepforest/data/SOAP_031.png +0 -0
  120. {deepforest-1.4.0.dev0 → deepforest-1.5.1.dev0/src}/deepforest/data/SOAP_061.png +0 -0
  121. {deepforest-1.4.0.dev0 → deepforest-1.5.1.dev0/src}/deepforest/data/SOAP_061.xml +0 -0
  122. {deepforest-1.4.0.dev0 → deepforest-1.5.1.dev0/src}/deepforest/data/__init__.py +0 -0
  123. {deepforest-1.4.0.dev0 → deepforest-1.5.1.dev0/src}/deepforest/data/classes.csv +0 -0
  124. {deepforest-1.4.0.dev0 → deepforest-1.5.1.dev0/src}/deepforest/data/example.csv +0 -0
  125. {deepforest-1.4.0.dev0 → deepforest-1.5.1.dev0/src}/deepforest/data/testfile_deepforest.csv +0 -0
  126. {deepforest-1.4.0.dev0 → deepforest-1.5.1.dev0/src}/deepforest/data/testfile_multi.csv +0 -0
  127. {deepforest-1.4.0.dev0 → deepforest-1.5.1.dev0/src}/deepforest/download.py +0 -0
  128. {deepforest-1.4.0.dev0 → deepforest-1.5.1.dev0/src}/deepforest/evaluate.py +0 -0
  129. {deepforest-1.4.0.dev0 → deepforest-1.5.1.dev0/src}/deepforest/models/FasterRCNN.py +0 -0
  130. {deepforest-1.4.0.dev0 → deepforest-1.5.1.dev0/src}/deepforest/models/__init__.py +0 -0
  131. {deepforest-1.4.0.dev0 → deepforest-1.5.1.dev0/src}/deepforest/models/retinanet.py +0 -0
  132. {deepforest-1.4.0.dev0 → deepforest-1.5.1.dev0/src}/deepforest.egg-info/dependency_links.txt +0 -0
@@ -0,0 +1,41 @@
1
+ [tool.bumpversion]
2
+ current_version = "1.5.1-dev0"
3
+
4
+ parse = """(?x)
5
+ (?P<major>0|[1-9]\\d*)\\.
6
+ (?P<minor>0|[1-9]\\d*)\\.
7
+ (?P<patch>0|[1-9]\\d*)
8
+ (?:
9
+ - # dash separator for pre-release section
10
+ (?P<pre_l>[a-zA-Z-]+) # pre-release label
11
+ (?P<pre_n>0|[1-9]\\d*) # pre-release version number
12
+ )? # pre-release section is optional
13
+ """
14
+ serialize = [
15
+ "{major}.{minor}.{patch}",
16
+ "{major}.{minor}.{patch}-{pre_l}{pre_n}"
17
+ ]
18
+
19
+ [tool.bumpversion.parts.pre_l]
20
+ values = ["dev", "rc", "final"]
21
+ optional_value = "final"
22
+
23
+ search = "{current_version}"
24
+ replace = "{new_version}"
25
+ regex = false
26
+ ignore_missing_version = false
27
+ ignore_missing_files = false
28
+ tag = true
29
+ sign_tags = false
30
+ tag_name = "v{new_version}"
31
+ tag_message = "Bump version: {current_version} → {new_version}"
32
+ allow_dirty = false
33
+ commit = true # Commit after bumping the version
34
+ message = "Bump version: {current_version} → {new_version}"
35
+ commit_args = ""
36
+
37
+ [[tool.bumpversion.files]]
38
+ filename = "pyproject.toml"
39
+
40
+ [[tool.bumpversion.files]]
41
+ filename = "src/deepforest/_version.py"
@@ -0,0 +1,45 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to help us improve
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Describe the bug**
11
+ A clear and concise description of what the bug is. For questions and community discussion, please create a discussion (https://github.com/weecology/DeepForest/discussions).
12
+
13
+ **To Reproduce**
14
+ If possible provide a simple code example, using data from the package itself, that reproduces the behavior. The code block below is a starting point. Issues without reproducible code that we can use to explore the problem are much more difficult to understand and debug and so are much less likely to be addressed quickly. Spending some time creating a reproducible example makes it easier for us to help.
15
+
16
+ ```
17
+ # Load the modules
18
+ from deepforest import main
19
+ from deepforest import get_data
20
+ import os
21
+
22
+ # Use the latest release
23
+ m = main.deepforest()
24
+ m.use_release()
25
+
26
+ # Use package data for simple training example
27
+ m.config["train"]["csv_file"] = get_data("example.csv")
28
+ m.config["train"]["root_dir"] = os.path.dirname(get_data("example.csv"))
29
+ m.config["train"]["fast_dev_run"] = True
30
+ m.trainer.fit(m)
31
+ ```
32
+
33
+ **Environment (please complete the following information):**
34
+ - OS:
35
+ - Python version and environment :
36
+
37
+ **Screenshots and Context**
38
+ If applicable, add screenshots to help explain your problem. Please paste entire code instead of a snippet!
39
+
40
+ **User Story**
41
+ Tell us about who you are and what you hope to achieve with DeepForest
42
+
43
+ “As a [type of user] I want [my goal] so that [my reason].”
44
+
45
+
@@ -0,0 +1,26 @@
1
+ ---
2
+ name: Data Contribution
3
+ about: Contribute RGB data and annotations for training open-source release models
4
+ title: 'Data Contribution: '
5
+ labels: 'data'
6
+ assignees: 'bw4sz'
7
+
8
+ ---
9
+
10
+ **Data Description:**
11
+ Provide details on the data, like its location, the number of annotations, format, and the date of collection.
12
+
13
+ **Data Availability:**
14
+ Specify if the data is available online and mention any recommended platforms for data archiving, such as Zenodo. Additionally, express openness to various data sources and formats.
15
+
16
+ **RGB Imagery Collection:**
17
+ Explain how the RGB data imagery was collected and state the image resolution.
18
+
19
+ **Usage Restrictions:**
20
+ Outline any restrictions associated with using this data in the development of a release model.
21
+
22
+ **Licensing Information:**
23
+ If the data is associated with a license, provide details then name.
24
+
25
+ **Contact Information:**
26
+ Include relevant contact information for further inquiries or clarification.
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an idea for this project
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Please describe A feature you would like to be added.**
11
+ A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12
+
13
+ **Describe the solution you'd like**
14
+ A clear and concise description of what you want to happen.
15
+
16
+ **Describe alternatives you've considered**
17
+ A clear and concise description of any alternative solutions or features you've considered.
18
+
19
+ **Additional context**
20
+ Add any other context or screenshots about the feature request here.
@@ -0,0 +1,73 @@
1
+ name: Conda package
2
+
3
+ on:
4
+ push:
5
+ branches: [ main ]
6
+ pull_request:
7
+ branches: [ main ]
8
+
9
+ jobs:
10
+ ci:
11
+ name: "CI setup"
12
+
13
+ strategy:
14
+ fail-fast: false
15
+ matrix:
16
+ python-version:
17
+ - "3.12"
18
+ - "3.11"
19
+ - "3.10"
20
+
21
+ os:
22
+ - "ubuntu-latest"
23
+
24
+ runs-on: "${{ matrix.os }}"
25
+
26
+ # use bash everywhere
27
+ defaults:
28
+ run:
29
+ shell: "bash -l {0}"
30
+
31
+ steps:
32
+ - name: "Checkout code"
33
+ uses: "actions/checkout@v4"
34
+
35
+ - name: Install opencv dependencies
36
+ run: |
37
+ sudo apt-get update
38
+ sudo apt-get install -y libgl1 and libglx-mesa0
39
+
40
+ - name: Install Conda environment with Micromamba
41
+ uses: mamba-org/setup-micromamba@v1
42
+ with:
43
+ environment-name: DeepForest
44
+ environment-file: environment.yml
45
+ create-args: "python=${{ matrix.python-version }}"
46
+ cache-environment: true
47
+ cache-downloads: true
48
+
49
+ - name: Install package
50
+ run: pip install . -U
51
+
52
+ - name: Run pytest
53
+ run: pytest -v
54
+
55
+ - name: Check style
56
+ run: yapf -d --recursive src/deepforest/ --style=.style.yapf
57
+
58
+ - name: Check notebook style
59
+ run: nbqa yapf --in-place docs/user_guide/examples/*.ipynb --style=.style.yapf
60
+
61
+ - name: Check notebook build
62
+ run: pytest --nbmake docs/**/*_test.ipynb
63
+
64
+ - name: Run docformatter
65
+ run: docformatter --check --recursive src/deepforest/
66
+
67
+ - name: Test Docs
68
+ run: |
69
+ cd docs && make clean && make html SPHINXOPTS="-W"
70
+
71
+ - name: Test and check build artifacts
72
+ run: |
73
+ pip install build && python -m build && twine check dist/*
@@ -0,0 +1,35 @@
1
+ name: Remove waiting labels after new comment
2
+ on:
3
+ issue_comment:
4
+ types: [created]
5
+ pull_request_review_comment:
6
+ types: [created]
7
+
8
+ permissions:
9
+ issues: write # allow removing label from issue
10
+ pull-requests: write # allow removing label from PR
11
+
12
+ jobs:
13
+ remove-label:
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - name: Remove label
17
+ uses: actions/github-script@v5
18
+ with:
19
+ script: |
20
+ const issueNumber = context.issue.number || context.pull_request.number;
21
+ const repo = context.repo;
22
+ const labelToRemove = "Awaiting author contribution";
23
+
24
+ const { data: issueLabels } = await github.rest.issues.listLabelsOnIssue({
25
+ ...repo,
26
+ issue_number: issueNumber
27
+ });
28
+
29
+ if (issueLabels.find(label => label.name === labelToRemove)) {
30
+ await github.rest.issues.removeLabel({
31
+ ...repo,
32
+ issue_number: issueNumber,
33
+ name: labelToRemove
34
+ });
35
+ }
@@ -0,0 +1,49 @@
1
+ name: Publish to PyPI and Test PyPI
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - '*'
7
+
8
+ jobs:
9
+ publish:
10
+ runs-on: ubuntu-latest
11
+
12
+ strategy:
13
+ matrix:
14
+ index-url: ['https://test.pypi.org/legacy/', 'https://upload.pypi.org/legacy/']
15
+
16
+ steps:
17
+ - name: Check out repository
18
+ uses: actions/checkout@v3
19
+ with:
20
+ fetch-depth: 0 # Ensure the full repository is checked out
21
+
22
+ - name: Set up Python
23
+ uses: actions/setup-python@v4
24
+ with:
25
+ python-version: 3.9
26
+
27
+ - name: Install dependencies
28
+ run: |
29
+ python -m pip install --upgrade pip build twine
30
+
31
+ - name: Build the package
32
+ run: |
33
+ python -m build # Automatically detects `pyproject.toml`
34
+
35
+ - name: Publish to Test PyPI or PyPI
36
+ env:
37
+ TWINE_USERNAME: __token__
38
+ TWINE_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }}
39
+ run: |
40
+ if [[ "${{ matrix.index-url }}" == "https://upload.pypi.org/legacy/" ]]; then
41
+ export TWINE_PASSWORD=${{ secrets.PYPI_TOKEN }}
42
+ else
43
+ export TWINE_PASSWORD=${{ secrets.TEST_PYPI_TOKEN }}
44
+ fi
45
+ if [[ "${{ matrix.index-url }}" == "https://upload.pypi.org/legacy/" && "${GITHUB_REF_NAME}" == *-dev* ]]; then
46
+ echo "Skipping publish to PyPI for dev version."
47
+ exit 0
48
+ fi
49
+ twine upload --repository-url ${{ matrix.index-url }} dist/*
@@ -0,0 +1,23 @@
1
+ .coverage
2
+ .DS_Store
3
+ .idea
4
+ .RHistory
5
+ *__pycache__*
6
+ *.egg-info
7
+ *.h5
8
+ *.pl
9
+ *.prof
10
+ *.pt
11
+ *.wp*
12
+ build/
13
+ current_bird_release.csv
14
+ current_release.csv
15
+ docs/_build/
16
+ env/
17
+ lightning_logs/*
18
+ public/
19
+ tests/__pycache__
20
+ tests/data/*
21
+ .vscode/
22
+ *ipynb_checkpoints/
23
+ docs/user_guide/deepforestr.md
@@ -0,0 +1,22 @@
1
+ repos:
2
+ - repo: local
3
+ hooks:
4
+ - id: yapf
5
+ name: yapf
6
+ entry: yapf
7
+ args: ['-i', '--style', '.style.yapf', '--recursive', 'src/deepforest/']
8
+ language: system
9
+ types: [python]
10
+ pass_filenames: false
11
+ stages: [pre-commit]
12
+ - repo: local
13
+ hooks:
14
+ - id: docformatter
15
+ name: docformatter
16
+ entry: docformatter
17
+ language: python
18
+ types: [python]
19
+ args: ['--in-place', '--recursive','src/deepforest/']
20
+ pass_filenames: false
21
+ stages: [pre-commit]
22
+
@@ -0,0 +1,19 @@
1
+ version: 2
2
+
3
+ build:
4
+ os: ubuntu-22.04
5
+ tools:
6
+ python: "3.12"
7
+
8
+ python:
9
+ install:
10
+ - requirements: dev_requirements.txt
11
+ - method: pip
12
+ path: .
13
+
14
+ submodules:
15
+ include: []
16
+
17
+ sphinx:
18
+ # Path to your Sphinx configuration file.
19
+ configuration: docs/conf.py
@@ -0,0 +1,4 @@
1
+ [style]
2
+ # YAPF uses the chromium style
3
+ based_on_style = google
4
+ COLUMN_LIMIT=90
@@ -0,0 +1,51 @@
1
+ {
2
+ "creators": [
3
+ {
4
+ "affiliation": "University of Florida",
5
+ "name": "Ethan P. White",
6
+ "orcid": "0000-0001-6728-7745"
7
+ },
8
+ {
9
+ "affiliation": "University of Florida",
10
+ "name": "Ben G. Weinstein",
11
+ "orcid": "0000-0002-2176-7935"
12
+ },
13
+ {
14
+ "affiliation": "University of Florida",
15
+ "name": "Henry Senyondo",
16
+ "orcid": "0000-0001-7105-5808"
17
+ },
18
+ {
19
+ "affiliation": "University of Florida",
20
+ "name": "Muhammed Magdy",
21
+ "orcid": "0009-0009-6167-7246"
22
+ },
23
+ {
24
+ "affiliation": "University of Mumbai",
25
+ "name": "Om Doiphode",
26
+ "orcid": "0009-0007-2592-7370"
27
+ },
28
+ {
29
+ "affiliation": "Columbia University",
30
+ "name": "Dingyi Fang",
31
+ "orcid": "0009-0006-8532-5024"
32
+ }
33
+ ],
34
+ "keywords": [
35
+ "AI",
36
+ "ML",
37
+ "remote sensing",
38
+ "drone",
39
+ "birds",
40
+ "Deep Learning",
41
+ "Object Detection",
42
+ "Geospatial",
43
+ "Tree Detection",
44
+ "Environmental Monitoring",
45
+ "Remote Sensing",
46
+ "Annotation Handling",
47
+ "Multi-Domain Detection"
48
+ ],
49
+ "license": "MIT",
50
+ "upload_type": "software"
51
+ }
@@ -18,16 +18,20 @@ Primary Authors
18
18
 
19
19
  @ethanwhite is a PI and Author of DeepForest.
20
20
 
21
- Other Contributors
22
- ==================
21
+ * `Om Doiphode <https://github.com/Om-Doiphode>`_
23
22
 
24
- The incomplete list of individuals below have provided patches or otherwise
25
- contributed to the project.
26
- Check GitHub for recent `contributors <https://github.com/weecology/DeepForest/graphs/contributors>`_.
27
- We would like to thank everyone who has contributed to the project in any way.
23
+ @Om-Doiphode is an Author.
28
24
 
29
- * `Henry Senyondo <https://github.com/henrykironde>`_
25
+ * `Muhammed Magdy <https://github.com/Mu-Magdy>`_
26
+
27
+ @Mu-Magdy is an Author.
30
28
 
31
29
  * `Dingyi Fang <https://github.com/dingyif>`_
32
30
 
33
- * `Shawn Taylor <https://github.com/sdtaylor>`_
31
+ @dingyif is an Author.
32
+
33
+ Other Contributors
34
+ ==================
35
+
36
+ Check GitHub for recent `contributors <https://github.com/weecology/DeepForest/graphs/contributors>`_.
37
+ We would like to thank everyone who has contributed to the project in any way.
@@ -0,0 +1,43 @@
1
+ cff-version: 1.2.0
2
+ message: "If you use this software, please cite it as below. You should also cite the model being used. See the README.md for more information."
3
+ title: "DeepForest: A Python package for RGB deep learning tree crown delineation"
4
+ doi: "10.1111/2041-210X.13472"
5
+ date-released: 2020-08-28
6
+
7
+ authors:
8
+ - family-names: "Weinstein"
9
+ given-names: "Ben G."
10
+ - family-names: "Marconi"
11
+ given-names: "Sergio"
12
+ - family-names: "Aubry-Kientz"
13
+ given-names: "Mélaine"
14
+ - family-names: "Vincent"
15
+ given-names: "Gregoire"
16
+ - family-names: "Senyondo"
17
+ given-names: "Henry"
18
+ - family-names: "White"
19
+ given-names: "Ethan P."
20
+
21
+ preferred-citation:
22
+ title: "DeepForest: A Python package for RGB deep learning tree crown delineation"
23
+ doi: "10.1111/2041-210X.13472"
24
+ year: 2020
25
+ authors:
26
+ - family-names: "Weinstein"
27
+ given-names: "Ben G."
28
+ - family-names: "Marconi"
29
+ given-names: "Sergio"
30
+ - family-names: "Aubry-Kientz"
31
+ given-names: "Mélaine"
32
+ - family-names: "Vincent"
33
+ given-names: "Gregoire"
34
+ - family-names: "Senyondo"
35
+ given-names: "Henry"
36
+ - family-names: "White"
37
+ given-names: "Ethan P."
38
+ type: article
39
+ journal: "Methods in Ecology and Evolution"
40
+ volume: 11
41
+ issue: 12
42
+ pages: 1743-1751
43
+
@@ -0,0 +1,184 @@
1
+ Developer's Guide
2
+ =================
3
+
4
+ Depends on Python 3.5+
5
+
6
+ Getting started
7
+ ---------------
8
+
9
+ 1. Quickstart by forking the `main repository <https://github.com/weecology/DeepForest>`_
10
+
11
+ 2. Clone your copy of the repository.
12
+
13
+ - **Using ssh**:
14
+
15
+ ``git clone git@github.com:[your user name]/DeepForest.git``
16
+
17
+ - **Using https**:
18
+
19
+ ``git clone https://github.com/[your user name]/DeepForest.git``
20
+
21
+ 3. Link or point your cloned copy to the main repository. (I always
22
+ name it upstream)
23
+
24
+ ``git remote add upstream https://github.com/weecology/DeepForest.git``
25
+
26
+ 4. Check or confirm your settings using ``git remote -v``
27
+
28
+ .. code-block:: text
29
+
30
+ origin git@github.com:[your user name]/DeepForest.git (fetch)
31
+ origin git@github.com:[your user name]/DeepForest.git (push)
32
+ upstream https://github.com/weecology/DeepForest.git (fetch)
33
+ upstream https://github.com/weecology/DeepForest.git (push)
34
+
35
+ 5. Install the package from the main directory.
36
+
37
+ Deepforest can be installed using either pip or conda.
38
+
39
+ **Install using Pip**
40
+
41
+ Installing with Pip uses `dev_requirements.txt <https://github.com/weecology/DeepForest/blob/main/dev_requirements.txt>`_.
42
+
43
+ .. code-block:: bash
44
+
45
+ $ pip install -r dev_requirements.txt
46
+ $ pip install . -U
47
+
48
+ **Install using Conda**
49
+
50
+ Installing with Conda uses `environment.yaml <https://github.com/weecology/DeepForest/blob/main/environment.yml>`_.
51
+
52
+ Conda-based installs can be slow. We recommend using
53
+ `mamba <https://mamba.readthedocs.io/en/latest/user_guide/mamba.html#quickstart>`_ to speed them up.
54
+
55
+ .. code-block:: bash
56
+
57
+ $ conda create -n deepforest python=3
58
+ $ conda activate deepforest
59
+ $ pip install . -U
60
+
61
+ 7. Check if the package was installed; please test using the `sample code <https://deepforest.readthedocs.io/en/latest/getting_started.html>`_.
62
+
63
+ Testing
64
+ -------
65
+
66
+ Running tests locally
67
+ ^^^^^^^^^^^^^^^^^^^^^
68
+
69
+ .. code-block:: bash
70
+
71
+ $ pip install . --upgrade # or python setup.py install
72
+ $ pytest -v
73
+
74
+ Checking and fixing code style
75
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
76
+
77
+ Using Yapf
78
+ """"""""""
79
+
80
+ We use `yapf <https://github.com/google/yapf>`_ for code formatting and style checking.
81
+
82
+ The easiest way to make sure your code is formatted correctly is to integrate it into your editor.
83
+ See `EDITOR SUPPORT <https://github.com/google/yapf/blob/main/EDITOR%20SUPPORT.md>`_.
84
+
85
+ You can also run yapf from the command line to cleanup the style in your changes:
86
+
87
+ .. code-block:: bash
88
+
89
+ yapf -i --recursive src/deepforest/ --style=.style.yapf
90
+
91
+ If the style tests fail on a pull request, running the above command is the easiest way to fix this.
92
+
93
+ Using pre-commit
94
+ """"""""""""""""
95
+
96
+ We configure all our checks using the `.pre-commit-config.yaml` file. To verify your code styling before committing, you should run ``pre-commit install`` to set up the hooks, followed by ``pre-commit run`` to execute them. This will apply the formatting rules specified in the .style.yapf file. For additional information, please refer to the `pre-commit documentation <https://pre-commit.com/index.html>`_.
97
+
98
+ Testing the Conda Deepforest Build
99
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
100
+
101
+ We use the `conda_recipe/meta.yaml` to make sure that the conda build can build the package.
102
+
103
+ .. code-block:: bash
104
+
105
+ $ cd conda_recipe
106
+ $ conda build conda_recipe/meta.yaml -c conda-forge -c defaults
107
+
108
+ Conda staged recipe update
109
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^
110
+
111
+ Update the Conda recipe after every release.
112
+
113
+ Clone the `Weecology staged recipes <https://github.com/weecology/staged-recipes>`_.
114
+ Checkout the deepforest branch, update the `deepforest/meta.yaml` with the new version and the sha256 values. Sha256 values are obtained from the source on `PYPI download files <https://pypi.org/project/deepforest/#files>`_ using the deepforest-{version-number}.tar.gz.
115
+
116
+ .. code-block:: jinja
117
+
118
+ {% set version = "fill new" %}
119
+ {% set sha256 = "fill new" %}
120
+
121
+
122
+ Documentation
123
+ -------------
124
+
125
+ We are using `Sphinx <http://www.sphinx-doc.org/en/stable/>`_ and `Read the Docs <https://readthedocs.org/>`_ for the documentation.
126
+
127
+ We use `Docformatter <https://pypi.org/project/docformatter/>`_ for formatting and style checking.
128
+
129
+ .. code-block:: bash
130
+
131
+ $ docformatter --in-place --recursive src/deepforest/
132
+
133
+ Update Documentation
134
+ ^^^^^^^^^^^^^^^^^^^^
135
+
136
+ The documentation is automatically updated for changes in functions.
137
+ However, the documentation should be updated after the addition of new functions or modules.
138
+
139
+ Change to the docs directory and use ``sphinx-apidoc`` to update the doc's `source`. Exclude the tests and setup.py documentation.
140
+
141
+ Run
142
+
143
+ .. code-block:: bash
144
+
145
+ sphinx-apidoc -f -o ./source ../ ../tests/* ../setup.py
146
+
147
+ The `source` is the destination folder for the source rst files. `../`
148
+ is the path to where the deepforest source code is located relative to
149
+ the doc directory.
150
+
151
+ Test documentation locally
152
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^
153
+
154
+ .. code-block:: bash
155
+
156
+ cd docs # Go to the docs directory and install the current changes.
157
+ pip install ../ -U
158
+ make clean # Run
159
+ make html # Run
160
+
161
+ Create Release
162
+ --------------
163
+
164
+ Start
165
+ ^^^^^
166
+
167
+ 1. **Run Pytest tests** – seriously, run them now. And Test build artifacts
168
+ - Run `Pytest -v`
169
+ - Run pip install build && python -m build && twine check dist/*
170
+ 2. Ensure `HISTORY.rst` is up to date with all changes since the last release.
171
+ 3. Use `bump-my-version show-bump` to determine the appropriate version bump.
172
+ 4. Update the version for release: `bump-my-version bump [minor | patch | pre_l | pre_n]`. If show-bump does not have the right option, we can manually set it `bump-my-version bump --new-version 1.4.0`
173
+ 5. Publish the release to PyPi and update the Conda package.
174
+ - All releases are done on GitHub Actions when a new tag is push
175
+ - `git tag v1.0.0`
176
+ - `git push origin v1.0.0`
177
+ 6. Post-release, update the version to the next development iteration:
178
+ - Run `bump-my-version show-bump` to check the target version.
179
+ - Then, execute `bump-my-version bump [minor | patch | pre_l | pre_n]`.
180
+
181
+ Note:
182
+ Do not commit the build directory after making html.
183
+
184
+ This version correctly follows reStructuredText (reST) conventions and includes code blocks, inline literals, and proper linking. Let me know if you need further adjustments!