https://github.com/vsoch/brainart
create a mosaic of brain images to match any image template
Science Score: 33.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
✓DOI references
Found 4 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
✓Committers with academic emails
1 of 2 committers (50.0%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.7%) to scientific vocabulary
Repository
create a mosaic of brain images to match any image template
Basic Info
- Host: GitHub
- Owner: vsoch
- License: mit
- Language: HTML
- Default Branch: master
- Size: 54.7 MB
Statistics
- Stars: 4
- Watchers: 3
- Forks: 3
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
Brainart
What do you get when you combine open source brainmaps with art? Why, BrainArt of course! Generate a rendering (made with brains) of an image of your choice using images from the NeuroVault database! After generation of your image, clicking on any of the tiny brains will take you to the brain statistical map. Current image lookup tables are optimized for highly colorful images, either with black or white background. You can generate your own brain images on your computer, and contribute to our gallery!

Installation
pip install brainart
This will place an executable, 'brainart' in your system folder.
usage: brainart [-h] --input IMAGE [--db DB] [--sample SAMPLE] [--N N]
[--update] [--background-color BGCOLOR]
[--color-lookup LOOKUP] [--output-folder OUTPUT]
make images out of brain imaging data
optional arguments:
-h, --help show this help message and exit
--input IMAGE full path to jpg image
--db DB path to folder for png images for database
--sample SAMPLE sample every SAMPLEth pixel
--N N Number of top N brains to sample from when seleting
image. Larger N means more variation in brains and
color.
--update regenerate png database
--background-color BGCOLOR
background color
--color-lookup LOOKUP
color lookup (white, black) which currently determined
background color.
--output-folder OUTPUT
output folder for html file
Generate an image
brainart --input /home/vanessa/Desktop/flower.jpg
It will open in your browser, and tell you the location of the output file, if you want to save it.
Color Lookup Tables
The default package comes with two lookup tables, which are generated from a combination of matplotlib color maps (for the brains with multiple colors) and single hex values (the single colored brains for colors not well represented in matplotlib). To see how to generate a set of image data for the package, see example/make_mosaic.py. Currently, choice of a color lookup table just means choosing a black or white background, and in the future could be extended to color schemes or different brain orientations. The way to specify this:
brainart --input /home/vanessa/Desktop/roman.jpg --color-lookup black
Where the options are black white.
Selection Value N
By default, the algorithm randomly selects from the top N sorted images with color value similar to the pixel in your image. You can imagine this means there is a tradeoff - larger values of N mean more variation in both color and brain images. You can adjust this value:
brainart --input /home/vanessa/Desktop/roman.jpg --N 100
Sampling Rate
You can also modify the sampling rate to produce smaller images. The default is every 15 pixels, which seems to generally produce a good result. To change this:
brainart --input /home/vanessa/Desktop/roman.jpg --sample 100
Under Development
Currently, works best for colorful images (unfortunately this does not include faces) as the color maps are pulled directly from matplotlib. And we know what can be found there! We need to add color maps for skin tones, etc, and faces will be better rendered.
Image generation is slow, based on sampling every 10th pixel. If you change the sample rate, you may need to alter the d3 to change the spacing between the brains. It would be optimal to generate the x,y coordinates in the python to best render for the sampling rate. It would also be desired to have a faster generation of the image. Please contribute! :_)
Owner
- Name: Vanessasaurus
- Login: vsoch
- Kind: user
- Website: https://vsoch.github.io
- Twitter: vsoch
- Repositories: 631
- Profile: https://github.com/vsoch
I'm the Vanessasaurus!
GitHub Events
Total
Last Year
Issues and Pull Requests
Last synced: about 1 year ago
All Time
- Total issues: 2
- Total pull requests: 4
- Average time to close issues: about 23 hours
- Average time to close pull requests: about 2 hours
- Total issue authors: 1
- Total pull request authors: 2
- Average comments per issue: 1.0
- Average comments per pull request: 0.5
- Merged pull requests: 4
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- vsoch (2)
Pull Request Authors
- vsoch (2)
- erramuzpe (2)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 21 last-month
- Total dependent packages: 0
- Total dependent repositories: 2
- Total versions: 12
- Total maintainers: 1
pypi.org: brainart
make images out of brain imaging data
- Homepage: http://www.github.com/vsoch/brainart
- Documentation: https://brainart.readthedocs.io/
- License: LICENSE
-
Latest release: 1.0.9
published almost 9 years ago
Rankings
Maintainers (1)
Dependencies
- Pillow *
- matplotlib *
- nilearn *
- numpy *
- pandas *
- pyneurovault *