question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PermissionError: [WinError 32] & Slow Classification with GPU

See original GitHub issue

I’ve had two issues with aletheia when I run the following command on Windows 10:

> python aletheia.py e4s-predict models/e4s_srm_bossbase_lsbm0.10_gs.model srm sample_images/1_lsb.pgm

My first issue is that the program crashes at line 153, in aletheia/octave_interface.py at the line:

shutil.rmtree(tmpdir)

with the error:

PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\faiz\\AppData\\Local\\Temp\\tmpnk6riay9'

I commented out the line in question and it appears to work, but my folder keeps filling up with temp files because they’re not being deleted, which is slightly inconvenient. Is there a better fix for this or is the issue to do with Windows?

The second issue is more of a confirmation - upon running the aforementioned command, it takes about 40 seconds to classify an image as a Cover or Stego image using both my CPU and my GPU. After further investigation it looks like the bulk of this time is spent initialising the SRM also in aletheia/octave_interface.py at line 150:

status = p.wait()

I just wanted to confirm whether it’s supposed to take this long? If so, I’ll have to readjust the number of images I use in my evaluation because it would take too long to run this for all 10,000 images in the BOSSbase dataset. If not, is there something I’ve missed?

Also, please tell me if I’m supposed to create two separate issues for this - if so I’ll edit this one and create a new one for my second issue (it’s my first time creating an issue on GitHub!)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
daniellerchcommented, Mar 29, 2021

This is the probability that the steganographic algorithm corresponding to the model was used.

0reactions
FaiZamancommented, Mar 29, 2021

In that case, I may switch my embedding method to produce colour images so that I can run these models on my stego images produced from the ALASKA2 dataset.

Additionally, the output for a colour image with efficientnet is the following:

sample_images\lena.jpg 0.554
sample_images\lena.png 0.934
sample_images\lena_ebs_0.20.jpg 0.733
sample_images\lena_ebs_0.30.jpg 0.781
sample_images\lena_ebs_0.40.jpg 0.788
sample_images\lena_ebs_0.50.jpg 0.933
sample_images\lena_ebs_0.75.jpg 0.788
sample_images\lena_ebs_1.00.jpg 0.996
...

What do the float values (0.554, 0.934, …) mean? Are they probabilities of the image being cover or stego or are they a different metric?

Read more comments on GitHub >

github_iconTop Results From Across the Web

[winerror 32] - You.com | The AI Search Engine You Control
PermissionError : [WinError 32] The process cannot access the file because it is being used by another ... [WinError 32] & Slow Classification...
Read more >
PermissionError: [WinError 32] · Issue #9474 · Lightning-AI ...
While training and saving checkpoints with tensorboard I get PermissionError: [WinError 32] The process cannot access the file because it is ...
Read more >
[WinError 32] The process cannot access the file because it is ...
Your process is the one that has the file open (via im still existing). You need to close it first before deleting it....
Read more >
How to Develop a Deep Learning Photo Caption Generator ...
We will remove the last layer from the loaded model, as this is the model used to predict a classification for a photo....
Read more >
vRealize Operations Cloud Configuration Guide | VMware Docs
vSphere 32. Configure a vCenter Server Cloud Account in vRealize Operations Cloud 33. Configure User Access for Actions 39.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found