Too many files open - python-imaging-library

import PIL as Image
Image.fromarray(cv2.imread(link, cv2.IMREAD_GRAYSCALE))
I'm currently trying to complete a project but I'm constantly getting too many files open error on my linux GPU server which crashes the server.
I'm loading 3 images for CNN classification using the code as shown above. Anyone facing the same problem have a solution to this?
Thank you.

Try switching to the file strategy system by adding this to your script
import torch.multiprocessing
torch.multiprocessing.set_sharing_strategy('file_system')

Related

How do I open a `.pb` file? Ideally, how to import it into Meta Quest 2?

I'm using Matterport's free scanning software for Android and it spits out 2 files called 2b7cb66c-4c9e-408d-88c5-90b8c0322c13_sweep_features.pb and 2b7cb66c-4c9e-408d-88c5-90b8c0322c13_sweep_cloud.pb (the important thing is that they're of the forms [nums]_sweep_features.pb and [nums]_sweep_cloud.pb).
:^)
How can I open .pb files?
.
=======================================================
=======================================================
My ultimate goal: the room in VR
I need to know how to open the file so I can walk around the rooms I scan in my Meta Quest 2 VR Headset. Ideally, I'd get it working in Unity, but UnrealEngine would be fine too. The most important thing is that I get the numerical and/or color information about the scanned room. Besides sweep_cloud.pb, there is also a file called sweep_features.pb.
Maybe .pb is a Tensorflow format? I say that because most of the .pb files I have found through Google for are Protocol Buffers, many of which store Neural Network (Tensorflow) files, and "feature" is jargon in Neural Networks and Machine Learning more generally!
Another guess would be something like a .obj file, a numpy (.npy) file or other point cloud format that probably has some color information in it!
Thanks!

Get system filepath using Capacitor Filesystem API

currently I'm working through the tutorial of building my first app with using the ionicframework with angular and I would like to know where the photos are actually saved on my filesystem? I tried to find out using Filesystem.getURI() but /DATA/1614347102940.jpeg doesn't really help me.
Does anyone know what the absolue filepath on my system is or how I can find out?
Help is much appreciated.
Assuming you're using the Filesystem plugin. The plugin abstracts each operation to a specific special directory on the device. Used like so:
import { Filesystem, Directory } from '#capacitor/core';
Directory.Documents
Directory.Data
Directory.Cache
Directory.External
Directory.ExternalStorage
source code

FMS VOD streaming: How can I access content that was uploaded to the webroot/vod directory?

I have recently started working with a fresh install of FMS 4.5.0 and am having some issues getting my media to load with the VOD application.
After uploading some of my own FLV/F4V content to "/webroot/vod/", I am currently only able to load the samples from the installation.
Is there some sort of configuration that needs to be made to access my media?
Do I need to create a manifest for each video?
I have been running tests through:
http://www.osmf.org/configurator/fmp/
And have had luck accessing the videos that came with the install by using the following:
Video Source (URL): http://[my host]/vod/sample1_1000kbps.f4v
But when I change this to point to one of my recently uploaded videos it fails everytime.
Another strange note, I was able to play one of the samples but then I changed its name and it was still able to load that one specific video using the same filename when the file's name had changed. This leads me to believe that it isn't really loading the right files or perhaps I am uploading to the wrong directory. But I can't find any other directories that have video in them.
Please let me know if there is any more info you need to help me. I'm fairly new to this and am not sure what to include.
Thanks in advance for any help!
EDIT: This was a pathing issue.
This has been resolved.
Apparently my webroot directory for the server was not set up correctly and after it was pointing to the right directory it was fixed.

How to upload image files to ipython notebook for further image processing

Instead of working with generated plots and graphs I want to use existing pictures to perform image processing on them.
In sage one writes:
from pylab import imread
image = imread(DATA+"image.png")
The official help introduction is silent regarding this task / use-case / problem.
After googleing and trying for 30 mins, I found out, that is actually quite simple.
The notebook has file access to the folder it was launched from. So if one started it in one's home folder one can access all the files from the home folder directly.
from pylab import imread
image = imread("image.png")

Flash Builder 4 import services .as files

I am working on a shared project in Flash Builder 4. Our data is coming through web services. We have put the generated .as files into vss so that we can share them. What I can't figure out is how to import those files. I see the files that others have created under my services directory but I can't figure out how to get them to appear in my Data/Services view. Does anybody know how to do this?
It looks like this information is in a file with an .fml extension. This is located in your project.model directory. Besides the fact that you can't get to that file from within flash builder to check it out, I don't know that it is a good idea to source control a project file. We are looking at what options we have to help everyone maintain these service files.