You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for this interesting work. I was able to the generate a CSV file using GCSbc models. I wonder if there is a way to convert the .csv file to the actual image. I tried to search around but don't see any options. Thank you so much.
Best,
Tien
The text was updated successfully, but these errors were encountered:
Tien,
the GaussianCopulaSynthesizer is used for tabular data. In order to use it in images you must have converted somehow your images to a CSV. For example:
image=Image.open(image_path)
# convert image to numpy array image_array=np.array(image)
# flatten into a 1D vector flattened_image=image_array.flatten()
Now after using this data, in GaussianCopulaSynthesizer, you can use the generated CSV file to get the images like this:
df=pd.read_csv(generated_csv_path)
image_data=np.array(df.iloc[0]) # for the single image# reshape the data to its original shape image_shape= (564, 564, 3) # your actual image sizeimage_array=image_data.reshape(image_shape)
# convert the numpy array back to an imageimage=Image.fromarray(image_array.astype(np.uint8))
Thank you for your explanation. Just want to confirm my understanding. The problem will run as:
real image .png file(let's say chest X-ray) => convert to numpy array through your first code => run through GaussianCopulaSynthesizer => generated csv file => run through second code to get synthetic chest X-ray images
Please let me know if my understanding is incorrect. Thank you so much
Dear Helen,
Thank you for this interesting work. I was able to the generate a CSV file using GCSbc models. I wonder if there is a way to convert the .csv file to the actual image. I tried to search around but don't see any options. Thank you so much.
Best,
Tien
The text was updated successfully, but these errors were encountered: