FelonFinder module
This module contains the whole graphical interface. This is truly the face of Felon Finder.
- class FelonFinder.Filter(master)[source]
Bases:
object
This class contains the filter menu of the program. Once it is launched, the main window of the program is disabled to avoid mistakes.
- new_step()[source]
This function creates again the selection menu for each new step of the filter creation.
- no_image_selected()[source]
This function refreshes the proposed images when the user presses the “Aucune image” button.
This function creates the buttons used to create the filters with the selected images.
- class FelonFinder.MainScreen(master)[source]
Bases:
object
This class contains the main window of the program.
- add_image_to_showed_list(image)[source]
This function keeps the given image in memory through an array.
- Parameters:
image – Image to keep in memory
- back_to_last_images()[source]
This function removes the last showed images and changes the buttons to make them show to the ones before that. The reference list is also emptied.
- check_validation()[source]
This function applies the VAE and the genetic algorithm to the selected images and shows the decoded results in the buttons. The selected images are then kept in reference.
- get_random_images()[source]
This function gets random pictures from the database after the user clicked on “Nouvelles photos”
- refresh()[source]
This function applies again the VAE and the genetic algorithm to the previously selected and treated images and shows the decoded results in the buttons. The selected images are still kept in reference.
- reset_ref()[source]
This function clears the reference images array and puts back unknown.png faces in the reference labels.
- save_images()[source]
This function saves the selected pictures in the selected path if it exists, else asks what path to choose.
- select_image(image)[source]
This function turns the buttons red or blue and their hover color to darker red or darker blue according to if they were selected or un-selected by the user.
- Parameters:
image – The selected image
- udpate_combobox()[source]
This function refreshes the filters drop down list once the filter menu is closed.
- class FelonFinder.Options(master)[source]
Bases:
object
This class contains the options menu of the program. Once it is launched, the main window of the program is disabled to avoid mistakes.
- cancel_changes(config)[source]
This function cancels the changes that happened in the options menu when the user clicks on “Annuler” or closes the options window. It also closes the window and makes the main windows usable again.
- Parameters:
config – Configuration file used to come back to the previous values
- change_path_label()[source]
This function changes the path to the saved images if the user enters one.
- reset_config(config)[source]
This function reinitializes the parameters to the very first ones, according to the [initial] section of the config.ini file. It also closes the window and makes the main windows usable again.
- Parameters:
config – Configuration file used to read the initial parameters.
- slider1(value)[source]
This function changes the value showed above the mean slider according to where the cursor is.
- Parameters:
value – Value of the cursor
- slider2(value)[source]
This function changes the value showed above the variance slider according to where the cursor is.
- Parameters:
value – Value of the cursor
- switch_event()[source]
This function changes the mode to light if it was dark, or dark if it was light.
- validate_params(config)[source]
This function writes the parameters entered by the user in the config file, section [current], which validates them and uses them for the rest of the execution and the other executions. It also closes the window and makes the main windows usable again.
- Parameters:
config – Configuration file used to write the parameters
- validate_path_change(label_string, config)[source]
This function validates the path changes by putting the new path in the config.ini file if one was selected. It also closes the window and makes the main windows usable again.
- Parameters:
label_string – Value of the path string
config – ConfigParser object used to write the new configuration
- class FelonFinder.SplashScreen(master)[source]
Bases:
object
This class contains the splash screen for the project and the loading for the main window.
- class FelonFinder.Tutorial(master)[source]
Bases:
object
This class contains the tutorial window with a link to the github repository of the project.
- callback(url)[source]
This function opens a new tab in the user’s web browser to the github repository of the project.
- Parameters:
url – Link of the github repository
- FelonFinder.center_window_on_screen(window, width, height)[source]
This function centers the given window on the screen with the given width and height.
- Parameters:
window – Window to be centered
width – Width to be given to the window
height – Height to be given to the window