Hello.
I am still a beginner with pyTorch.
I created a script that generates 3D primitives objects in a voxel representation.
The voxel is either transparent (outside the 3D object) or with a grayscale constant value and no transparency (inside the 3D object)
The primitives are spheres, oblate spheres, hexahedrons (stretched cubes), random tetrahedrons.
for each primitive a voxel is generated and passed to a 3D renderer as a data file (povray used here)
The 3D scene adds a light source with constant position.
the Python script generates a set of 4 camera positions (top,bottom,left,right) and for each voxel the camera are rotated by the same amount, so their positions remain constant relative to each other.
then the renderer generates 4 png images.
These images are fed to the model. The voxel generated previously is used as the target of the model.
The model used for now is a basic two linear transforms with a sigmoid activation in between.
For training, the criterion loss is MSELoss()
I have only 120 samples, for now, so training will probably be mediocre. I get a loss starting at 0.6. and converging to 0.4.
Any idea for a suitable model for this kind of task?
I can post the whole script if needed;
class Net(nn.Module):
    def __init__(self):
        super().__init__()
        requires_grad = True
            # Inputs to hidden layer : 4 png images : 4*640*480*3 (4 images 640*480, 24bit color)
        self.hidden = nn.Linear(3686400, 16)
        # Output is a voxel of 16*16*16*2 (16 voxels 3D cube, with grayscale and transparency values)
        self.output = nn.Linear(16, 16*16*16*2)        
        
    def forward(self, x):
        x.requires_grad = True
        # Pass the input tensor through each of our operations
        x = self.hidden(x)
        x = F.sigmoid(x)
        x = self.output(x)
                       
        return x