Please refer to the Matlab example (https://www.mathworks.com/help/images/learning-to-see-in-the-dark.html), This page itself acknowledges that "The colors of the network prediction are less saturated and vibrant than in the ground truth". I have compared it against the original TF model as provided by the original authors (https://github.com/cchen156/Learning-to-See-in-the-Dark) which DOES provide a very good reconstruction of the ground truth with vibrant colors. I have tried retraining the model in Matlab and got similarly poor results as the Matlab-provided pretrained model. Could someone please throw light on what could be causing this? I am afraid without a solution, Matlab example is not useful at all compared to the Tensorflow solution.
Hi @Muhammad Bilal, the MATLAB example is not a direct replication of the solution provided by authors of the "Learning to see in the dark" research paper. The pretrained model in the example has been trained only on the images clicked from the Sony camera and implements a loss function which utilizes both L1 and SSIM loss rather than the researcher's pipeline.
alpha = 7/8; % You can experiment with this value to adjust the loss function
loss = alpha*ssimLoss + (1-alpha)*L1loss;
end
As suggested in the table below which is taken from the original research paper (https://arxiv.org/pdf/1805.01934), different loss functions can be tried out to figure out which works best for training the MATLAB model.
The MATLAB reconstruction is not as close to the ground truth as reported in the original paper as specified in the example. To improve your model, you can increase the number of epochs and alter the loss function to train a better model which might give an output closer to the ground truth. To increase the contrast in the output images you can try implementing histogram stretching as a post-processing step which increases the contrast of the image on the cost of image clarity. Using the 'imadjust' function during post processing also helps with adjusting the contrast of a colored image.
To learn more about histogram stretching and the 'imadjust' function you can refer to the following MATLAB answer and documentation links:
Da Änderungen an der Seite vorgenommen wurden, kann diese Aktion nicht abgeschlossen werden. Laden Sie die Seite neu, um sie im aktualisierten Zustand anzuzeigen.
Translated by
Website auswählen
Wählen Sie eine Website aus, um übersetzte Inhalte (sofern verfügbar) sowie lokale Veranstaltungen und Angebote anzuzeigen. Auf der Grundlage Ihres Standorts empfehlen wir Ihnen die folgende Auswahl: .
Sie können auch eine Website aus der folgenden Liste auswählen:
So erhalten Sie die bestmögliche Leistung auf der Website
Wählen Sie für die bestmögliche Website-Leistung die Website für China (auf Chinesisch oder Englisch). Andere landesspezifische Websites von MathWorks sind für Besuche von Ihrem Standort aus nicht optimiert.