-
Notifications
You must be signed in to change notification settings - Fork 77
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
Working with existing micro structure images #560
Comments
Code: import numpy as np from pymks import ( %matplotlib inline im = Image.open('RVE30.png') imarray = np.expand_dims(np.array(bw_im), axis=0) |
Thanks for leaving a question. What happens when you run the code? Do you get an error or unexpected results? It would be helpful if you can explain what's going wrong. |
Having run the code, the only issue I can find is that nothing is being plotted. This is because
with version cf653e0 if PyMKS then things should work and you should see the correlation. |
Do include the PCA in a meaningful way, we'll need many more samples. |
@me19d506 I'm closing this now. Please feel free to reopen if you need further help |
Dear Daniel Wheeler,
in the example given at "http://pymks.org/en/latest/rst/notebooks/intro.html"
takes one experimental microstructure and computes 2-p correlation and
moves forward to a used synthetic generation of microstructures. I have
difficulty stacking multiple images along the sample axis. could you please
help in this regard?
Thank you
…On Tue, Aug 3, 2021 at 5:20 AM Daniel Wheeler ***@***.***> wrote:
Closed #560 <#560>.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#560 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AU5WORLVH77O3F73HJX6ZQDT24VNVANCNFSM5AYQA5LA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
--
P V Divakar Raju
Ph.D. Scholar
Dept. of Mechanical Engineering
Indian Institute of Technology-Tirupati
India-517619
|
difficulty in stacking the multiple experimental microstructures.
Thank you
On Thu, Aug 19, 2021 at 2:31 PM ME19D506 P V Divakar Raju <
***@***.***> wrote:
… Dear Daniel Wheeler,
in the example given at "
http://pymks.org/en/latest/rst/notebooks/intro.html" takes one
experimental microstructure and computes 2-p correlation and moves forward
to a used synthetic generation of microstructures. I have difficulty
stacking multiple images along the sample axis. could you please help in
this regard?
Thank you
On Tue, Aug 3, 2021 at 5:20 AM Daniel Wheeler ***@***.***>
wrote:
> Closed #560 <#560>.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#560 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AU5WORLVH77O3F73HJX6ZQDT24VNVANCNFSM5AYQA5LA>
> .
> Triage notifications on the go with GitHub Mobile for iOS
> <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
> or Android
> <https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
> .
>
--
P V Divakar Raju
Ph.D. Scholar
Dept. of Mechanical Engineering
Indian Institute of Technology-Tirupati
India-517619
--
P V Divakar Raju
Ph.D. Scholar
Dept. of Mechanical Engineering
Indian Institute of Technology-Tirupati
India-517619
|
Yes, PyMKS expects the images to be in a single array with the first axis as the axis indexing the image set. This is the same as Scikit-learn, which expects the first axis in the array to be the sample axis. This is the same as PyMKS where the images are being arranged as samples. So, for example, if you have three images you can use
That will give a shape of Hope that helps. |
Thank you for the clarification.
I have imported using dask_image.
It would be highly helpful if you can provide some source for the following
1. Understanding principal component of image
2. Training with PCs of images
Thanks again for the support
…On Fri, Aug 20, 2021, 8:36 PM Daniel Wheeler ***@***.***> wrote:
Dear Daniel Wheeler, in the example given at "
http://pymks.org/en/latest/rst/notebooks/intro.html" takes one
experimental microstructure and computes 2-p correlation and moves forward
to a used synthetic generation of microstructures. I have difficulty
stacking multiple images along the sample axis. could you please help in
this regard? Thank you
Yes, PyMKS expects the images to be in a single array with the first axis
as the axis indexing the image set. This is the same as Scikit-learn, which
expects the first axis in the array to be the sample axis. This is the same
as PyMKS where the images are being arranged as samples. So, for example,
if you have three images you can use np.stack to pull them into one array.
from PIL import Image
import numpy as np
import glob
image1 = Image.open('image1.png')
image2 = Image.open('image2.png')
image3 = Image.open('image3.png')
images = np.stack([image1, image2, image3])
print(images.shape)
That will give a shape of (3, 654, 654, 3) with the first axis indexing
over the stacked images. To do this for any number of images use images =
np.stack([Image.open(x) for x in glob.glob('*.png')]).
Hope that helps.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#560 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AU5WORIWUIXKGNAUHP2UZJ3T5ZVRFANCNFSM5AYQA5LA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
|
I'm not sure what you're asking for here. Can you be more specific? Is it the theory or the Python implementation that you're having problems with? There are examples on the PyMKS website for example that guide users. These consist of a number of steps
Does that help? |
Hi,
I have series of images on my computer which is generated using a Random sequential algorithm (RSA). For this, images I have output variables. I need to train the principal components (input variables) of the images with ouput variables.
Kindly Help ...!
The text was updated successfully, but these errors were encountered: