-
Notifications
You must be signed in to change notification settings - Fork 10
New vision #113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
New vision #113
Changes from all commits
Commits
Show all changes
68 commits
Select commit
Hold shift + click to select a range
7cf5bee
Added the new vision code.
SimoneMartino98 49a6334
deleted old vision code.
SimoneMartino98 dab882d
Update documentation.
SimoneMartino98 020f3ba
Removed useless imports.
SimoneMartino98 1656ab2
Exporting optimization dictionary.
SimoneMartino98 2c079b4
Added device checker (WIP).
SimoneMartino98 ce424cf
Added imgsz to the tuning function.
SimoneMartino98 fb1a07a
Added first version of doc for tuning (WIP).
SimoneMartino98 1e1d612
Optimized the documentation and modified the output shape for tuning.
SimoneMartino98 95d0bd0
Fixed formatting.
SimoneMartino98 879331a
Added batch_size to tuning.
SimoneMartino98 62a17cf
Added label tool server.
SimoneMartino98 0f88734
Added guidelines.
SimoneMartino98 7beda95
Fixing label positions.
SimoneMartino98 8a3ed55
Formatting code.
SimoneMartino98 58c6108
Added create dataset from predictions method.
SimoneMartino98 24ca570
Added xyz export method.
SimoneMartino98 c046f63
Added path return to export xyz.
SimoneMartino98 90ac650
Added track module.
SimoneMartino98 7fbd6c2
Added zoom in and zoom out in the label_tool.
SimoneMartino98 1e31e4f
Image size fixs.
SimoneMartino98 8186f76
Zoom fixs.
SimoneMartino98 5bda1aa
Fixing red guidelines.
SimoneMartino98 2d58ba8
Image stretch bug fix.
SimoneMartino98 04dc846
Fixing bounding box positions rules.
SimoneMartino98 f681078
Fixing server shutdown.
SimoneMartino98 763936d
Added vision tests.
SimoneMartino98 913bc5a
Removed tests.
SimoneMartino98 db66c5c
Adding vision test.
SimoneMartino98 63c72d5
adding dependecies.
SimoneMartino98 f8010cb
added test for track.
SimoneMartino98 a3c5194
Added synthesize dataset button to the label tool.
SimoneMartino98 b961d6d
Make the label tool executable standalone.
SimoneMartino98 2b4d316
Fixing bug for video source dataset creation.
SimoneMartino98 c60cc67
ruff fixes.
SimoneMartino98 629ea8c
Added example code WIP.
SimoneMartino98 afc708a
Added extraction to xyz and tracked xyz in example script.
SimoneMartino98 3af2528
Added dependencies.
SimoneMartino98 4caaec9
Added a custom css file to modify the documentation layout.
SimoneMartino98 a878df4
Vision doc updated.
SimoneMartino98 0c4a54c
Remove ultralytics manual dependency and add the label tool
SimoneMartino98 052f368
Minor fixes.
SimoneMartino98 f7de55b
Solving dataset exportation bug and minor fixes.
SimoneMartino98 ba805b2
Merge branch 'main' into new_vision
SimoneMartino98 35247e3
removed noqa.
SimoneMartino98 83a3312
removed tica.
SimoneMartino98 f2c5e14
TEMPORARY - removed 3.13 tests from workflow.
SimoneMartino98 e17ba6a
Documentation minor fixes.
SimoneMartino98 acf343f
vision module title.
SimoneMartino98 1919aea
Class documentation fix.
SimoneMartino98 7ea833d
Fixing docs errors
SimoneMartino98 52d71a2
Fixing dependencies.
SimoneMartino98 edb89a7
class names now display in the xyz file.
SimoneMartino98 d4bfb20
Fixing dependencies.
SimoneMartino98 8c8ea4c
fixing union attribute error.
SimoneMartino98 996b1ef
Fixed docs out of the screen bug.
SimoneMartino98 602342b
added the name among the xyz file cols.
SimoneMartino98 0474155
Fixing test track.
SimoneMartino98 415c6ab
Fomratting and type fixing.
SimoneMartino98 428ed1f
Added new read_xyz function and minor fixes.
SimoneMartino98 71fb2d3
Fix typing error..
SimoneMartino98 29f47ce
Fixing toc width.
SimoneMartino98 2b0046b
Removing noqa.
SimoneMartino98 46714e8
Added docstring to read_xyz.
SimoneMartino98 06bc6df
Added python 3.13 tests version.
SimoneMartino98 a843099
removed type from doc.
SimoneMartino98 4c8ecd9
Removed default value for search_range.
SimoneMartino98 8f9777f
minor fixes.
SimoneMartino98 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,78 +1,78 @@ | ||
| name: Tests | ||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| pull_request: | ||
| workflow_dispatch: | ||
| push: | ||
| branches: | ||
| - main | ||
| pull_request: | ||
| workflow_dispatch: | ||
| jobs: | ||
| ruff: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| python-version: ["3.10", "3.13"] | ||
| name: ruff on ${{ matrix.python-version }} | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| cache: "pip" | ||
| - run: pip install -e '.[dev]' | ||
| - run: ruff check . | ||
| mypy: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| python-version: ["3.10", "3.13"] | ||
| name: mypy on ${{ matrix.python-version }} | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| cache: "pip" | ||
| - run: pip install -e '.[dev]' | ||
| - run: mypy . | ||
| ruff-format: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| python-version: ["3.10", "3.13"] | ||
| name: ruff-format on ${{ matrix.python-version }} | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| cache: "pip" | ||
| - run: pip install -e '.[dev]' | ||
| - run: ruff format --check . | ||
| pytest: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| python-version: ["3.10", "3.13"] | ||
| name: pytest on ${{ matrix.python-version }} | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| cache: "pip" | ||
| - run: pip install -e '.[dev]' | ||
| - run: pytest --cov=src --cov-report term-missing | ||
| doctest: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| python-version: ["3.10", "3.13"] | ||
| name: doctest on ${{ matrix.python-version }} | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| cache: "pip" | ||
| - run: pip install -e '.[dev]' | ||
| - run: make -C docs doctest | ||
| ruff: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| python-version: ["3.10", "3.13"] | ||
| name: ruff on ${{ matrix.python-version }} | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| cache: "pip" | ||
| - run: pip install -e '.[dev]' | ||
| - run: ruff check . | ||
| mypy: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| python-version: ["3.10", "3.13"] | ||
| name: mypy on ${{ matrix.python-version }} | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| cache: "pip" | ||
| - run: pip install -e '.[dev]' | ||
| - run: mypy . | ||
| ruff-format: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| python-version: ["3.10", "3.13"] | ||
| name: ruff-format on ${{ matrix.python-version }} | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| cache: "pip" | ||
| - run: pip install -e '.[dev]' | ||
| - run: ruff format --check . | ||
| pytest: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| python-version: ["3.10", "3.13"] | ||
| name: pytest on ${{ matrix.python-version }} | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| cache: "pip" | ||
| - run: pip install -e '.[dev]' | ||
| - run: pytest --cov=src --cov-report term-missing | ||
| doctest: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| python-version: ["3.10", "3.13"] | ||
| name: doctest on ${{ matrix.python-version }} | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| cache: "pip" | ||
| - run: pip install -e '.[dev]' | ||
| - run: make -C docs doctest |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| /*DOCS SIDEBARS AND CENTERING*/ | ||
| .sidebar-drawer, | ||
| .sidebar-container, | ||
| .toc-drawer { | ||
| width: 15em; | ||
| min-width: 15em; | ||
| } | ||
| @media (min-width: 65em) { | ||
| .content { | ||
| margin-left: auto; | ||
| margin-right: auto; | ||
| } | ||
| } | ||
| @media (min-width: 82em) { | ||
| .page { | ||
| justify-content: center; | ||
| } | ||
| .toc-drawer { | ||
| position: fixed; | ||
| right: 0; | ||
| top: 0; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| The Label Tool | ||
| ============== | ||
|
|
||
| The ``dynsight label_tool`` is a simple web application that allows users to | ||
| label images. Picture labelling is a crucial step in many computer vision tasks, | ||
| such as the creation of initial training dataset to train Convolutional Neural | ||
| Networks (CNNs) model. The current version of `dynsight vision <../_autosummary/dynsight.vision.VisionInstance.html>`_ | ||
| exploits the power of the `YOLO models <https://docs.ultralytics.com/models/yolo12/>`_ | ||
| for computer vision tasks. Thus, the ``label_tool`` has been specifically | ||
| designed to work with the YOLO dataset format. | ||
|
|
||
| .. image:: ../_static/label_tool.png | ||
|
|
||
| ---------- | ||
| How to Use | ||
| ---------- | ||
|
|
||
| The ``label_tool`` application can be executed in 2 main ways: | ||
|
|
||
| * As a standalone application, run the following command in the environment | ||
| where dynsight is installed: | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| $ label_tool | ||
|
|
||
| * From python code: | ||
|
|
||
| .. code-block:: python | ||
|
|
||
| import dynsight | ||
|
|
||
| dynsight.vision.label_tool(port=8888) #port selection is optional | ||
|
|
||
| In both cases a localhost server should start and the application should | ||
| automatically appear in your default web browser. | ||
|
|
||
| .. tip:: | ||
|
|
||
| In case the application does | ||
| not open automatically, you can manually open it by copying and pasting | ||
| the URL provided in the terminal output. | ||
|
|
||
| ------- | ||
| The GUI | ||
| ------- | ||
|
|
||
| The ``label_tool`` Graphical User Interface is divided in three main panels: | ||
|
andrewtarzia marked this conversation as resolved.
|
||
|
|
||
| * **The image panel**: where loaded images appear and labels can be drawn. | ||
|
|
||
| * **The label menu panel**: where labels can be created and edited. | ||
|
|
||
| .. image:: ../_static/label_menu.png | ||
| :align: center | ||
|
|
||
| * **The commands panel**: where all the available commands can be executed. | ||
|
|
||
| .. image:: ../_static/label_bar.png | ||
|
|
||
| Using the ``Choose File`` button, users can select the image(s) they want to | ||
| label. Once the image is loaded, users can start drawing labels by clicking and | ||
| dragging on the image panel. The label menu panel allows users to create and | ||
| edit labels. Finally, the commands panel provides a set of exporting options: | ||
|
|
||
| * **Export label**: Download a single ``.txt`` file in YOLO format containing the labels for the current image. | ||
|
|
||
| * **Export dataset**: Download a YOLO dataset from the loaded images with the labels and create the initial yaml configuration file to be used in the YOLO training process. | ||
|
|
||
| * **Synthesize dataset**: Create a synthetic dataset from the drawn labels randomizing the object position in different images (useful when a low number of images is available). | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| track | ||
| ===== | ||
|
|
||
| This module tracks particle trajectories in `.xyz` files that lack explicit | ||
| particle IDs, assigning consistent identities across frames. | ||
| It is especially useful for outputs generated by the :doc:`vision` module. | ||
|
|
||
| Functions | ||
| --------- | ||
|
|
||
| .. toctree:: | ||
| :maxdepth: 1 | ||
|
|
||
| track_xyz <_autosummary/dynsight.track.track_xyz> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.