Giter Site home page Giter Site logo

deepphysx's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

deepphysx's Issues

Some Basic questions

Dear Colleagues,

First of all, thank you very much for this wonderful contribution to the community. We are new in this field, and I was looking for a package in the biomedical domain that helps us in simulation and has a connection with PyTorch and I discovered this gem. I have a few basic questions and I would be thankful if you could answer them:

  • Should I view DeepPhysX as a Differentiable Physics Simulator? Or the differentiable simulator is not implemented yet. We are interested in using differentiable physics in a problem that involves estimating elasticity. I could not quite figure out (based on a brief read of the documentation) if this is one of the capabilities or not.
  • If the answer to the previous question is yes, what is the best way to start? Is there any online tutorial / examples that we can use?
  • If the answer to that question is No. Could you please advise? ie do you have any recommendations for any other package or do you think it is easy to implement it via DeepPhysX?

Thank you very much

Error running demo on Ubuntu 22.04

Tried installing all except Caribou, but trying to launch the demo i get this error

user@eGPULinux:~/Downloads/DeepPhysX/Core$ python3 demo.py liver Traceback (most recent call last): File "/home/user/Downloads/DeepPhysX/Core/examples/demos/Liver/FC/interactive.py", line 19, in <module> LiverDownloader().get_session('predict') File "/home/user/.local/lib/python3.10/site-packages/DeepPhysX/Core/Utils/data_downloader.py", line 55, in get_session self.check_tree(session_name) File "/home/user/.local/lib/python3.10/site-packages/DeepPhysX/Core/Utils/data_downloader.py", line 84, in check_tree if not os.path.exists(os.path.join(self.root, self.tree[last_level], self.filenames[file])): KeyError: 276

running core/examples/demos/liver/interactive.py error in windows10 python3.9

Traceback (most recent call last):
File "H:\SOFA\anaconda\Lib\site-packages\vedo\plotter.py", line 2308, in _func_wrap
func(event_dict)
File "H:\DeepPhysX\Core\examples\demos\Liver\FC\Environment\LiverInteractive.py", line 174, in mouse_move
U = self.get_prediction(F).reshape(self.output_size)
File "H:\SOFA\anaconda\Lib\site-packages\DeepPhysX\Core\Environment\BaseEnvironment.py", line 207, in get_prediction
return TcpIpClient.request_get_prediction(self, input_array=input_array)
File "H:\SOFA\anaconda\Lib\site-packages\DeepPhysX\Core\AsyncSocket\TcpIpClient.py", line 225, in request_get_prediction
return self.send_prediction_data(network_input=input_array)
File "H:\SOFA\anaconda\Lib\site-packages\DeepPhysX\Core\AsyncSocket\TcpIpClient.py", line 190, in send_prediction_data
self.sync_send_command_prediction()
File "H:\SOFA\anaconda\Lib\site-packages\DeepPhysX\Core\AsyncSocket\TcpIpObject.py", line 612, in sync_send_command_prediction
self.__sync_send_command(receiver=receiver, command='prediction')
File "H:\SOFA\anaconda\Lib\site-packages\DeepPhysX\Core\AsyncSocket\TcpIpObject.py", line 511, in __sync_send_command
self.sync_send_data(data_to_send=cmd, receiver=receiver)
File "H:\SOFA\anaconda\Lib\site-packages\DeepPhysX\Core\AsyncSocket\TcpIpObject.py", line 96, in sync_send_data
receiver.sendall(data_as_bytes)
ConnectionAbortedError: [WinError 10053] The software in your console aborted an established connection

Error about "DPX - r liver"

(py38sofa) PS G:\SOFA_codes\DeepPhysX-v22.12.1> DPX --get
WARNING: The project was installed with pip, examples must be run in a new repository to avoid writing data in your installation of SSD. Allow the creation of this new repository 'G:\SOFA_codes\DeepPhysX-v22.12.1\DPX_examples' to run examples (use 'DPX --clean' to cleanlyremove it afterward) (y/n):y
(py38sofa) PS G:\SOFA_codes\DeepPhysX-v22.12.1> DPX -r liver
urllib3.exceptions.SSLError: TLS/SSL connection has been closed (EOF) (_ssl.c:1135)

The above exception was the direct cause of the following exception:

urllib3.exceptions.ProxyError: ('Unable to connect to proxy', SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1135)')))

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "D:\ROOTS\anaconda\envs\py38sofa\lib\site-packages\requests\adapters.py", line 486, in send
resp = conn.urlopen(
File "D:\ROOTS\anaconda\envs\py38sofa\lib\site-packages\urllib3\connectionpool.py", line 847, in urlopen
retries = retries.increment(
File "D:\ROOTS\anaconda\envs\py38sofa\lib\site-packages\urllib3\util\retry.py", line 515, in increment
raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type]
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='data-qualif.loria.fr', port=443): Max retries exceeded with url: /api/v1/datasets/:persistentId/?persistentId=doi:10.5072/FK2/ZPFUBK&User-Agent=pydataverse (Caused by ProxyError('Unable to connect to proxy', SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1135)'))))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\ROOTS\anaconda\envs\py38sofa\lib\site-packages\pyDataverse\api.py", line 121, in get_request
resp = get(url, params=params)
File "D:\ROOTS\anaconda\envs\py38sofa\lib\site-packages\requests\api.py", line 73, in get
During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "interactive.py", line 19, in
LiverDownloader().get_session('all')
File "G:\SOFA_codes\DeepPhysX-v22.12.1\DPX_examples\Core\demos\Liver\FC\download.py", line 17, in init
DataDownloader.init(self, DOI, session_name)
File "D:\ROOTS\anaconda\envs\py38sofa\lib\site-packages\DeepPhysX\Core\Utils\data_downloader.py", line 16, in init
for file in self.api.get_dataset(DOI).json()['data']['latestVersion']['files']:
File "D:\ROOTS\anaconda\envs\py38sofa\lib\site-packages\pyDataverse\api.py", line 1006, in get_dataset
return self.get_request(url, auth=auth)
File "D:\ROOTS\anaconda\envs\py38sofa\lib\site-packages\pyDataverse\api.py", line 139, in get_request
raise ConnectionError(
requests.exceptions.ConnectionError: ERROR: GET - Could not establish connection to api https://data-qualif.loria.fr/api/v1/datasets/:persistentId/?persistentId=doi:10.5072/FK2/ZPFUBK.
(py38sofa) PS G:\SOFA_codes\DeepPhysX-v22.12.1>

Thank you !

Errors in running the demo

I installed the packages by following the instructions and got an error as follows.
Can you help resolving the error?

Core % python3 demo.py armadillo
Connecting to DeepPhysX online storage to download missing data...
	Downloading file 1/7 in Environment/models/armadillo.obj
	Downloading file 2/7 in Environment/models/armadillo_coarse.obj
	Downloading file 3/7 in Environment/models/sparse_grid.obj
	Downloading file 4/7 in sessions/armadillo_dpx/infos.txt
	Downloading file 5/7 in sessions/armadillo_dpx/dataset/dataset.json
	Downloading file 6/7 in sessions/armadillo_dpx/network/network.pth
	Downloading file 7/7 in sessions/armadillo_dpx/stats/events.out.tfevents.1651475113.romulus
Directory conflict: you are going to overwrite sessions/armadillo_dpx.
Create a new directory /Users/zebehn/Development/DeepPhysX/Core/examples/demos/Armadillo/FC/sessions/armadillo_dpx_1/ for this session.
Traceback (most recent call last):
  File "/Users/zebehn/Development/DeepPhysX/Core/examples/demos/Armadillo/FC/interactive.py", line 56, in <module>
    launch_runner()
  File "/Users/zebehn/Development/DeepPhysX/Core/examples/demos/Armadillo/FC/interactive.py", line 44, in launch_runner
    runner = BaseRunner(session_dir='sessions',
  File "/Users/zebehn/opt/anaconda3/envs/deep/lib/python3.10/site-packages/DeepPhysX/Core/Pipelines/BaseRunner.py", line 58, in __init__
    self.manager = Manager(pipeline=self,
  File "/Users/zebehn/opt/anaconda3/envs/deep/lib/python3.10/site-packages/DeepPhysX/Core/Manager/Manager.py", line 64, in __init__
    self.network_manager = NetworkManager(manager=self,
  File "/Users/zebehn/opt/anaconda3/envs/deep/lib/python3.10/site-packages/DeepPhysX/Core/Manager/NetworkManager.py", line 56, in __init__
    raise ValueError(f"[{self.name}] Training requires a loss and an optimizer in your NetworkConfig")
ValueError: [NetworkManager] Training requires a loss and an optimizer in your NetworkConfig
(deep) zebehn@jangminsuui-MacBookPro Core % python3 demo.py armadillo
Directory conflict: you are going to overwrite sessions/armadillo_dpx.
Create a new directory /Users/zebehn/Development/DeepPhysX/Core/examples/demos/Armadillo/FC/sessions/armadillo_dpx_2/ for this session.
Traceback (most recent call last):
  File "/Users/zebehn/Development/DeepPhysX/Core/examples/demos/Armadillo/FC/interactive.py", line 56, in <module>
    launch_runner()
  File "/Users/zebehn/Development/DeepPhysX/Core/examples/demos/Armadillo/FC/interactive.py", line 44, in launch_runner
    runner = BaseRunner(session_dir='sessions',
  File "/Users/zebehn/opt/anaconda3/envs/deep/lib/python3.10/site-packages/DeepPhysX/Core/Pipelines/BaseRunner.py", line 58, in __init__
    self.manager = Manager(pipeline=self,
  File "/Users/zebehn/opt/anaconda3/envs/deep/lib/python3.10/site-packages/DeepPhysX/Core/Manager/Manager.py", line 64, in __init__
    self.network_manager = NetworkManager(manager=self,
  File "/Users/zebehn/opt/anaconda3/envs/deep/lib/python3.10/site-packages/DeepPhysX/Core/Manager/NetworkManager.py", line 56, in __init__
    raise ValueError(f"[{self.name}] Training requires a loss and an optimizer in your NetworkConfig")
ValueError: [NetworkManager] Training requires a loss and an optimizer in your NetworkConfig

Problem with building Caribou

Hello

I have been trying to build Caribou so I can use DeepPysX.Sofa examples but I have been facing this problem both on windows 10 and similar on ubuntu 22.04

CMake Error at C:/Program Files/CMake/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find Boost (missing: Boost_INCLUDE_DIR)
Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
  C:/Program Files/CMake/share/cmake-3.25/Modules/FindBoost.cmake:2377 (find_package_handle_standard_args)
  E:/SOFA/SOFA_v22.12.00_Win64/lib/cmake/Sofa.Type/Sofa.TypeConfig.cmake:34 (find_package)
  E:/SOFA/SOFA_v22.12.00_Win64/lib/cmake/SofaFramework/SofaFrameworkConfig.cmake:37 (find_package)
  cmake/FindSOFA.cmake:19 (find_package)
  CMakeLists.txt:57 (find_package)

Is there a way to solve this problem,

Numpy Error with Installation on Ubuntu 22.04

Hi team, really cool work. Would like to give this a spin but am having trouble getting it running on python 3.8 if possible.

Issue Description

Following the install instructions and running a demo like DPX -r liver leads to the following issue:

DPX --run liver
Traceback (most recent call last):
  File "interactive.py", line 11, in <module>
    from DeepPhysX.Core.Pipelines.BasePrediction import BasePrediction
  File "/home/nina/miniconda3/envs/sofa-frameworks/lib/python3.8/site-packages/DeepPhysX/Core/Pipelines/__init__.py", line 9, in <module>
    exec(f"from DeepPhysX.Core.Pipelines.{module[:-3]} import {module[:-3]}")
  File "<string>", line 1, in <module>
  File "/home/nina/miniconda3/envs/sofa-frameworks/lib/python3.8/site-packages/DeepPhysX/Core/Pipelines/BaseDataGeneration.py", line 3, in <module>
    from vedo import ProgressBar
  File "/home/nina/miniconda3/envs/sofa-frameworks/lib/python3.8/site-packages/vedo/__init__.py", line 234, in <module>
    np.warnings.filterwarnings('ignore', category=np.VisibleDeprecationWarning)
  File "/home/nina/miniconda3/envs/sofa-frameworks/lib/python3.8/site-packages/numpy/__init__.py", line 284, in __getattr__
    raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'warnings'

Looking up the error, I deprecate the installation of numpy==1.24. to 1.23.5, which leads to a clean run.

Replication

Running the following:

conda create --name sofa-frameworks python=3.8
conda activate sofa-frameworks
pip install DeepPhysX DeepPhysX.Sofa DeepPhysX.Torch
DPX -r liver

Fixed by:

conda create --name sofa-frameworks python=3.8
conda activate sofa-frameworks
pip install DeepPhysX DeepPhysX.Sofa DeepPhysX.Torch
pip install numpy==1.23.5
DPX -r liver

It would be worth fixing the requirements as otherwise the package does not install properly? Can I contribute this fix?

how to create a new data base

1676382837311
Hi, mimresis
you did a really good job, thank a lot for your sharing! do you know how to create a new data base(.db) in order to train a new network to solve different issue?
I mean i tought the liver_dpx_converted_training_0.db which you provided would be your training data, and it may like" a force correspoding a vecotor". However, I do not know how the data exactly look like just as the picture shows above when i use Navicat to open it.
Would you please tell me how you generate the liver-demo-data-base from the very begginning?

setup_dev can't find the right site-packages folder

For some reason, USER_SITE variable from the package site is not pointing to the correct location when using conda.

Change the USER_SITE variable to site.getsitepackages()[0] solves the problem at my place.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.