Commit 6aab6c67 authored by Diego André Sant'Ana's avatar Diego André Sant'Ana 🤞

ajustes e testes da versão com Python3 e Python2

parent 9f4009b4
......@@ -64,6 +64,10 @@
<option value="E501" />
<option value="W29" />
<option value="E501" />
<option value="W29" />
<option value="E501" />
<option value="W29" />
<option value="E501" />
</list>
</option>
</inspection_tool>
......
This diff is collapsed.
......@@ -6,6 +6,8 @@ YELLOW='\033[0;33m'
NC='\033[0m'
echo "[PYNOVISAO INSTALLER] Installing PYNOVISAO... Please wait!"
export OMP_NUM_THREADS=4
export KMP_AFFINITY="verbose,explicit,proclist=[0,3,5,9],granularity=core"
#check if is root
if [ "$EUID" -ne 0 ]
......
......@@ -242,6 +242,7 @@ Se você deseja as funcionalidades gráficas você precisa instalar matplotlib t
- http://pythonhosted.org/python-weka-wrapper/troubleshooting.html
### Como instalar o caffe ( Opcional )
#### Ubuntu / Windows
......@@ -352,3 +353,8 @@ Após a implementação de seu classificador, você deve configurá-lo no pynovi
Caso você necessite de classes utilitárias, os arquivos delas devem ser criados no diretório src/util/. Além disso, as classes utilitárias devem ser registradas como módulos no arquivo src/util/__init__.py
Caso dê problema relacionado ao número de processos, adicione as duas váriaveis de ambiente,
sendo que deve adicionar no número de threads que o seu processador permite:
export OMP_NUM_THREADS=8
export KMP_AFFINITY="verbose,explicit,proclist=[0,3,5,9,12,15,18,21],granularity=core"
......@@ -103,9 +103,7 @@ class FeatureExtractor(object):
with tqdm(total=len(self.threads)) as pbar:
for t in self.threads:
t.start()
if(len(multiprocessing.active_children())>10):
t.join()
gc.collect()
pbar.update(1)
pbar.close()
......@@ -113,13 +111,13 @@ class FeatureExtractor(object):
with tqdm(total=len(self.threads)) as ppbar:
for t in self.threads:
t.join()
del t
ppbar.update(1)
ppbar.close()
self.print_console("The process was completed with "+str(len(self.threads))+" images!")
if len(self.data) == 0:
raise IException("There are no images in dataset: %s" % dataset)
del self.threads
# Save the output file in ARFF format
# self._save_output(File.get_filename(dataset), classes, self.labels, self.types, self.data, output_file)
self._save_output(File.get_filename(dataset), classes, self.labels[0], self.types[0], self.data, output_file)
......@@ -138,7 +136,7 @@ class FeatureExtractor(object):
continue
#th = threading.Thread(target=self.sub_job_extractor,args=(item, dataset, cl, classes))
th = multiprocessing.Process(target=self.sub_job_extractor,args=(item, dataset, cl, classes))
multiprocessing.
self.threads.append(th)
......
......@@ -58,7 +58,7 @@ class RawCentralMoments(Extractor):
values_mu = [mu[p, q] for (p, q) in self._moments_order]
labels_mu = [M+str(p)+str(q) for M,(p,q) in zip(['Mu_'] * len(self._moments_order), self._moments_order)]
print(values_mu)
#print(values_mu)
labels = labels_m + labels_mu
types = [Extractor.NUMERIC] * len(labels)
values = values_m + values_mu
......
......@@ -161,7 +161,8 @@ class Image(object):
self._toolbar.configure(background='white', borderwidth=0)
for child in self._toolbar.winfo_children():
if sys.version_info[0] < 3:
child.configure(background='white', foreground='black')
#child.configure(background='white', foreground='black')
child.configure(background='white')
else:
child.configure(background='white')
#self._toolbar.update()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment