My Projects

Some of the projects I've worked on recently.


Project Image Here
Technologies
  • C++
  • Git

GA for ROI Extraction On Thermographic Breast Images

This work proposes the use of Genetic Algorithms (GA) to identify the area of the breast from the background in thermographic breast images. The proposed method uses color information, a fitness function based on cardioids, and GA. This is the first work in the literature to propose a Region of Interest (ROI) extraction based on GA and cariods. ROI extraction can improve the accuracy of cancer detection and assist with the standardization of acquisition protocols. The method is able to successfully separate the breast region in 52 out of 58 images, while being fully automatic, and not requiring manual selection of seed points. This work was created by Lucas C. Mendes, Erick O. Rodrigues, Sandro C. Izidoro, Aura Conci and Panos Liatsis and published in the 27th International conference on Systems, Signals and Image Processing (IWSSIP). My contribution was the development of a C++ version, bringing great execution time reduction when compared to the Java, Python and Go version. On my fork on Github I am also working on a HIP version, that on initial tests greatly reduces the execution time once more.

Code Snippet
void GA::evaluatePopulationInParallel(){
	std::vector threads;
	for(auto& individual : population)
	{
		threads.push_back(std::thread([](Individual& individual, GA* ga){
			if(!ga->isViable(individual))
			{
				individual.setFitness(0);
				return;
			}
			
			individual.setFitness(ga->calculateFitness(individual));
		}, std::ref(individual), this));
	}
	for(auto& thread : threads)
	{
		thread.join();
	}
}							
View Project

Project Image Here
Technologies
  • C++
  • Drogon
  • Bootstrap

Portifolio Site

A website designed to be my portifolio, presenting my projects, experience and contact. It is being fully developed in the Drogon Framework, to showcase my experience with C++ and ability to learn new things everyday. I am using .csp files for the server rendering of the pages you are seeing, and a MariaDB database that storages the projects information and my resume.

Code Snippet
void ProjectsCtrl::asyncHandleHttpRequest(const HttpRequestPtr& req, std::function &&callback)
{
	drogon::orm::Mapper mp(drogon::app().getDbClient());
	auto projects = mp.findAll();
	drogon::HttpViewData data;
	data.insert("projects", projects);
	data.insert("db", drogon::app().getDbClient());
	auto resp = HttpResponse::newHttpViewResponse("projects", data);

	callback(resp);
}							

Project Image Here
Technologies
  • Python
  • Django
  • C++

GASS 2

GASS is a method based on a genetic algorithm C++ code to search for similar active sites (catalytic and binding) in proteins. In addition to finding similar active sites, the method can find inter-domain sites and perform not exact matches using a substitution matrix (conservative mutations). In this new version, GASS website made in python and django uses parallel genetic algorithms to create an initial population (seeds) to improve accuracy and decrease processing time. The site built with python backend and a django engine for front-end.

Code Snippet
void GA::cruzaPopulacao(){
	std::vector novapop(tamanhoPopulacao-quantidadeElitismo);
	std::vector filhos;
	int i=0;
	while (i<(tamanhoPopulacao-quantidadeElitismo)){
		Individuo pai1 = torneio();
		Individuo pai2 = torneio();
		filhos = cruza(pai1, pai2);
		novapop[i++] = filhos[0];
		if(i<(tamanhoPopulacao-quantidadeElitismo))
			novapop[i++] = filhos[1];
	}
	populacao=std::move(novapop);
}							
View Project

Project Image Here
Technologies
  • C++
  • CUDA
  • Git

CUDA TSP GA

A Parallel Genetic Algorithm made in C++ Cuda to solve the traveling salesman problem.

Code Snippet
__global__ void fitness(unsigned int n, unsigned int np, float*M, int *V, double *fitness) {
	int index = blockIdx.x * blockDim.x + threadIdx.x;
	int stride = blockDim.x * gridDim.x;

	double value;

	if (index < n) {
		for (int i=index; i < n; i += stride) {
			value = 0;
			for (int p=0; p<(np-1); p++){
				value += M[V[i*np+p]*np+V[i*np+p+1]];
			}
			fitness[i] = value;
		}
	}
}							
View Project