Home

Menu

Loading wiki pages...

View
Wiki Version:
<h1>README</h1> <p>This page contains supplementary material for the following two articles.</p> <ul> <li> <p>Lonni Besançon, Amir Semmo, David Biau, Bruno Frachet, Virginie Pineau, El Hadi Sariali, Rabah Taouachi, Tobias Isenberg, and Pierre Dragicevic. <a href="https://hal.inria.fr/hal-01795744/document" rel="nofollow"><strong>Reducing Affective Responses to Surgical Images through Color Manipulation and Stylization</strong></a>. Proceedings of the Joint Symposium on Computational Aesthetics, Sketch-Based Interfaces and Modeling, and Non-Photorealistic Animation and Rendering, Aug 2018, Victoria, Canada. 18, pp.4:1--4:13,</p> </li> <li> <p>Lonni Besançon, Amir Semmo, David Biau, Bruno Frachet, Virginie Pineau, El Hadi Sariali, Marc Soubeyrand, Rabah Taouachi, Tobias Isenberg, and Pierre Dragicevic. <a href="https://hal.inria.fr/hal-02381513/file/besancon-surgery-inpress.pdf" rel="nofollow"><strong>Reducing Affective Responses to Surgical Images and Videos through Stylization</strong></a></p> </li> </ul> <h2>Authors and licenses</h2> <ul> <li>Experiment code by Lonni Besançon and Pierre Dragicevic, <a href="https://creativecommons.org/licenses/by/4.0/" rel="nofollow">CC BY 4.0</a>.</li> <li>Abstool © 2018 Amir Semmo and Jan Eric Kyprianidis.</li> <li>R code by Pierre Dragicevic, <a href="https://creativecommons.org/licenses/by/4.0/" rel="nofollow">CC BY 4.0</a>.</li> <li>Ethics documents by Pierre Dragicevic and Lonni Besançon, <a href="https://creativecommons.org/licenses/by/4.0/" rel="nofollow">CC BY 4.0</a>.</li> <li>picture6.jpg, picture7.jpg, picture8.jpg, picture9.jpg, picture10.jpg, 61.jpg, 71.jpg, 81.jpg, 91.jpg, 101.jpg, example.jpg are public domain.</li> <li>Lasagna photos by Pierre Dragicevic and Yvonne Jansen, <a href="https://creativecommons.org/licenses/by/4.0/" rel="nofollow">CC BY 4.0</a>.</li> <li>All other material by Lonni Besançon, Pierre Dragicevic, Amir Semmo, and Tobias Isenberg, <a href="https://creativecommons.org/licenses/by/4.0/" rel="nofollow">CC BY 4.0</a>.</li> </ul> <h2>Important note</h2> <p>The pictures we used in our experiment were taken from the IAPS and NAPS research databases, and we are not allowed to redistribute them publicly. In this supplemental material, we use surrogate pictures instead. If you want to try the original experiment or need to replicate it, you will need to obtain the IAPS and NAPS databases, extract the pictures, and run them through our filters. See <strong>How to regenerate the original experiment stimuli</strong> below. Please contact us if you have any problem.</p> <p>Similarly, the pictures used for our two sets of interviews are taken from real surgical procedures and we are not allowed to redistribute them publicly. In the directory containing the code we used to run the second of interviews with three surgeons, we replaced the original images and videos. We also reduced the number of videos and images to only one example video and one example image to save storage space. The code indicates what variable to change in order to obtain the original program we used during interviews, but you can also see <strong>How to run the program used for the second set of interviews</strong> below.</p> <p>Our preregistered analysis available at <a href="https://osf.io/34vzj/" rel="nofollow">osf.io/34vzj</a>.</p> <h2>OSF Storage Content</h2> <p>Directory | Content ------------ | ------------- <code>surgeon interviews/</code> | Notes and data from interviews with surgeons <code>experiment/</code> | &nbsp;&nbsp;&nbsp; <code>ethics documents/</code> | Participant information sheet, consent form, etc. &nbsp;&nbsp;&nbsp; <code>pictures/</code> | Surrogates for the 10 pictures used in the experiment &nbsp;&nbsp;&nbsp; <code>stimuli/</code> | The processed pictures &nbsp;&nbsp;&nbsp; <code>experiment code/</code> | The HTML and javascript code for running the experiment &nbsp;&nbsp;&nbsp; <code>R code/</code> | Experiment data + code for analyzing the data &nbsp;&nbsp;&nbsp; <code>R code (pregistered)/</code> | Older version of the above directory, see <a href="https://osf.io/34vzj" rel="nofollow">https://osf.io/34vzj</a> &nbsp;&nbsp;&nbsp; <code>abstool/</code> | Image processing tool for the techniques used in the experiment <code>surgeon interviews 2/</code> | Notes and data from the second series of interviews with surgeons (journal article only)</p> <h2>How to run the R code</h2> <p>Make sure you have R Studio installed (<a href="https://www.rstudio.com/" rel="nofollow">https://www.rstudio.com/</a>). Import the <code>R code</code> directory in R Studio by creating a new project from existing directory, then open the file <code>analysis.R</code> in the editor and hit <code>Shift+Cmd+S</code>.</p> <h2>How to run the experiment</h2> <p>If you only want to view instructions, you can open the <code>experiment code/index.html</code> file directly in a browser. However, you need to set up a Web server to see the experiment stimuli correctly. On Mac OS, you can do as follows:</p> <pre class="highlight"><code class="language-bash"> sudo npm install -g http-server</code></pre> <p>Then, cd to the <code>experiment code</code> directory and type:</p> <pre class="highlight"><code class="language-bash"> http-server -c-1</code></pre> <p>Then, open the URL http://127.0.0.1:8080/ in your browser (preferably Google Chrome to be able to download the final csv containing results), and enter a number between 1 and 30 as participant ID. At the end of the experiment, a csv file will be generated. This csv file can be read by the analysis scripts shared in the <code>R code</code> directory.</p> <p>Notes: - The experiment has been written for a Retina display. It will work on a non-Retina display but the images will be shown in half their resolution. - Remember those are not the actual stimuli from our experiment. See note at the top of this page.</p> <h2>How to regenerate the original experiment stimuli</h2> <h3>Step 1 — Getting the NAPS and IAPS pictures</h3> <p>You first need to obtain the NAPS and IAPS picture sets. The process takes a few days for NAPS and about a month for IAPS. You need to be affiliated with an academic institution.</p> <p>IAPS picture set: 1. Go to <a href="http://csea.phhp.ufl.edu/media/requestform.html" rel="nofollow">http://csea.phhp.ufl.edu/media/requestform.html</a> and fill in your info, 2. Wait for their email, print it, sign it, scan it and send it back to them, 3. About a month later, you will receive an email with a URL, a username and a password to download the picture set. They are valid for one week.</p> <p>NAPS picture set: 1. Go to <a href="http://exp.lobi.nencki.gov.pl/dnaps" rel="nofollow">http://exp.lobi.nencki.gov.pl/dnaps</a> and fill in your info, 2. A few days later, you will receive a download link that will remain valid for one year.</p> <h3>Step 2 — Preparing the pictures</h3> <p>Once you have downloaded the NAPS and IAPS picture sets, find the following .jpg files, copy them into a temporary directory and rename them as follows:</p> <p>From | to ------------ | ------------- <code>NAPS_H/People_116_h.jpg</code> | <code>example.jpg</code> <code>NAPS_H/People_221_h.jpg</code> | <code>picture1.jpg</code> <code>IAPS 1-20 Images/3213.jpg</code> | <code>picture2.jpg</code> <code>NAPS_H/People_216_h.jpg</code> | <code>picture3.jpg</code> <code>NAPS_H/People_202_h.jpg</code> | <code>picture4.jpg</code> <code>IAPS 1-20 Images/3212.jpg</code> | <code>picture5.jpg</code> <code>NAPS_H/People_044_h.jpg</code> | <code>picture6.jpg</code> <code>NAPS_H/People_176_h.jpg</code> | <code>picture7.jpg</code> <code>NAPS_H/People_179_h.jpg</code> | <code>picture8.jpg</code> <code>NAPS_H/People_180_h.jpg</code> | <code>picture9.jpg</code> <code>NAPS_H/People_192_h.jpg</code> | <code>picture10.jpg</code></p> <p>You then need to resize all 11 images to 1024x768. You can proceed like this:</p> <ol> <li>Open a Cygwin or Unix shell and make sure you have ImageMagick's <code>mogrify</code> command installed. If not, install ImageMagick from <a href="http://www.imagemagick.org/" rel="nofollow">http://www.imagemagick.org/</a></li> <li>Move to the directory where the 11 images are located and type the following two commands:</li> </ol> <pre class="highlight"><code class="language-bash">mkdir resized mogrify -resize 1024x768 -quality 90 -path resized *.jpg</code></pre> <p>You will see a new <code>resized</code> subdirectory with the same images but resized to 1024x768.</p> <h3>Step 3 — Processing the pictures</h3> <p>Here you will need to use our custom image processing tool, which is currently only available as a MS Windows binary. To be able to run it, you will need:</p> <ul> <li>Windows 7 or newer,</li> <li>An nVidia graphics card with CUDA Support and Compute Capability 3.0+ (starting from Kepler GPUs, see <a href="https://en.wikipedia.org/wiki/CUDA" rel="nofollow">https://en.wikipedia.org/wiki/CUDA</a>),</li> <li>An up-to-date nVidia graphics driver that supports CUDA.</li> </ul> <p>Go to the <code>experiment/abstool/</code> directory and run <code>ozviewer.exe</code>. To process all previously resized images in a batch processing, proceed as follows:</p> <ol> <li>Use <code>File</code> -&gt; <code>Batch by Setting List</code>. File dialogs will appear that will ask you to specify the following files/directories:</li> <li><code>Open Settings List</code>: Select <code>experiment/abstool/settings/settings_batch_experiment.txt</code></li> <li><code>Choose input directory</code>: Select the directory that includes the resized images from Step 2.</li> <li><code>Choose output directory</code>: Select an output directory where the processed images should be saved to. This can also be same folder used as input directory (input images will NOT be overwritten).</li> <li>Wait until all processed images are saved to the specified output directory.</li> </ol> <p>In the experiment, we also provide two example images, one is unprocessed while the other is processed with a technique that is not later used in the experiment. This technique is called the "extended difference-of-Gaussians effect".</p> <p>To perform the example image processing with the extended difference-of-Gaussians effect, repeat steps 1-2 but using <code>experiment/abstool/settings/settings_batch_example.txt</code> as the settings list.</p> <h3>Step 4 — Renaming and copying the files</h3> <p>Almost done! Now you just need to rename all the files. But first of all, you need to gather all unprocessed and processed images in the same folder.</p> <p>If you have followed all of the previous steps, you should have a directory that looks like (ordered by name): <em> <code>example-xdog_4.jpg</code> </em> <code>example.jpg</code> <em> <code>picture1-apparentGray_1.jpg</code> </em> <code>picture1-flowabs_1.jpg</code> <em> <code>picture1-hue_shift_2.jpg</code> </em> <code>picture1-ivacef_1.jpg</code> <em> <code>picture1-msakf_1.jpg</code> </em> <code>picture1-ssia_2.jpg</code> <em> <code>picture1.jpg</code> </em> [and so on with <code>picture2</code> to <code>picture10</code>]</p> <p>If that is the case, you can start renaming the images so that they will be usable by the code of the experiment.</p> <ol> <li>Open a Cygwin or Unix shell and make sure you have the Perl <code>rename</code> command installed. If not, you can install it on Mac OS using the two following commands (this may take a while):</li> </ol> <pre class="highlight"><code class="language-bash">/usr/bin/ruby -e &quot;$(curl -fsSL <a href="https://raw.githubusercontent.com/Homebrew/install/master/install" rel="nofollow">https://raw.githubusercontent.com/Homebrew/install/master/install</a>)&quot; brew install rename</code></pre> <ol> <li>Move to the directory that contains all images, and copy/paste the following commands in your terminal:</li> </ol> <pre class="highlight"><code class="language-bash">rename 's/picture(\d+)-apparentGray_1/$1\x32/' *.jpg rename 's/picture(\d+)-flowabs_1/$1\x33/' *.jpg rename 's/picture(\d+)-hue_shift_2/$1\x34/' *.jpg rename 's/picture(\d+)-ivacef_1/$1\x35/' *.jpg rename 's/picture(\d+)-msakf_1/$1\x36/' *.jpg rename 's/picture(\d+)-ssia_2/$1\x37/' *.jpg rename 's/picture(\d+)./$1\x31./' *.jpg</code></pre> <p>Once this is done, your directory should contain: <em> <code>11.jpg</code> </em> <code>12.jpg</code> <em> <code>13.jpg</code> </em> <code>14.jpg</code> <em> <code>15.jpg</code> </em> <code>16.jpg</code> <em> <code>17.jpg</code> </em> […and so on until <code>107.jpg</code>] <em> <code>example-xdog_4.jpg</code> </em> <code>example.jpg</code></p> <p>Now move or copy all those images to <code>/experiment/experiment code/images</code>. The directory already contains some images that will be replaced, plus other images that do not need to be changed: <code>Mask.png</code>, <code>Screen1.png</code>, <code>Screen2.png</code>, and <code>Screen3.png</code>.</p> <p>You can now run the experiment as indicated in <strong>How to run the experiment</strong>. </p> <h2>How to run the program used for the second set of interviews</h2> <p>You need to set up a Web server to see the experiment stimuli correctly. On Mac OS, you can do as follows:</p> <pre class="highlight"><code class="language-bash"> sudo npm install -g http-server</code></pre> <p>Then, cd to the <code>surgeon interview code</code> directory and type:</p> <pre class="highlight"><code class="language-bash"> http-server -c-1</code></pre> <p>Then, open the URL http://127.0.0.1:8080/ in your browser (preferably Google Chrome to be able to download the final csv containing results), and enter 1 as participant ID. At the end of the experiment, a csv file will be generated.</p> <p>Notes: - The experiment has been written for a Retina display. It will work on a non-Retina display but the images will be shown in half their resolution. - Remember those are not the actual stimuli from our experiment. See note at the top of this page. - Remember that to save storage space we only use one example video and image here. If you want to obtain the original program, change the value of <code>var nbOfVideos = 1</code> to <code>var nbOfVideos = 2</code> in <code>indexVideos.html</code> as well as the value of <code>var nbOfImages = 1</code> to <code>var nbOfImages = 2</code> in <code>index.html</code>.</p> <h2>Arkangel: the Google Chrome Extension</h2> <p>Based on our initial work, we have implemented a Google Chrome Extension to automatically process images while browsing the web. The code for this extension is <a href="https://github.com/lonnibesancon/Arkangel" rel="nofollow">available on Github</a>.</p>
OSF does not support the use of Internet Explorer. For optimal performance, please switch to another browser.
Accept
This website relies on cookies to help provide a better user experience. By clicking Accept or continuing to use the site, you agree. For more information, see our Privacy Policy and information on cookie use.
Accept
×

Start managing your projects on the OSF today.

Free and easy to use, the Open Science Framework supports the entire research lifecycle: planning, execution, reporting, archiving, and discovery.