wiki:pmake3d

Acronimul Proiectului: pmake3d

  • Membrii echipei: Silviu Baranga - SCPD, Adriana Szekeres - SCPD;
  • Descriere proiect: Make3d is a program developed at Stanford. It takes a single 2-D image and generates a 3-D model, completely automatically. This project aims at parallelizing the make3d code, using CUDA. (More details here: http://make3d.stanford.edu/)

Activitate proiect

  1. Analizarea codului make3d (acesta se afla in folderul make3d_original de pe svn) in vederea paralelizarii:
  • pentru rularea codului, se dau urmatoarele comenzi in matlab (cu mici schimbari ale cailor):
    >> cd PP/Make3dSingleImageStanford_version0.1/LearningCode/
    >> InitialPath(true)
    >> profile on -history 
    >> OneShot3dEfficient('/home/szekeres/Desktop/PP/Make3dSingleImageStanford_version0.1/park0067_.jpg','/home/szekeres/Desktop/PP/Make3dSingleImageStanford_version0.1/out','1','/home/szekeres/Desktop/PP/MakedLearnedParameters_v0.1/', '/home/szekeres/Desktop/PP/MakedLearnedParameters_v0.1/', [])
    >> profile viewer
    

  1. Incercarea paralelizarii functiei matlab sigmoidLogBarrierSolver cu Jacket ( http://www.accelereyes.com/products).
  1. Paralelizarea functiei C++ segmentImgOpt folosind CUDA. Functia este de fapt implementarea unui algoritm de segmentare a unei imagini ppm.
  • algoritmul implementat in C++, precum si paperul aferent se gasesc la adresa: http://people.cs.uchicago.edu/~pff/segment/
  • codul paralelizat (segment.cu) se gaseste in folderul segment de pe svn
  • pentru compilare si rulare se poate folosi Makefile-ul aflat in folderul segment de pe svn, in care se vor inlocui caile spre headerele CUDA, biblioteca CUDPP, si alte headere si biblioteci necesare.
INCDIR = -I. -I/usr/local/cuda/sdk/C/common/inc -I/home/szekeres/Desktop/cudpp_1.1/cudpp/include 
LIBS = -lcudpp
LIBDIR = -L/home/szekeres/Desktop/cudpp_1.1/lib
DBG    = -g
CPP    = g++
CFLAGS = $(DBG) $(INCDIR)
LINK   = -lm 

.cpp.o:
	$(CPP) $(CFLAGS) -c $< -o $@

all: parallel sequential

parallel:
	nvcc segment.cu -o parallel ${INCDIR} ${LIBDIR} ${LIBS}

sequential: segment.cpp segment-image.h segment-graph.h disjoint-set.h
	$(CPP) $(CFLAGS) -o sequential segment.cpp $(LINK)

clean:
	/bin/rm -f parallel  sequential *.o

clean-all: clean
	/bin/rm -f *~ 

run_parallel:
	./parallel 0.8 500 20 lanscape_vectors.ppm out.ppm

run_sequential:
	./sequential 0.8 500 20 lanscape_vectors.ppm out.ppm

  1. Evaluarea implementarii:
    818x535 image:
        original code: 648 ms
        parallelized version: 336 ms
        speedup: 1.92x
    1389x822 image:
        original code: 1441 ms
        parallelized version: 662 ms 
        speedup: 2.17x
    
Last modified 12 years ago Last modified on Jan 15, 2010, 4:33:54 PM

Attachments (1)

Download all attachments as: .zip