Transform different image if specific id or order
You could do that like so:

{% for asset in entry.portraits %}
    {% if loop.index == 2 or loop.index == 4 %}
        {% set transform = 'largeIndexHalf' %}
    {% else %}
        {% set transform = 'largeIndex' %}
    {% endif %}
    &lt;div class="item"&gt;&lt;img src="{{ asset.getUrl(transform) }}" /&gt;&lt;/div&gt;
{% endfor %}


or more simply (making use of the containment operator (in) and the ternary operator (? :):

{% for asset in entry.portraits %}
    {% set transform = loop.index in [2, 4] ? 'largeIndexHalf' : 'largeIndex' %}
    &lt;div class="item"&gt;&lt;img src="{{ asset.getUrl(transform) }}" /&gt;&lt;/div&gt;
{% endfor %}