gaia-unil / g2s Goto Github PK
View Code? Open in Web Editor NEWA flexible MPS framework
Home Page: https://gaia-unil.github.io/G2S/
License: GNU General Public License v3.0
A flexible MPS framework
Home Page: https://gaia-unil.github.io/G2S/
License: GNU General Public License v3.0
When I compile the Matlab interface I using 'CompileG2S' I get an error that "json/json.h" cannot be found, in the line
#include <json/json.h>
If I add the following soft link the compilation works fine
sudo ln -s /usr/include/jsoncpp/json/ /usr/include/json
I use Ubuntu 18.04.3 LTS
Hello there,
I downloaded and compiled c++ and python. They both seemed to work. I can launch server and get return from g2s import g2s; g2s('--version') as "G2S version 0.98.002, compiled the Mar 20 2022 15:34:39 with Python 3.8.12".
However, when I run example codes, i.e. unconditionalSimulation.py, data=g2s('-a','qs', '-ti',ti, ...) returns job Id is: 1911726720 and (-0.001, -1.0, 1911726720) as I print(data)
I have checked ti beng downloaded was correctly plotted out on screen after commented out #ax2.imshow(simulation).
I noticed there were one or two bgrid.zip files in ./data but nothing in logs. When stderr of the server was redirected to a file, it contains the following message "can not open file : logs/1911726720.log".
Could you please advise a solution? I did not see an automatic test was carried before compiling client code, but noticed other executables
I compiled g2s on wsl ubuntu 20.04 with gcc/g++ 9.3.0 and all standard settings in makefile but turn-off gpu support for now but noticed codes listed in algosName.config. Could they be used for checking server status?
Thanks,
Jingsheng Ma
Describe the bug
Problem with the installation process.
I tried the simple way (pip), but they also didn't work.
The script with gcc apparently goes pretty well, but when installing with pip, I get the error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/joao/miniconda3/envs/dl/lib/python3.8/site-packages/g2s/__init__.py", line 12, in <module>
from .g2s import run
ImportError: /home/joao/miniconda3/envs/dl/lib/python3.8/site-packages/g2s/g2s.cpython-38-x86_64-linux-gnu.so: undefined symbol: gzrewind
I found that a possible solution was to build the interface/server with the -lz argument in the last position, so I did.
The server build appeared to be successful, but the python interface give the following error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module><br>
File "/home/joao/bibliotecas/G2S/build/python-build/g2s/__init__.py", line 12, in <module><br>
from .g2s import run<br>
ModuleNotFoundError: No module named 'g2s.g2s'
Information
To Reproduce
I created a new conda env, cloned the git repository and followed the step-by-step guide (https://gaia-unil.github.io/G2S/) to manual build the server and the python interface.
Test
If possible a small code that reproduce the bug
Expected behavior
Both server's build and interface's build returns no errors and the follow code returns the right version.
from g2s import g2s; g2s('--version')
Additional context
As a somewhat beginner with make and setup.py, I couldn't find a solution to this problem.
Did I do something wrong with the installation process?
The process is apparently very straight-forward and easy, so I probably messed something up…
Hello,
I have a problem during the installation of G2S on Ubuntu WSL for Windows 10. I am receiving the following message when I install it manually from build/c++-build/install.bat
:
make[1]: Entering directory '/mnt/c/Users/EPFL-LHE/Desktop/MPS/G2S-master/build/c++-build'
Creation of /usr/local if needed
cp: cannot stat './g2s_cuda.so': No such file or directory
warning: 'g2s_cuda.so' is missing, this is probably due to the absance of CUDA compiler.
Installation c++ finished!
make[1]: Leaving directory '/mnt/c/Users/EPFL-LHE/Desktop/MPS/G2S-master/build/c++-build'
I have installed CUDA both for Windows 10 and for WSL-Ubuntu, available at this link.
Do you have any idea of what could be causing this missing library? I checked and the GPU is not being used when I run some tests from Matlab 2023.
Thank you very much in advance for your help.
Best,
Clemente Gotelli
When trying to import g2s into python after installing g2s through pip I get,
from g2s import g2s
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/anaconda3/lib/python3.8/site-packages/g2s/__init__.py", line 12, in <module>
from .g2s import run
ImportError: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /home/anaconda3/lib/python3.8/site-packages/g2s/g2s.cpython-38-x86_64-linux-gnu.so)
After trying to replace the libstdc++.so.6 version with an updated version that contains GLIBCXX_3.4.26, I am still receiving the error.
As a beginner coder, im finding it difficult to set up the server portion of the program on WSL and navigate all the parts in different folders.
I have installed with "build/c++-build/install_needs_W_VM.sh" , after migrating from WSL1 to WSL2 (WSL gave me many errors) but running the ./server part does nothing on my end currently, as in nothing happens or opens running this command and no errors.
I'm not sure where to put the examples at the bottom of https://gaia-unil.github.io/G2S/ and how to execute them.
Basically, for me, running https://www.mgravey.com/mps.online/ is great. Being able to load in my own image, and having intuitive sliders for the controls of the output.
It would be of great use if I could emulate the demo (javascript?) on my own machine.
With the same input button, and spots to plug in parameters.
To include all the parameters from all the other options I haven't explored from the examples as well.
I'm only interested in the texture synthesis aspect.
Having it bundled somehow where I could either execute it all in one go, or call it from the powershell would be an ideal workflow.
Also, it seems for the demo there is a limited input size, it seems to be 100x100. I'm curious to know if smaller inputs are possible as well?
Cheers!
For flexible use of g2s() in functions etc. it would be handy if you could pass None to the optional parameters (mostly -ki), which is currently not supported. I'm sure there are multiple workarounds to achieve this yourself but being able to pass None would save some effort.
Hello Mathieu! And thank you for sharing your code :-)
I tried all the scripts in the example/python folder, and all of them give:
ValueError: too many values to unpack
the error is always located at the line where you collect the output of g2s
, for example like in the script unconditionalSimulation.py
at line 13.
simulation, _ =g2s(...
The error can be solved in all the scripts by changing _
into *_
, because in this way Python can throw away an undefined number of return values of g2s
but the first argument.
This happens on Python 3.10.6.
Hope this helps.
Bests!
Alessandro
I have tried with the server, and it is great! Thank you very much!
I am trying to generate a 3D structure from a 2D microscope image of a ceramic. and for now I am using the server to make several simulated images and stack them together. However, the result is not very good for what i have tried.
I read though the documentation and found the -adsim function
| ‑adsim | augmented dimentionality simulation: allows for 3D simulation using 2D training image, only for categories (Comming soon!)
which would be great if it can be used, so just wondering how is going with this function development and want just try the new features :-)
Hello G2S Team,
I tried to install G2S for python on the Bernese supercomputer in my conda environment.
Installing with pip install G2S went fine, but calling it with import G2S is unfortunately giving me:
Traceback (most recent call last):
File "", line 1, in
File "/storage/homefs/mawegmann/.conda/envs/tfgpu/lib/python3.7/site-packages/g2s/init.py", line 12, in
from .g2s import run
ImportError: libzmq.so.5: cannot open shared object file: No such file or directory
It is a UNIX environment where I don't have sudo rights. Any idea on how to approach this issue is appreciated.
All the best,
Martin
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.