Skip to content

Code Review #3

@agolde15

Description

@agolde15

Hi Matthew,
Nice job on your project. I'm impressed on how much functionality you have put together.

I have a few suggestions on how you could consider improving the usability of your code.

  • Your example use cases that you included in the response to Stephen’s post were very helpful for me. I recommend including those samples/usage notes in your repository and README so a user can verify their installation of your code.

  • Additional installation instructions in your README would also be helpful, such as the commands you used to build with CMAKE, and the CMAKE version.

  • Are there restrictions on the allowed input/output types to the pixelCompressor.py or pixelExtractor.py? I used png, which worked fine, and PIL Image.open() has a lot of support. Perhaps you could mention which ones you have tested with or any that you have found that aren't supported.

  • For pixelCompressor.py, if an invalid number of arguments is specified, then the program errors. Perhaps add input handling and print usage notes for cleaner execution.

compressPixelData(sys.argv[1], sys.argv[2])
IndexError: list index out of range
  • When I tried to execute the first time, I was missing the ‘numpy’ library. To tidy things up, and for reproducibility perhaps you could include a requirements.txt file with the required Python libraries and versions you used.

Lastly, one of the example images I used produced a "segmentationFault". I ran it with various parameters, including some of the same as you had on your /home/sunnyonyxtom/Documents/GPU/imageProcessing/cat.pngexample runs, with the same result. I traced it to line 191 in imageProcessing.cu:

cudaMemcpy(outputPixelArrays[i], inputPixelArrays[i], width * height * sizeof(double),
                       cudaMemcpyHostToHost);

but couldn't get to the root of the issue. Perhaps it's related to the buffer issue mentioned by Stephen, so I am attaching the png file in case you'd like to run against it as a test case.
cat

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions