PermissionError: [WinError 32] & Slow Classification with GPU
See original GitHub issueI’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:
- Created 2 years ago
- Reactions:1
- Comments:6 (3 by maintainers)

Top Related StackOverflow Question
This is the probability that the steganographic algorithm corresponding to the model was used.
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:
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?